@remotion/cli 4.0.0-oops.3 → 4.0.0-prefetch.7

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.
Files changed (479) hide show
  1. package/dist/bundle.d.ts +1 -0
  2. package/dist/bundle.js +32 -0
  3. package/dist/chalk/index.d.ts +58 -0
  4. package/dist/chalk/index.js +138 -0
  5. package/dist/code-frame.d.ts +1 -1
  6. package/dist/code-frame.js +10 -12
  7. package/dist/compositions.d.ts +1 -1
  8. package/dist/compositions.js +38 -8
  9. package/dist/config/browser-executable.d.ts +3 -0
  10. package/dist/config/browser-executable.js +12 -0
  11. package/dist/config/browser.d.ts +3 -0
  12. package/dist/config/browser.js +18 -0
  13. package/dist/config/bundle-out-dir.d.ts +2 -0
  14. package/dist/config/bundle-out-dir.js +12 -0
  15. package/dist/config/chromium-flags.d.ts +9 -0
  16. package/dist/config/chromium-flags.js +33 -0
  17. package/dist/config/codec.d.ts +7 -0
  18. package/dist/config/codec.js +40 -0
  19. package/dist/config/concurrency.d.ts +3 -0
  20. package/dist/config/concurrency.js +12 -0
  21. package/dist/config/crf.d.ts +4 -0
  22. package/dist/config/crf.js +23 -0
  23. package/dist/config/enforce-audio-track.d.ts +2 -0
  24. package/dist/config/enforce-audio-track.js +13 -0
  25. package/dist/config/env-file.d.ts +2 -0
  26. package/dist/config/env-file.js +10 -0
  27. package/dist/config/every-nth-frame.d.ts +3 -0
  28. package/dist/config/every-nth-frame.js +20 -0
  29. package/dist/config/ffmpeg-executable.d.ts +5 -0
  30. package/dist/config/ffmpeg-executable.js +21 -0
  31. package/dist/config/frame-range.d.ts +4 -0
  32. package/dist/config/frame-range.js +35 -0
  33. package/dist/config/get-public-path.d.ts +2 -0
  34. package/dist/config/get-public-path.js +12 -0
  35. package/dist/config/image-format.d.ts +3 -0
  36. package/dist/config/image-format.js +20 -0
  37. package/dist/config/image-sequence.d.ts +3 -0
  38. package/dist/config/image-sequence.js +15 -0
  39. package/dist/config/index.d.ts +49 -0
  40. package/dist/config/index.js +176 -0
  41. package/dist/config/keyboard-shortcuts.d.ts +2 -0
  42. package/dist/config/keyboard-shortcuts.js +12 -0
  43. package/dist/config/log.d.ts +3 -0
  44. package/dist/config/log.js +12 -0
  45. package/dist/config/max-timeline-tracks.d.ts +2 -0
  46. package/dist/config/max-timeline-tracks.js +24 -0
  47. package/dist/config/muted.d.ts +2 -0
  48. package/dist/config/muted.js +13 -0
  49. package/dist/config/number-of-gif-loops.d.ts +4 -0
  50. package/dist/config/number-of-gif-loops.js +21 -0
  51. package/dist/config/output-location.d.ts +2 -0
  52. package/dist/config/output-location.js +16 -0
  53. package/dist/config/override-webpack.d.ts +5 -0
  54. package/dist/config/override-webpack.js +14 -0
  55. package/dist/config/overwrite.d.ts +2 -0
  56. package/dist/config/overwrite.js +14 -0
  57. package/dist/config/pixel-format.d.ts +3 -0
  58. package/dist/config/pixel-format.js +16 -0
  59. package/dist/config/preview-server.d.ts +2 -0
  60. package/dist/config/preview-server.js +20 -0
  61. package/dist/config/prores-profile.d.ts +3 -0
  62. package/dist/config/prores-profile.js +12 -0
  63. package/dist/config/public-dir.d.ts +2 -0
  64. package/dist/config/public-dir.js +12 -0
  65. package/dist/config/quality.d.ts +2 -0
  66. package/dist/config/quality.js +17 -0
  67. package/dist/config/scale.d.ts +3 -0
  68. package/dist/config/scale.js +15 -0
  69. package/dist/config/still-frame.d.ts +2 -0
  70. package/dist/config/still-frame.js +12 -0
  71. package/dist/config/timeout.d.ts +2 -0
  72. package/dist/config/timeout.js +17 -0
  73. package/dist/config/webpack-caching.d.ts +3 -0
  74. package/dist/config/webpack-caching.js +16 -0
  75. package/dist/download-progress.d.ts +2 -1
  76. package/dist/download-progress.js +19 -4
  77. package/dist/editor/components/AudioWaveform.js +2 -2
  78. package/dist/editor/components/AudioWaveformBar.js +1 -1
  79. package/dist/editor/components/Button.d.ts +4 -0
  80. package/dist/editor/components/Button.js +24 -0
  81. package/dist/editor/components/Canvas.js +191 -1
  82. package/dist/editor/components/CheckboardToggle.js +9 -2
  83. package/dist/editor/components/ClipboardIcon.js +1 -1
  84. package/dist/editor/components/CollapsedCompositionSelector.d.ts +4 -0
  85. package/dist/editor/components/CollapsedCompositionSelector.js +39 -0
  86. package/dist/editor/components/CompositionSelector.js +7 -45
  87. package/dist/editor/components/CompositionSelectorItem.d.ts +2 -2
  88. package/dist/editor/components/CompositionSelectorItem.js +6 -4
  89. package/dist/editor/components/ControlButton.js +1 -1
  90. package/dist/editor/components/CopyButton.js +5 -18
  91. package/dist/editor/components/CurrentComposition.js +7 -2
  92. package/dist/editor/components/Editor.js +22 -90
  93. package/dist/editor/components/EditorContent.js +3 -2
  94. package/dist/editor/components/EditorContexts.d.ts +4 -0
  95. package/dist/editor/components/EditorContexts.js +83 -0
  96. package/dist/editor/components/FpsCounter.js +1 -1
  97. package/dist/editor/components/FramePersistor.d.ts +1 -1
  98. package/dist/editor/components/GlobalKeybindings.d.ts +1 -1
  99. package/dist/editor/components/GlobalKeybindings.js +26 -11
  100. package/dist/editor/components/InitialCompositionLoader.d.ts +4 -0
  101. package/dist/editor/components/InitialCompositionLoader.js +86 -0
  102. package/dist/editor/components/KeyboardShortcutsModal.js +15 -1
  103. package/dist/editor/components/LoopToggle.js +1 -1
  104. package/dist/editor/components/Menu/MenuDivider.js +1 -1
  105. package/dist/editor/components/Menu/MenuItem.d.ts +2 -2
  106. package/dist/editor/components/Menu/MenuItem.js +4 -4
  107. package/dist/editor/components/Menu/MenuSubItem.d.ts +1 -1
  108. package/dist/editor/components/Menu/MenuSubItem.js +5 -4
  109. package/dist/editor/components/Menu/SubMenu.d.ts +2 -2
  110. package/dist/editor/components/Menu/SubMenu.js +1 -1
  111. package/dist/editor/components/Menu/styles.d.ts +3 -2
  112. package/dist/editor/components/Menu/styles.js +10 -3
  113. package/dist/editor/components/MenuBuildIndicator.d.ts +2 -0
  114. package/dist/editor/components/MenuBuildIndicator.js +26 -0
  115. package/dist/editor/components/MenuToolbar.js +109 -20
  116. package/dist/editor/components/ModalContainer.js +1 -1
  117. package/dist/editor/components/ModalHeader.js +1 -1
  118. package/dist/editor/components/MuteToggle.js +1 -1
  119. package/dist/editor/components/NewComposition/CancelButton.d.ts +2 -1
  120. package/dist/editor/components/NewComposition/CancelButton.js +1 -1
  121. package/dist/editor/components/NewComposition/ComboBox.js +15 -5
  122. package/dist/editor/components/NewComposition/CopyHint.js +1 -1
  123. package/dist/editor/components/NewComposition/InputDragger.d.ts +2 -1
  124. package/dist/editor/components/NewComposition/InputDragger.js +2 -2
  125. package/dist/editor/components/NewComposition/MenuContent.d.ts +1 -1
  126. package/dist/editor/components/NewComposition/MenuContent.js +43 -8
  127. package/dist/editor/components/NewComposition/NewCompAspectRatio.js +1 -1
  128. package/dist/editor/components/NewComposition/NewCompDuration.js +1 -1
  129. package/dist/editor/components/NewComposition/NewComposition.d.ts +1 -1
  130. package/dist/editor/components/NewComposition/NewComposition.js +4 -4
  131. package/dist/editor/components/NewComposition/RemInput.js +1 -1
  132. package/dist/editor/components/NewComposition/ToggleAspectRatio.js +1 -1
  133. package/dist/editor/components/NewComposition/ValidationMessage.js +2 -2
  134. package/dist/editor/components/NewComposition/new-comp-layout.d.ts +1 -1
  135. package/dist/editor/components/NoRegisterRoot.d.ts +2 -0
  136. package/dist/editor/components/NoRegisterRoot.js +41 -0
  137. package/dist/editor/components/Notifications/ColorDot.d.ts +4 -0
  138. package/dist/editor/components/Notifications/ColorDot.js +22 -0
  139. package/dist/editor/components/Notifications/Notification.d.ts +8 -0
  140. package/dist/editor/components/Notifications/Notification.js +31 -0
  141. package/dist/editor/components/Notifications/NotificationCenter.d.ts +13 -0
  142. package/dist/editor/components/Notifications/NotificationCenter.js +40 -0
  143. package/dist/editor/components/Notifications/ServerDisconnected.d.ts +6 -0
  144. package/dist/editor/components/Notifications/ServerDisconnected.js +59 -0
  145. package/dist/editor/components/PlayPause.js +121 -23
  146. package/dist/editor/components/PlaybackKeyboardShortcutsManager.d.ts +1 -1
  147. package/dist/editor/components/PlaybackKeyboardShortcutsManager.js +24 -21
  148. package/dist/editor/components/PlaybackRatePersistor.d.ts +1 -1
  149. package/dist/editor/components/PlaybackRateSelector.js +7 -2
  150. package/dist/editor/components/Preview.d.ts +2 -1
  151. package/dist/editor/components/Preview.js +27 -16
  152. package/dist/editor/components/PreviewToolbar.js +4 -2
  153. package/dist/editor/components/PreviewZoomControls.d.ts +2 -0
  154. package/dist/editor/components/PreviewZoomControls.js +67 -0
  155. package/dist/editor/components/ResetZoomButton.d.ts +4 -0
  156. package/dist/editor/components/ResetZoomButton.js +9 -0
  157. package/dist/editor/components/RichTimelineToggle.js +1 -1
  158. package/dist/editor/components/SizeSelector.d.ts +3 -2
  159. package/dist/editor/components/SizeSelector.js +58 -18
  160. package/dist/editor/components/Splitter/SplitterContainer.d.ts +1 -1
  161. package/dist/editor/components/Splitter/SplitterContainer.js +1 -1
  162. package/dist/editor/components/Splitter/SplitterElement.js +5 -2
  163. package/dist/editor/components/Splitter/SplitterHandle.d.ts +4 -1
  164. package/dist/editor/components/Splitter/SplitterHandle.js +28 -7
  165. package/dist/editor/components/Thumbnail.d.ts +1 -1
  166. package/dist/editor/components/Thumbnail.js +1 -1
  167. package/dist/editor/components/TimeValue.js +9 -5
  168. package/dist/editor/components/Timeline/LoopedIndicator.js +2 -2
  169. package/dist/editor/components/Timeline/LoopedTimelineIndicators.js +3 -3
  170. package/dist/editor/components/Timeline/MaxTimelineTracks.d.ts +1 -0
  171. package/dist/editor/components/Timeline/MaxTimelineTracks.js +6 -4
  172. package/dist/editor/components/Timeline/Timeline.js +12 -4
  173. package/dist/editor/components/Timeline/TimelineCollapseToggle.js +2 -2
  174. package/dist/editor/components/Timeline/TimelineDragHandler.js +123 -25
  175. package/dist/editor/components/Timeline/TimelineInOutPointer.js +4 -3
  176. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js +1 -1
  177. package/dist/editor/components/Timeline/TimelineList.d.ts +2 -2
  178. package/dist/editor/components/Timeline/TimelineList.js +7 -4
  179. package/dist/editor/components/Timeline/TimelineListItem.d.ts +3 -2
  180. package/dist/editor/components/Timeline/TimelineListItem.js +10 -5
  181. package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.d.ts +2 -0
  182. package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.js +76 -0
  183. package/dist/editor/components/Timeline/TimelineScrollable.d.ts +4 -0
  184. package/dist/editor/components/Timeline/TimelineScrollable.js +25 -0
  185. package/dist/editor/components/Timeline/TimelineSequence.d.ts +1 -1
  186. package/dist/editor/components/Timeline/TimelineSequence.js +1 -1
  187. package/dist/editor/components/Timeline/TimelineSequenceFrame.js +1 -1
  188. package/dist/editor/components/Timeline/TimelineSlider.d.ts +3 -0
  189. package/dist/editor/components/Timeline/TimelineSlider.js +35 -2
  190. package/dist/editor/components/Timeline/TimelineSliderHandle.js +1 -3
  191. package/dist/editor/components/Timeline/TimelineTimeIndicators.d.ts +5 -0
  192. package/dist/editor/components/Timeline/TimelineTimeIndicators.js +168 -0
  193. package/dist/editor/components/Timeline/TimelineTracks.d.ts +2 -2
  194. package/dist/editor/components/Timeline/TimelineTracks.js +14 -9
  195. package/dist/editor/components/Timeline/TimelineVideoInfo.js +1 -1
  196. package/dist/editor/components/Timeline/TimelineZoomControls.d.ts +2 -0
  197. package/dist/editor/components/Timeline/TimelineZoomControls.js +45 -0
  198. package/dist/editor/components/Timeline/imperative-state.d.ts +12 -0
  199. package/dist/editor/components/Timeline/imperative-state.js +39 -0
  200. package/dist/editor/components/Timeline/is-collapsed.d.ts +2 -2
  201. package/dist/editor/components/Timeline/timeline-refs.d.ts +2 -0
  202. package/dist/editor/components/Timeline/timeline-refs.js +3 -1
  203. package/dist/editor/components/Timeline/timeline-scroll-logic.d.ts +44 -0
  204. package/dist/editor/components/Timeline/timeline-scroll-logic.js +218 -0
  205. package/dist/editor/components/TimelineInOutToggle.d.ts +2 -2
  206. package/dist/editor/components/TimelineInOutToggle.js +85 -20
  207. package/dist/editor/components/TopPanel.js +24 -1
  208. package/dist/editor/components/UpdateCheck.d.ts +1 -1
  209. package/dist/editor/components/UpdateCheck.js +1 -1
  210. package/dist/editor/components/UpdateModal/UpdateModal.d.ts +1 -1
  211. package/dist/editor/components/UpdateModal/UpdateModal.js +1 -1
  212. package/dist/editor/components/ZoomPersistor.d.ts +4 -0
  213. package/dist/editor/components/ZoomPersistor.js +37 -0
  214. package/dist/editor/components/layout.js +4 -4
  215. package/dist/editor/helpers/calculate-timeline.d.ts +2 -2
  216. package/dist/editor/helpers/colors.d.ts +2 -1
  217. package/dist/editor/helpers/colors.js +2 -1
  218. package/dist/editor/helpers/copy-text.d.ts +1 -1
  219. package/dist/editor/helpers/copy-text.js +5 -4
  220. package/dist/editor/helpers/create-folder-tree.d.ts +2 -2
  221. package/dist/editor/helpers/get-effective-translation.d.ts +26 -0
  222. package/dist/editor/helpers/get-effective-translation.js +45 -0
  223. package/dist/editor/helpers/get-left-of-timeline-slider.d.ts +1 -0
  224. package/dist/editor/helpers/get-left-of-timeline-slider.js +7 -4
  225. package/dist/editor/helpers/get-sequence-visible-range.d.ts +1 -1
  226. package/dist/editor/helpers/get-timeline-nestedness.d.ts +1 -1
  227. package/dist/editor/helpers/get-timeline-sequence-hash.d.ts +1 -1
  228. package/dist/editor/helpers/get-timeline-sequence-layout.d.ts +1 -1
  229. package/dist/editor/helpers/get-timeline-sequence-layout.js +29 -9
  230. package/dist/editor/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
  231. package/dist/editor/helpers/is-composition-still.d.ts +1 -1
  232. package/dist/editor/helpers/is-current-selected-still.d.ts +4 -0
  233. package/dist/editor/helpers/is-current-selected-still.js +15 -1
  234. package/dist/editor/helpers/normalize-wheel.d.ts +5 -0
  235. package/dist/editor/helpers/normalize-wheel.js +20 -0
  236. package/dist/editor/helpers/normalize-zoom.d.ts +1 -0
  237. package/dist/editor/helpers/normalize-zoom.js +16 -0
  238. package/dist/editor/helpers/pick-color.d.ts +1 -0
  239. package/dist/editor/helpers/pick-color.js +36 -0
  240. package/dist/editor/helpers/use-compact-ui.d.ts +1 -0
  241. package/dist/editor/helpers/use-compact-ui.js +18 -0
  242. package/dist/editor/helpers/use-keybinding.d.ts +8 -2
  243. package/dist/editor/helpers/use-keybinding.js +23 -6
  244. package/dist/editor/helpers/validate-new-comp-data.d.ts +1 -1
  245. package/dist/editor/icons/Checkmark.js +1 -1
  246. package/dist/editor/icons/caret.d.ts +1 -1
  247. package/dist/editor/icons/caret.js +4 -4
  248. package/dist/editor/icons/film.d.ts +2 -1
  249. package/dist/editor/icons/film.js +1 -1
  250. package/dist/editor/icons/folder.d.ts +2 -1
  251. package/dist/editor/icons/folder.js +2 -2
  252. package/dist/editor/icons/jump-to-start.d.ts +2 -0
  253. package/dist/editor/icons/jump-to-start.js +8 -0
  254. package/dist/editor/icons/keys.js +3 -3
  255. package/dist/editor/icons/lock.d.ts +2 -1
  256. package/dist/editor/icons/lock.js +2 -2
  257. package/dist/editor/icons/media-volume.js +2 -2
  258. package/dist/editor/icons/minus.d.ts +3 -0
  259. package/dist/editor/icons/minus.js +8 -0
  260. package/dist/editor/icons/pause.d.ts +2 -1
  261. package/dist/editor/icons/pause.js +1 -1
  262. package/dist/editor/icons/play.d.ts +2 -1
  263. package/dist/editor/icons/play.js +1 -1
  264. package/dist/editor/icons/plus.d.ts +3 -0
  265. package/dist/editor/icons/plus.js +8 -0
  266. package/dist/editor/icons/step-back.d.ts +2 -1
  267. package/dist/editor/icons/step-back.js +1 -1
  268. package/dist/editor/icons/step-forward.d.ts +2 -1
  269. package/dist/editor/icons/step-forward.js +1 -1
  270. package/dist/editor/icons/still.d.ts +2 -1
  271. package/dist/editor/icons/still.js +1 -1
  272. package/dist/editor/icons/timeline.d.ts +2 -1
  273. package/dist/editor/icons/timeline.js +1 -1
  274. package/dist/editor/icons/timelineInOutPointer.d.ts +2 -1
  275. package/dist/editor/icons/timelineInOutPointer.js +2 -2
  276. package/dist/editor/state/folders.d.ts +11 -0
  277. package/dist/editor/state/folders.js +23 -0
  278. package/dist/editor/state/highest-z-index.js +2 -2
  279. package/dist/editor/state/in-out.d.ts +12 -0
  280. package/dist/editor/state/in-out.js +23 -0
  281. package/dist/editor/state/keybindings.js +4 -2
  282. package/dist/editor/state/modals.d.ts +2 -2
  283. package/dist/editor/state/preview-size.d.ts +6 -3
  284. package/dist/editor/state/preview-size.js +39 -5
  285. package/dist/editor/state/render-frame.js +12 -3
  286. package/dist/editor/state/sidebar.d.ts +12 -0
  287. package/dist/editor/state/sidebar.js +40 -0
  288. package/dist/editor/state/timeline-zoom.d.ts +10 -0
  289. package/dist/editor/state/timeline-zoom.js +38 -0
  290. package/dist/editor/state/z-index.js +7 -2
  291. package/dist/event-source-events.d.ts +6 -0
  292. package/dist/event-source-events.js +2 -0
  293. package/dist/event-source.d.ts +1 -0
  294. package/dist/event-source.js +28 -0
  295. package/dist/find-closest-package-json.d.ts +2 -0
  296. package/dist/find-closest-package-json.js +35 -0
  297. package/dist/format-bytes.d.ts +6 -0
  298. package/dist/format-bytes.js +103 -0
  299. package/dist/get-cli-options.d.ts +15 -8
  300. package/dist/get-cli-options.js +56 -46
  301. package/dist/get-composition-id.d.ts +1 -2
  302. package/dist/get-composition-id.js +2 -3
  303. package/dist/get-config-file-name.d.ts +1 -1
  304. package/dist/get-config-file-name.js +9 -6
  305. package/dist/get-env.js +6 -4
  306. package/dist/get-filename.d.ts +4 -3
  307. package/dist/get-filename.js +5 -5
  308. package/dist/get-final-output-codec.d.ts +6 -0
  309. package/dist/get-final-output-codec.js +63 -0
  310. package/dist/get-input-props.d.ts +1 -1
  311. package/dist/get-input-props.js +10 -1
  312. package/dist/get-latest-remotion-version.d.ts +1 -0
  313. package/dist/get-latest-remotion-version.js +31 -0
  314. package/dist/handle-common-errors.js +5 -0
  315. package/dist/image-formats.d.ts +3 -2
  316. package/dist/image-formats.js +6 -4
  317. package/dist/index.d.ts +79 -22
  318. package/dist/index.js +33 -15
  319. package/dist/initialize-render-cli.d.ts +1 -1
  320. package/dist/initialize-render-cli.js +8 -3
  321. package/dist/lambda-command.d.ts +1 -1
  322. package/dist/lambda-command.js +8 -4
  323. package/dist/list-of-remotion-packages.d.ts +1 -0
  324. package/dist/list-of-remotion-packages.js +20 -0
  325. package/dist/load-config.d.ts +1 -1
  326. package/dist/load-config.js +16 -5
  327. package/dist/log.js +11 -13
  328. package/dist/parse-command-line.d.ts +8 -1
  329. package/dist/parse-command-line.js +56 -28
  330. package/dist/prepare-entry-point.d.ts +12 -0
  331. package/dist/prepare-entry-point.js +37 -0
  332. package/dist/preview-server/dev-middleware/compatible-api.d.ts +7 -0
  333. package/dist/preview-server/dev-middleware/compatible-api.js +20 -0
  334. package/dist/preview-server/dev-middleware/get-paths.d.ts +7 -0
  335. package/dist/preview-server/dev-middleware/get-paths.js +19 -0
  336. package/dist/preview-server/dev-middleware/index.d.ts +3 -0
  337. package/dist/preview-server/dev-middleware/index.js +27 -0
  338. package/dist/preview-server/dev-middleware/is-color-supported.d.ts +1 -0
  339. package/dist/preview-server/dev-middleware/is-color-supported.js +37 -0
  340. package/dist/preview-server/dev-middleware/middleware.d.ts +10 -0
  341. package/dist/preview-server/dev-middleware/middleware.js +224 -0
  342. package/dist/preview-server/dev-middleware/range-parser.d.ts +15 -0
  343. package/dist/preview-server/dev-middleware/range-parser.js +96 -0
  344. package/dist/preview-server/dev-middleware/ready.d.ts +3 -0
  345. package/dist/preview-server/dev-middleware/ready.js +11 -0
  346. package/dist/preview-server/dev-middleware/setup-hooks.d.ts +2 -0
  347. package/dist/preview-server/dev-middleware/setup-hooks.js +42 -0
  348. package/dist/preview-server/dev-middleware/setup-output-filesystem.d.ts +2 -0
  349. package/dist/preview-server/dev-middleware/setup-output-filesystem.js +13 -0
  350. package/dist/preview-server/dev-middleware/types.d.ts +10 -0
  351. package/dist/preview-server/dev-middleware/types.js +2 -0
  352. package/dist/preview-server/error-overlay/entry-basic.d.ts +1 -0
  353. package/dist/preview-server/error-overlay/entry-basic.js +21 -0
  354. package/dist/preview-server/error-overlay/react-overlay/effects/format-warning.d.ts +11 -0
  355. package/dist/preview-server/error-overlay/react-overlay/effects/format-warning.js +41 -0
  356. package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.d.ts +7 -0
  357. package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.js +46 -0
  358. package/dist/preview-server/error-overlay/react-overlay/effects/proxy-console.d.ts +24 -0
  359. package/dist/preview-server/error-overlay/react-overlay/effects/proxy-console.js +64 -0
  360. package/dist/preview-server/error-overlay/react-overlay/effects/resolve-file-source.d.ts +3 -0
  361. package/dist/preview-server/error-overlay/react-overlay/effects/resolve-file-source.js +31 -0
  362. package/dist/preview-server/error-overlay/react-overlay/effects/stack-trace-limit.d.ts +3 -0
  363. package/dist/preview-server/error-overlay/react-overlay/effects/stack-trace-limit.js +43 -0
  364. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-error.d.ts +4 -0
  365. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-error.js +45 -0
  366. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-rejection.d.ts +4 -0
  367. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-rejection.js +41 -0
  368. package/dist/preview-server/error-overlay/react-overlay/index.d.ts +2 -0
  369. package/dist/preview-server/error-overlay/react-overlay/index.js +21 -0
  370. package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.d.ts +8 -0
  371. package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.js +87 -0
  372. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.d.ts +1 -0
  373. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.js +21 -0
  374. package/dist/preview-server/error-overlay/react-overlay/utils/get-lines-around.d.ts +14 -0
  375. package/dist/preview-server/error-overlay/react-overlay/utils/get-lines-around.js +24 -0
  376. package/dist/preview-server/error-overlay/react-overlay/utils/get-source-map.d.ts +7 -0
  377. package/dist/preview-server/error-overlay/react-overlay/utils/get-source-map.js +50 -0
  378. package/dist/preview-server/error-overlay/react-overlay/utils/get-stack-frames.d.ts +2 -0
  379. package/dist/preview-server/error-overlay/react-overlay/utils/get-stack-frames.js +27 -0
  380. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.d.ts +16 -0
  381. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.js +483 -0
  382. package/dist/preview-server/error-overlay/react-overlay/utils/parser.d.ts +2 -0
  383. package/dist/preview-server/error-overlay/react-overlay/utils/parser.js +117 -0
  384. package/dist/preview-server/error-overlay/react-overlay/utils/stack-frame.d.ts +40 -0
  385. package/dist/preview-server/error-overlay/react-overlay/utils/stack-frame.js +31 -0
  386. package/dist/preview-server/error-overlay/react-overlay/utils/unmapper.d.ts +2 -0
  387. package/dist/preview-server/error-overlay/react-overlay/utils/unmapper.js +64 -0
  388. package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.d.ts +4 -0
  389. package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.js +32 -0
  390. package/dist/preview-server/error-overlay/remotion-overlay/Button.d.ts +7 -0
  391. package/dist/preview-server/error-overlay/remotion-overlay/Button.js +31 -0
  392. package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.d.ts +6 -0
  393. package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.js +30 -0
  394. package/dist/preview-server/error-overlay/remotion-overlay/DismissButton.d.ts +2 -0
  395. package/dist/preview-server/error-overlay/remotion-overlay/DismissButton.js +23 -0
  396. package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.d.ts +6 -0
  397. package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.js +48 -0
  398. package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.d.ts +5 -0
  399. package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.js +61 -0
  400. package/dist/preview-server/error-overlay/remotion-overlay/ErrorMessage.d.ts +4 -0
  401. package/dist/preview-server/error-overlay/remotion-overlay/ErrorMessage.js +69 -0
  402. package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.d.ts +6 -0
  403. package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.js +37 -0
  404. package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.d.ts +6 -0
  405. package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.js +35 -0
  406. package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.d.ts +6 -0
  407. package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.js +109 -0
  408. package/dist/preview-server/error-overlay/remotion-overlay/Overlay.d.ts +14 -0
  409. package/dist/preview-server/error-overlay/remotion-overlay/Overlay.js +50 -0
  410. package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.d.ts +5 -0
  411. package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.js +31 -0
  412. package/dist/preview-server/error-overlay/remotion-overlay/ShortcutHint.d.ts +5 -0
  413. package/dist/preview-server/error-overlay/remotion-overlay/ShortcutHint.js +16 -0
  414. package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.d.ts +8 -0
  415. package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.js +50 -0
  416. package/dist/preview-server/error-overlay/remotion-overlay/Symbolicating.d.ts +2 -0
  417. package/dist/preview-server/error-overlay/remotion-overlay/Symbolicating.js +8 -0
  418. package/dist/preview-server/error-overlay/remotion-overlay/carets.d.ts +5 -0
  419. package/dist/preview-server/error-overlay/remotion-overlay/carets.js +12 -0
  420. package/dist/preview-server/error-overlay/remotion-overlay/format-location.d.ts +1 -0
  421. package/dist/preview-server/error-overlay/remotion-overlay/format-location.js +10 -0
  422. package/dist/preview-server/error-overlay/remotion-overlay/get-help-link.d.ts +5 -0
  423. package/dist/preview-server/error-overlay/remotion-overlay/get-help-link.js +43 -0
  424. package/dist/preview-server/error-overlay/remotion-overlay/index.d.ts +1 -0
  425. package/dist/preview-server/error-overlay/remotion-overlay/index.js +18 -0
  426. package/dist/preview-server/get-package-manager.d.ts +10 -0
  427. package/dist/preview-server/get-package-manager.js +47 -0
  428. package/dist/preview-server/hot-middleware/client.d.ts +19 -0
  429. package/dist/preview-server/hot-middleware/client.js +177 -0
  430. package/dist/preview-server/hot-middleware/index.d.ts +8 -0
  431. package/dist/preview-server/hot-middleware/index.js +150 -0
  432. package/dist/preview-server/hot-middleware/process-update.d.ts +12 -0
  433. package/dist/preview-server/hot-middleware/process-update.js +144 -0
  434. package/dist/preview-server/hot-middleware/strip-ansi.d.ts +1 -0
  435. package/dist/preview-server/hot-middleware/strip-ansi.js +21 -0
  436. package/dist/preview-server/hot-middleware/types.d.ts +27 -0
  437. package/dist/preview-server/hot-middleware/types.js +10 -0
  438. package/dist/preview-server/live-events.d.ts +8 -0
  439. package/dist/preview-server/live-events.js +41 -0
  440. package/dist/preview-server/project-info.d.ts +5 -0
  441. package/dist/preview-server/project-info.js +22 -0
  442. package/dist/preview-server/routes.d.ts +12 -0
  443. package/dist/preview-server/routes.js +161 -0
  444. package/dist/preview-server/serve-static.d.ts +9 -0
  445. package/dist/preview-server/serve-static.js +77 -0
  446. package/dist/preview-server/start-server.d.ts +15 -0
  447. package/dist/preview-server/start-server.js +81 -0
  448. package/dist/preview-server/update-available.d.ts +11 -0
  449. package/dist/preview-server/update-available.js +47 -0
  450. package/dist/preview.d.ts +1 -1
  451. package/dist/preview.js +38 -8
  452. package/dist/previewEntry.js +12 -2
  453. package/dist/print-error.js +6 -8
  454. package/dist/print-help.js +11 -14
  455. package/dist/progress-bar.d.ts +7 -4
  456. package/dist/progress-bar.js +19 -15
  457. package/dist/render.d.ts +1 -1
  458. package/dist/render.js +88 -55
  459. package/dist/setup-cache.d.ts +16 -2
  460. package/dist/setup-cache.js +53 -14
  461. package/dist/smooth-zoom.d.ts +4 -0
  462. package/dist/smooth-zoom.js +20 -0
  463. package/dist/still.d.ts +1 -1
  464. package/dist/still.js +93 -43
  465. package/dist/truthy.d.ts +3 -0
  466. package/dist/truthy.js +7 -0
  467. package/dist/upgrade.d.ts +1 -1
  468. package/dist/upgrade.js +18 -32
  469. package/dist/user-passed-output-location.d.ts +5 -1
  470. package/dist/user-passed-output-location.js +14 -7
  471. package/dist/versions.d.ts +2 -2
  472. package/dist/versions.js +16 -24
  473. package/dist/warn-about-ffmpeg-version.d.ts +1 -1
  474. package/package.json +15 -16
  475. package/tsconfig.json +2 -1
  476. package/vitest.config.ts +9 -0
  477. package/web/favicon.png +0 -0
  478. package/dist/editor/components/LoadingIndicator.d.ts +0 -2
  479. package/dist/editor/components/LoadingIndicator.js +0 -35
@@ -1,28 +1,35 @@
1
- import { ChromiumOptions } from '@remotion/renderer';
2
- import { BrowserExecutable, FrameRange } from 'remotion';
1
+ import type { BrowserExecutable, ChromiumOptions, FrameRange } from '@remotion/renderer';
2
+ export declare const getAndValidateAbsoluteOutputFile: (relativeOutputLocation: string, overwrite: boolean) => string;
3
3
  export declare const getCliOptions: (options: {
4
4
  isLambda: boolean;
5
- type: 'still' | 'series';
5
+ type: 'still' | 'series' | 'get-compositions';
6
6
  }) => Promise<{
7
7
  puppeteerTimeout: number;
8
8
  parallelism: number | null;
9
9
  frameRange: FrameRange | null;
10
10
  shouldOutputImageSequence: boolean;
11
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv";
12
- overwrite: boolean;
11
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
13
12
  inputProps: object;
14
13
  envVariables: Record<string, string>;
15
14
  quality: number | undefined;
16
- absoluteOutputFile: string | null;
17
- browser: import("remotion").Browser;
15
+ browser: import("@remotion/renderer").Browser;
18
16
  crf: number | null;
19
17
  pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
20
18
  imageFormat: "png" | "jpeg" | "none";
21
19
  proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
20
+ everyNthFrame: number;
21
+ numberOfGifLoops: number | null;
22
22
  stillFrame: number;
23
23
  browserExecutable: BrowserExecutable;
24
- ffmpegExecutable: import("remotion").FfmpegExecutable;
24
+ ffmpegExecutable: import("@remotion/renderer").FfmpegExecutable;
25
+ ffprobeExecutable: import("@remotion/renderer").FfmpegExecutable;
25
26
  logLevel: "verbose" | "info" | "warn" | "error";
26
27
  scale: number;
27
28
  chromiumOptions: ChromiumOptions;
29
+ overwrite: boolean;
30
+ port: number | null;
31
+ muted: boolean;
32
+ enforceAudioTrack: boolean;
33
+ keyboardShortcutsEnables: boolean;
34
+ publicDir: string | null;
28
35
  }>;
@@ -3,19 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getCliOptions = void 0;
6
+ exports.getCliOptions = exports.getAndValidateAbsoluteOutputFile = void 0;
7
7
  const renderer_1 = require("@remotion/renderer");
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const path_1 = __importDefault(require("path"));
10
- const remotion_1 = require("remotion");
10
+ const config_1 = require("./config");
11
11
  const get_env_1 = require("./get-env");
12
- const get_filename_1 = require("./get-filename");
12
+ const get_final_output_codec_1 = require("./get-final-output-codec");
13
13
  const get_input_props_1 = require("./get-input-props");
14
14
  const image_formats_1 = require("./image-formats");
15
15
  const log_1 = require("./log");
16
16
  const user_passed_output_location_1 = require("./user-passed-output-location");
17
17
  const getAndValidateFrameRange = () => {
18
- const frameRange = remotion_1.Internals.getRange();
18
+ const frameRange = config_1.ConfigInternals.getRange();
19
19
  if (typeof frameRange === 'number') {
20
20
  log_1.Log.warn('Selected a single frame. Assuming you want to output an image.');
21
21
  log_1.Log.warn(`If you want to render a video, pass a range: '--frames=${frameRange}-${frameRange}'.`);
@@ -24,16 +24,15 @@ const getAndValidateFrameRange = () => {
24
24
  return frameRange;
25
25
  };
26
26
  const getFinalCodec = async (options) => {
27
- const userCodec = remotion_1.Internals.getOutputCodecOrUndefined();
28
- const codec = remotion_1.Internals.getFinalOutputCodec({
27
+ const userCodec = config_1.ConfigInternals.getOutputCodecOrUndefined();
28
+ const codec = (0, get_final_output_codec_1.getFinalOutputCodec)({
29
29
  codec: userCodec,
30
30
  fileExtension: options.isLambda
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
- const ffmpegExecutable = remotion_1.Internals.getCustomFfmpegExecutable();
35
+ const ffmpegExecutable = config_1.ConfigInternals.getCustomFfmpegExecutable();
37
36
  if (codec === 'vp8' &&
38
37
  !(await renderer_1.RenderInternals.ffmpegHasFeature({
39
38
  feature: 'enable-libvpx',
@@ -63,43 +62,46 @@ const getFinalCodec = async (options) => {
63
62
  }
64
63
  return codec;
65
64
  };
66
- const getBrowser = () => { var _a; return (_a = remotion_1.Internals.getBrowser()) !== null && _a !== void 0 ? _a : remotion_1.Internals.DEFAULT_BROWSER; };
67
- const getAndValidateAbsoluteOutputFile = (outputFile, overwrite) => {
68
- const absoluteOutputFile = path_1.default.resolve(process.cwd(), outputFile);
65
+ const getBrowser = () => { var _a; return (_a = config_1.ConfigInternals.getBrowser()) !== null && _a !== void 0 ? _a : renderer_1.RenderInternals.DEFAULT_BROWSER; };
66
+ const getAndValidateAbsoluteOutputFile = (relativeOutputLocation, overwrite) => {
67
+ const absoluteOutputFile = path_1.default.resolve(process.cwd(), relativeOutputLocation);
69
68
  if (fs_1.default.existsSync(absoluteOutputFile) && !overwrite) {
70
69
  log_1.Log.error(`File at ${absoluteOutputFile} already exists. Use --overwrite to overwrite.`);
71
70
  process.exit(1);
72
71
  }
73
72
  return absoluteOutputFile;
74
73
  };
74
+ exports.getAndValidateAbsoluteOutputFile = getAndValidateAbsoluteOutputFile;
75
75
  const getAndValidateShouldOutputImageSequence = async ({ frameRange, isLambda, }) => {
76
- const shouldOutputImageSequence = remotion_1.Internals.getShouldOutputImageSequence(frameRange);
76
+ const shouldOutputImageSequence = config_1.ConfigInternals.getShouldOutputImageSequence(frameRange);
77
77
  // When parsing options locally, we don't need FFMPEG because the render will happen on Lambda
78
78
  if (!shouldOutputImageSequence && !isLambda) {
79
- await renderer_1.RenderInternals.validateFfmpeg(remotion_1.Internals.getCustomFfmpegExecutable());
79
+ await renderer_1.RenderInternals.validateFfmpeg(config_1.ConfigInternals.getCustomFfmpegExecutable());
80
80
  }
81
81
  return shouldOutputImageSequence;
82
82
  };
83
83
  const getAndValidateCrf = (shouldOutputImageSequence, codec) => {
84
- const crf = shouldOutputImageSequence ? null : remotion_1.Internals.getActualCrf(codec);
84
+ const crf = shouldOutputImageSequence
85
+ ? null
86
+ : config_1.ConfigInternals.getActualCrf(codec);
85
87
  if (crf !== null) {
86
- remotion_1.Internals.validateSelectedCrfAndCodecCombination(crf, codec);
88
+ renderer_1.RenderInternals.validateSelectedCrfAndCodecCombination(crf, codec);
87
89
  }
88
90
  return crf;
89
91
  };
90
92
  const getAndValidatePixelFormat = (codec) => {
91
- const pixelFormat = remotion_1.Internals.getPixelFormat();
92
- remotion_1.Internals.validateSelectedPixelFormatAndCodecCombination(pixelFormat, codec);
93
+ const pixelFormat = config_1.ConfigInternals.getPixelFormat();
94
+ renderer_1.RenderInternals.validateSelectedPixelFormatAndCodecCombination(pixelFormat, codec);
93
95
  return pixelFormat;
94
96
  };
95
97
  const getAndValidateProResProfile = (actualCodec) => {
96
- const proResProfile = remotion_1.Internals.getProResProfile();
97
- remotion_1.Internals.validateSelectedCodecAndProResCombination(actualCodec, proResProfile);
98
+ const proResProfile = config_1.ConfigInternals.getProResProfile();
99
+ renderer_1.RenderInternals.validateSelectedCodecAndProResCombination(actualCodec, proResProfile);
98
100
  return proResProfile;
99
101
  };
100
102
  const getAndValidateImageFormat = ({ shouldOutputImageSequence, codec, pixelFormat, }) => {
101
103
  const imageFormat = (0, image_formats_1.getImageFormat)(shouldOutputImageSequence ? undefined : codec);
102
- remotion_1.Internals.validateSelectedPixelFormatAndImageFormatCombination(pixelFormat, imageFormat);
104
+ renderer_1.RenderInternals.validateSelectedPixelFormatAndImageFormatCombination(pixelFormat, imageFormat);
103
105
  return imageFormat;
104
106
  };
105
107
  const getAndValidateBrowser = async (browserExecutable) => {
@@ -117,21 +119,18 @@ const getAndValidateBrowser = async (browserExecutable) => {
117
119
  const getCliOptions = async (options) => {
118
120
  var _a;
119
121
  const frameRange = getAndValidateFrameRange();
120
- const codec = await getFinalCodec({ isLambda: options.isLambda });
122
+ const codec = options.type === 'get-compositions'
123
+ ? 'h264'
124
+ : await getFinalCodec({
125
+ isLambda: options.isLambda,
126
+ });
121
127
  const shouldOutputImageSequence = options.type === 'still'
122
128
  ? true
123
129
  : await getAndValidateShouldOutputImageSequence({
124
130
  frameRange,
125
131
  isLambda: options.isLambda,
126
132
  });
127
- const outputFile = options.isLambda
128
- ? null
129
- : (0, get_filename_1.getOutputFilename)({
130
- codec,
131
- imageSequence: shouldOutputImageSequence,
132
- type: options.type,
133
- });
134
- const overwrite = remotion_1.Internals.getShouldOverwrite();
133
+ const overwrite = config_1.ConfigInternals.getShouldOverwrite();
135
134
  const crf = getAndValidateCrf(shouldOutputImageSequence, codec);
136
135
  const pixelFormat = getAndValidatePixelFormat(codec);
137
136
  const imageFormat = getAndValidateImageFormat({
@@ -140,39 +139,50 @@ const getCliOptions = async (options) => {
140
139
  pixelFormat,
141
140
  });
142
141
  const proResProfile = getAndValidateProResProfile(codec);
143
- const browserExecutable = remotion_1.Internals.getBrowserExecutable();
144
- const ffmpegExecutable = remotion_1.Internals.getCustomFfmpegExecutable();
145
- const scale = remotion_1.Internals.getScale();
142
+ const browserExecutable = config_1.ConfigInternals.getBrowserExecutable();
143
+ const ffmpegExecutable = config_1.ConfigInternals.getCustomFfmpegExecutable();
144
+ const ffprobeExecutable = config_1.ConfigInternals.getCustomFfprobeExecutable();
145
+ const scale = config_1.ConfigInternals.getScale();
146
+ const port = config_1.ConfigInternals.getServerPort();
146
147
  const chromiumOptions = {
147
- disableWebSecurity: remotion_1.Internals.getChromiumDisableWebSecurity(),
148
- ignoreCertificateErrors: remotion_1.Internals.getIgnoreCertificateErrors(),
149
- headless: remotion_1.Internals.getChromiumHeadlessMode(),
150
- gl: (_a = remotion_1.Internals.getChromiumOpenGlRenderer()) !== null && _a !== void 0 ? _a : remotion_1.Internals.DEFAULT_OPENGL_RENDERER,
148
+ disableWebSecurity: config_1.ConfigInternals.getChromiumDisableWebSecurity(),
149
+ ignoreCertificateErrors: config_1.ConfigInternals.getIgnoreCertificateErrors(),
150
+ headless: config_1.ConfigInternals.getChromiumHeadlessMode(),
151
+ gl: (_a = config_1.ConfigInternals.getChromiumOpenGlRenderer()) !== null && _a !== void 0 ? _a : renderer_1.RenderInternals.DEFAULT_OPENGL_RENDERER,
151
152
  };
153
+ const everyNthFrame = config_1.ConfigInternals.getAndValidateEveryNthFrame(codec);
154
+ const numberOfGifLoops = config_1.ConfigInternals.getAndValidateNumberOfGifLoops(codec);
155
+ const parallelism = config_1.ConfigInternals.getConcurrency();
156
+ renderer_1.RenderInternals.validateConcurrency(parallelism, 'concurrency');
152
157
  return {
153
- puppeteerTimeout: remotion_1.Internals.getCurrentPuppeteerTimeout(),
154
- parallelism: remotion_1.Internals.getConcurrency(),
158
+ puppeteerTimeout: config_1.ConfigInternals.getCurrentPuppeteerTimeout(),
159
+ parallelism,
155
160
  frameRange,
156
161
  shouldOutputImageSequence,
157
162
  codec,
158
- overwrite: remotion_1.Internals.getShouldOverwrite(),
159
- inputProps: (0, get_input_props_1.getInputProps)(),
163
+ inputProps: (0, get_input_props_1.getInputProps)(() => undefined),
160
164
  envVariables: await (0, get_env_1.getEnvironmentVariables)(),
161
- quality: remotion_1.Internals.getQuality(),
162
- absoluteOutputFile: outputFile
163
- ? getAndValidateAbsoluteOutputFile(outputFile, overwrite)
164
- : null,
165
+ quality: config_1.ConfigInternals.getQuality(),
165
166
  browser: await getAndValidateBrowser(browserExecutable),
166
167
  crf,
167
168
  pixelFormat,
168
169
  imageFormat,
169
170
  proResProfile,
170
- stillFrame: remotion_1.Internals.getStillFrame(),
171
+ everyNthFrame,
172
+ numberOfGifLoops,
173
+ stillFrame: config_1.ConfigInternals.getStillFrame(),
171
174
  browserExecutable,
172
175
  ffmpegExecutable,
173
- logLevel: remotion_1.Internals.Logging.getLogLevel(),
176
+ ffprobeExecutable,
177
+ logLevel: config_1.ConfigInternals.Logging.getLogLevel(),
174
178
  scale,
175
179
  chromiumOptions,
180
+ overwrite,
181
+ port: port !== null && port !== void 0 ? port : null,
182
+ muted: config_1.ConfigInternals.getMuted(),
183
+ enforceAudioTrack: config_1.ConfigInternals.getEnforceAudioTrack(),
184
+ keyboardShortcutsEnables: config_1.ConfigInternals.getKeyboardShortcutsEnabled(),
185
+ publicDir: config_1.ConfigInternals.getPublicDir(),
176
186
  };
177
187
  };
178
188
  exports.getCliOptions = getCliOptions;
@@ -1,2 +1 @@
1
- import { TCompMetadata } from 'remotion';
2
- export declare const getCompositionId: (comps: TCompMetadata[]) => string;
1
+ export declare const getCompositionId: () => string;
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCompositionId = void 0;
4
4
  const log_1 = require("./log");
5
5
  const parse_command_line_1 = require("./parse-command-line");
6
- const getCompositionId = (comps) => {
6
+ const getCompositionId = () => {
7
7
  if (!parse_command_line_1.parsedCli._[2]) {
8
8
  log_1.Log.error('Composition ID not passed.');
9
- log_1.Log.error('Pass an extra argument <composition-id>. The following video names are available:');
10
- log_1.Log.error(`${comps.map((c) => c.id).join(', ')}`);
9
+ log_1.Log.error('Pass an extra argument <composition-id>.');
11
10
  process.exit(1);
12
11
  }
13
12
  return parse_command_line_1.parsedCli._[2];
@@ -1,3 +1,3 @@
1
1
  export declare const defaultConfigFileJavascript = "remotion.config.js";
2
2
  export declare const defaultConfigFileTypescript = "remotion.config.ts";
3
- export declare const loadConfig: () => Promise<string | null>;
3
+ export declare const loadConfig: (remotionRoot: string) => Promise<string | null>;
@@ -11,20 +11,23 @@ const log_1 = require("./log");
11
11
  const parse_command_line_1 = require("./parse-command-line");
12
12
  exports.defaultConfigFileJavascript = 'remotion.config.js';
13
13
  exports.defaultConfigFileTypescript = 'remotion.config.ts';
14
- const loadConfig = () => {
14
+ const loadConfig = (remotionRoot) => {
15
15
  if (parse_command_line_1.parsedCli.config) {
16
16
  const fullPath = path_1.default.resolve(process.cwd(), parse_command_line_1.parsedCli.config);
17
17
  if (!(0, fs_1.existsSync)(fullPath)) {
18
18
  log_1.Log.error(`You specified a config file location of "${parse_command_line_1.parsedCli.config}" but no file under ${fullPath} was found.`);
19
19
  process.exit(1);
20
20
  }
21
- return (0, load_config_1.loadConfigFile)(parse_command_line_1.parsedCli.config, fullPath.endsWith('.js'));
21
+ return (0, load_config_1.loadConfigFile)(remotionRoot, parse_command_line_1.parsedCli.config, fullPath.endsWith('.js'));
22
22
  }
23
- if ((0, fs_1.existsSync)(path_1.default.resolve(process.cwd(), exports.defaultConfigFileTypescript))) {
24
- return (0, load_config_1.loadConfigFile)(exports.defaultConfigFileTypescript, false);
23
+ if (remotionRoot === null) {
24
+ return Promise.resolve(null);
25
25
  }
26
- if ((0, fs_1.existsSync)(path_1.default.resolve(process.cwd(), exports.defaultConfigFileJavascript))) {
27
- return (0, load_config_1.loadConfigFile)(exports.defaultConfigFileJavascript, true);
26
+ if ((0, fs_1.existsSync)(path_1.default.resolve(remotionRoot, exports.defaultConfigFileTypescript))) {
27
+ return (0, load_config_1.loadConfigFile)(remotionRoot, exports.defaultConfigFileTypescript, false);
28
+ }
29
+ if ((0, fs_1.existsSync)(path_1.default.resolve(remotionRoot, exports.defaultConfigFileJavascript))) {
30
+ return (0, load_config_1.loadConfigFile)(remotionRoot, exports.defaultConfigFileJavascript, true);
28
31
  }
29
32
  return Promise.resolve(null);
30
33
  };
package/dist/get-env.js CHANGED
@@ -7,7 +7,8 @@ exports.getEnvironmentVariables = void 0;
7
7
  const dotenv_1 = __importDefault(require("dotenv"));
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const path_1 = __importDefault(require("path"));
10
- const remotion_1 = require("remotion");
10
+ const config_1 = require("./config");
11
+ const find_closest_package_json_1 = require("./find-closest-package-json");
11
12
  const log_1 = require("./log");
12
13
  const parse_command_line_1 = require("./parse-command-line");
13
14
  function getProcessEnv() {
@@ -44,9 +45,10 @@ const getEnvironmentVariables = () => {
44
45
  }
45
46
  return getEnvForEnvFile(processEnv, envFile);
46
47
  }
47
- const configFileSetting = remotion_1.Internals.getDotEnvLocation();
48
+ const remotionRoot = (0, find_closest_package_json_1.findRemotionRoot)();
49
+ const configFileSetting = config_1.ConfigInternals.getDotEnvLocation();
48
50
  if (configFileSetting) {
49
- const envFile = path_1.default.resolve(process.cwd(), configFileSetting);
51
+ const envFile = path_1.default.resolve(remotionRoot, configFileSetting);
50
52
  if (!fs_1.default.existsSync(envFile)) {
51
53
  log_1.Log.error('You specifed a custom .env file using `Config.Rendering.setDotEnvLocation()` in the config file but it could not be found');
52
54
  log_1.Log.error('We looked for the file at:', envFile);
@@ -55,7 +57,7 @@ const getEnvironmentVariables = () => {
55
57
  }
56
58
  return getEnvForEnvFile(processEnv, envFile);
57
59
  }
58
- const defaultEnvFile = path_1.default.resolve(process.cwd(), '.env');
60
+ const defaultEnvFile = path_1.default.resolve(remotionRoot, '.env');
59
61
  if (!fs_1.default.existsSync(defaultEnvFile)) {
60
62
  return Promise.resolve(processEnv);
61
63
  }
@@ -1,6 +1,7 @@
1
- import { Codec } from 'remotion';
2
- export declare const getOutputFilename: ({ codec, imageSequence, type, }: {
1
+ import type { Codec } from '@remotion/renderer';
2
+ export declare const getOutputFilename: ({ codec, imageSequence, compositionName, defaultExtension, }: {
3
3
  codec: Codec;
4
4
  imageSequence: boolean;
5
- type: 'still' | 'series';
5
+ compositionName: string;
6
+ defaultExtension: string;
6
7
  }) => string;
@@ -4,11 +4,11 @@ exports.getOutputFilename = void 0;
4
4
  const renderer_1 = require("@remotion/renderer");
5
5
  const log_1 = require("./log");
6
6
  const user_passed_output_location_1 = require("./user-passed-output-location");
7
- const getOutputFilename = ({ codec, imageSequence, type, }) => {
8
- let filename = (0, user_passed_output_location_1.getUserPassedOutputLocation)();
9
- if (type === 'still') {
10
- return filename;
11
- }
7
+ const getOutputFilename = ({ codec, imageSequence, compositionName, defaultExtension, }) => {
8
+ let filename = (0, user_passed_output_location_1.getOutputLocation)({
9
+ compositionId: compositionName,
10
+ defaultExtension,
11
+ });
12
12
  let extension = renderer_1.RenderInternals.getExtensionOfFilename(filename);
13
13
  if (imageSequence) {
14
14
  if (extension !== null) {
@@ -0,0 +1,6 @@
1
+ import type { Codec, CodecOrUndefined } from '@remotion/renderer';
2
+ export declare const getFinalOutputCodec: ({ codec: inputCodec, fileExtension, emitWarning, }: {
3
+ codec: CodecOrUndefined;
4
+ fileExtension: string | null;
5
+ emitWarning: boolean;
6
+ }) => Codec;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFinalOutputCodec = void 0;
4
+ const renderer_1 = require("@remotion/renderer");
5
+ const log_1 = require("./log");
6
+ const getFinalOutputCodec = ({ codec: inputCodec, fileExtension, emitWarning, }) => {
7
+ if (inputCodec === undefined && fileExtension === 'webm') {
8
+ if (emitWarning) {
9
+ log_1.Log.info('You have specified a .webm extension, using the VP8 encoder. Use --codec=vp9 to use the Vp9 encoder.');
10
+ }
11
+ return 'vp8';
12
+ }
13
+ if (inputCodec === undefined && fileExtension === 'hevc') {
14
+ if (emitWarning) {
15
+ log_1.Log.info('You have specified a .hevc extension, using the H265 encoder.');
16
+ }
17
+ return 'h265';
18
+ }
19
+ if (inputCodec === undefined && fileExtension === 'mp3') {
20
+ if (emitWarning) {
21
+ log_1.Log.info('You have specified a .mp3 extension, using the MP3 encoder.');
22
+ }
23
+ return 'mp3';
24
+ }
25
+ if (inputCodec === undefined && fileExtension === 'mov') {
26
+ if (emitWarning) {
27
+ log_1.Log.info('You have specified a .mov extension, using the Apple ProRes encoder.');
28
+ }
29
+ return 'prores';
30
+ }
31
+ if (inputCodec === undefined && fileExtension === 'wav') {
32
+ if (emitWarning) {
33
+ log_1.Log.info('You have specified a .wav extension, using the WAV encoder.');
34
+ }
35
+ return 'wav';
36
+ }
37
+ if (inputCodec === undefined && fileExtension === 'aac') {
38
+ if (emitWarning) {
39
+ log_1.Log.info('You have specified a .aac extension, using the AAC encoder.');
40
+ }
41
+ return 'aac';
42
+ }
43
+ if (inputCodec === undefined && fileExtension === 'm4a') {
44
+ if (emitWarning) {
45
+ log_1.Log.info('You have specified a .m4a extension, using the AAC encoder.');
46
+ }
47
+ return 'aac';
48
+ }
49
+ if (inputCodec === undefined && fileExtension === 'mkv') {
50
+ if (emitWarning) {
51
+ log_1.Log.info('You have specified a .mkv extension, using the H264 encoder and WAV audio format.');
52
+ }
53
+ return 'h264-mkv';
54
+ }
55
+ if (inputCodec === undefined && fileExtension === 'gif') {
56
+ if (emitWarning) {
57
+ log_1.Log.info('You have specified a .gif extension, rendering a GIF');
58
+ }
59
+ return 'gif';
60
+ }
61
+ return inputCodec !== null && inputCodec !== void 0 ? inputCodec : renderer_1.RenderInternals.DEFAULT_CODEC;
62
+ };
63
+ exports.getFinalOutputCodec = getFinalOutputCodec;
@@ -1 +1 @@
1
- export declare const getInputProps: () => object;
1
+ export declare const getInputProps: (onUpdate: (newProps: object) => void) => object;
@@ -9,7 +9,7 @@ const os_1 = __importDefault(require("os"));
9
9
  const path_1 = __importDefault(require("path"));
10
10
  const log_1 = require("./log");
11
11
  const parse_command_line_1 = require("./parse-command-line");
12
- const getInputProps = () => {
12
+ const getInputProps = (onUpdate) => {
13
13
  if (!parse_command_line_1.parsedCli.props) {
14
14
  return {};
15
15
  }
@@ -17,6 +17,15 @@ const getInputProps = () => {
17
17
  try {
18
18
  if (fs_1.default.existsSync(jsonFile)) {
19
19
  const rawJsonData = fs_1.default.readFileSync(jsonFile, 'utf-8');
20
+ fs_1.default.watchFile(jsonFile, { interval: 100 }, () => {
21
+ try {
22
+ onUpdate(JSON.parse(fs_1.default.readFileSync(jsonFile, 'utf-8')));
23
+ log_1.Log.info(`Updated input props from ${jsonFile}.`);
24
+ }
25
+ catch (err) {
26
+ log_1.Log.error(`${jsonFile} contains invalid JSON. Did not apply new input props.`);
27
+ }
28
+ });
20
29
  return JSON.parse(rawJsonData);
21
30
  }
22
31
  return JSON.parse(parse_command_line_1.parsedCli.props);
@@ -0,0 +1 @@
1
+ export declare const getLatestRemotionVersion: () => Promise<any>;
@@ -0,0 +1,31 @@
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.getLatestRemotionVersion = void 0;
7
+ const https_1 = __importDefault(require("https"));
8
+ const getPackageJsonForRemotion = () => {
9
+ return new Promise((resolve, reject) => {
10
+ const req = https_1.default.get('https://registry.npmjs.org/remotion', {
11
+ headers: {
12
+ accept: 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*',
13
+ },
14
+ }, (res) => {
15
+ let data = '';
16
+ res.on('data', (d) => {
17
+ data += d;
18
+ });
19
+ res.on('end', () => resolve(data));
20
+ });
21
+ req.on('error', (error) => {
22
+ reject(error);
23
+ });
24
+ req.end();
25
+ });
26
+ };
27
+ const getLatestRemotionVersion = async () => {
28
+ const pkgJson = await getPackageJsonForRemotion();
29
+ return JSON.parse(pkgJson)['dist-tags'].latest;
30
+ };
31
+ exports.getLatestRemotionVersion = getLatestRemotionVersion;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handleCommonError = void 0;
4
+ const chalk_1 = require("./chalk");
4
5
  const log_1 = require("./log");
5
6
  const print_error_1 = require("./print-error");
6
7
  const handleCommonError = async (err) => {
@@ -21,5 +22,9 @@ const handleCommonError = async (err) => {
21
22
  log_1.Log.info();
22
23
  log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/enametoolong');
23
24
  }
25
+ if (err.message.includes('The bucket does not allow ACLs')) {
26
+ log_1.Log.info();
27
+ log_1.Log.info(chalk_1.chalk.green('💡 Fix this issue https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl'));
28
+ }
24
29
  };
25
30
  exports.handleCommonError = handleCommonError;
@@ -1,2 +1,3 @@
1
- import { ImageFormat, Internals } from 'remotion';
2
- export declare const getImageFormat: (codec: ReturnType<typeof Internals.getOutputCodecOrUndefined>) => ImageFormat;
1
+ import type { ImageFormat } from '@remotion/renderer';
2
+ import { ConfigInternals } from './config';
3
+ export declare const getImageFormat: (codec: ReturnType<typeof ConfigInternals.getOutputCodecOrUndefined>) => ImageFormat;
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getImageFormat = void 0;
4
- const remotion_1 = require("remotion");
4
+ const renderer_1 = require("@remotion/renderer");
5
+ const config_1 = require("./config");
5
6
  const getImageFormat = (codec) => {
6
- const userPreferred = remotion_1.Internals.getUserPreferredImageFormat();
7
+ const userPreferred = config_1.ConfigInternals.getUserPreferredImageFormat();
7
8
  if (typeof userPreferred !== 'undefined') {
8
9
  return userPreferred;
9
10
  }
10
- if (remotion_1.Internals.isAudioCodec(codec)) {
11
+ if (renderer_1.RenderInternals.isAudioCodec(codec)) {
11
12
  return 'none';
12
13
  }
13
14
  if (codec === 'h264' ||
@@ -15,7 +16,8 @@ const getImageFormat = (codec) => {
15
16
  codec === 'h265' ||
16
17
  codec === 'vp8' ||
17
18
  codec === 'vp9' ||
18
- codec === 'prores') {
19
+ codec === 'prores' ||
20
+ codec === 'gif') {
19
21
  return 'jpeg';
20
22
  }
21
23
  if (codec === undefined) {