@remotion/cli 4.0.0-preload.13 → 4.0.0-publish.3

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 (327) hide show
  1. package/dist/bundle-on-cli.d.ts +2 -0
  2. package/dist/bundle-on-cli.js +41 -0
  3. package/dist/bundle.d.ts +1 -0
  4. package/dist/bundle.js +31 -0
  5. package/dist/chalk/index.d.ts +58 -0
  6. package/dist/chalk/index.js +138 -0
  7. package/dist/chalk/symbols.d.ts +111 -0
  8. package/dist/chalk/symbols.js +75 -0
  9. package/dist/chalk/utilities.d.ts +2 -0
  10. package/dist/chalk/utilities.js +37 -0
  11. package/dist/code-frame.d.ts +1 -1
  12. package/dist/code-frame.js +5 -8
  13. package/dist/compositions.js +14 -3
  14. package/dist/download-progress.d.ts +2 -1
  15. package/dist/download-progress.js +19 -4
  16. package/dist/editor/components/AudioWaveform.js +2 -2
  17. package/dist/editor/components/AudioWaveformBar.js +1 -1
  18. package/dist/editor/components/Canvas.js +1 -1
  19. package/dist/editor/components/CheckboardToggle.js +1 -1
  20. package/dist/editor/components/ClipboardIcon.js +1 -1
  21. package/dist/editor/components/CollapsedCompositionSelector.d.ts +4 -0
  22. package/dist/editor/components/CollapsedCompositionSelector.js +39 -0
  23. package/dist/editor/components/CompositionManager.d.ts +4 -0
  24. package/dist/editor/components/CompositionManager.js +60 -0
  25. package/dist/editor/components/CompositionSelector.js +5 -45
  26. package/dist/editor/components/CompositionSelectorItem.d.ts +1 -1
  27. package/dist/editor/components/CompositionSelectorItem.js +3 -3
  28. package/dist/editor/components/ControlButton.js +1 -1
  29. package/dist/editor/components/CopyButton.js +2 -2
  30. package/dist/editor/components/CurrentComposition.js +2 -2
  31. package/dist/editor/components/Editor.js +24 -8
  32. package/dist/editor/components/EditorContent.js +3 -2
  33. package/dist/editor/components/FpsCounter.js +1 -1
  34. package/dist/editor/components/FramePersistor.d.ts +1 -1
  35. package/dist/editor/components/GlobalKeybindings.d.ts +1 -1
  36. package/dist/editor/components/InitialCompositionLoader.d.ts +4 -0
  37. package/dist/editor/components/InitialCompositionLoader.js +60 -0
  38. package/dist/editor/components/KeyboardShortcutsModal.js +1 -1
  39. package/dist/editor/components/LoadingIndicator.js +1 -1
  40. package/dist/editor/components/LoopToggle.js +1 -1
  41. package/dist/editor/components/Menu/MenuDivider.js +1 -1
  42. package/dist/editor/components/Menu/MenuItem.d.ts +1 -1
  43. package/dist/editor/components/Menu/MenuItem.js +3 -3
  44. package/dist/editor/components/Menu/MenuSubItem.d.ts +1 -1
  45. package/dist/editor/components/Menu/MenuSubItem.js +3 -3
  46. package/dist/editor/components/Menu/SubMenu.d.ts +2 -2
  47. package/dist/editor/components/Menu/SubMenu.js +1 -1
  48. package/dist/editor/components/MenuBuildIndicator.d.ts +2 -0
  49. package/dist/editor/components/MenuBuildIndicator.js +26 -0
  50. package/dist/editor/components/MenuToolbar.js +69 -9
  51. package/dist/editor/components/ModalContainer.js +1 -1
  52. package/dist/editor/components/ModalHeader.js +1 -1
  53. package/dist/editor/components/MuteToggle.js +1 -1
  54. package/dist/editor/components/NewComposition/CancelButton.d.ts +2 -1
  55. package/dist/editor/components/NewComposition/CancelButton.js +1 -1
  56. package/dist/editor/components/NewComposition/ComboBox.js +3 -3
  57. package/dist/editor/components/NewComposition/CopyHint.js +1 -1
  58. package/dist/editor/components/NewComposition/InputDragger.d.ts +2 -1
  59. package/dist/editor/components/NewComposition/InputDragger.js +2 -2
  60. package/dist/editor/components/NewComposition/MenuContent.d.ts +1 -1
  61. package/dist/editor/components/NewComposition/MenuContent.js +1 -1
  62. package/dist/editor/components/NewComposition/NewCompAspectRatio.js +1 -1
  63. package/dist/editor/components/NewComposition/NewCompDuration.js +1 -1
  64. package/dist/editor/components/NewComposition/NewComposition.d.ts +1 -1
  65. package/dist/editor/components/NewComposition/NewComposition.js +4 -4
  66. package/dist/editor/components/NewComposition/RemInput.js +1 -1
  67. package/dist/editor/components/NewComposition/ToggleAspectRatio.js +1 -1
  68. package/dist/editor/components/NewComposition/ValidationMessage.js +2 -2
  69. package/dist/editor/components/NewComposition/new-comp-layout.d.ts +1 -1
  70. package/dist/editor/components/NoRegisterRoot.d.ts +2 -0
  71. package/dist/editor/components/NoRegisterRoot.js +41 -0
  72. package/dist/editor/components/PlayPause.js +40 -11
  73. package/dist/editor/components/PlaybackKeyboardShortcutsManager.d.ts +1 -1
  74. package/dist/editor/components/PlaybackRatePersistor.d.ts +1 -1
  75. package/dist/editor/components/PlaybackRateSelector.js +2 -2
  76. package/dist/editor/components/Preview.d.ts +1 -1
  77. package/dist/editor/components/Preview.js +10 -7
  78. package/dist/editor/components/PreviewToolbar.js +1 -1
  79. package/dist/editor/components/RichTimelineToggle.js +1 -1
  80. package/dist/editor/components/SizeSelector.d.ts +1 -1
  81. package/dist/editor/components/SizeSelector.js +2 -2
  82. package/dist/editor/components/Splitter/SplitterContainer.d.ts +1 -1
  83. package/dist/editor/components/Splitter/SplitterContainer.js +1 -1
  84. package/dist/editor/components/Splitter/SplitterElement.js +4 -2
  85. package/dist/editor/components/Splitter/SplitterHandle.d.ts +4 -1
  86. package/dist/editor/components/Splitter/SplitterHandle.js +28 -7
  87. package/dist/editor/components/Thumbnail.d.ts +1 -1
  88. package/dist/editor/components/Thumbnail.js +1 -1
  89. package/dist/editor/components/TimeValue.js +1 -1
  90. package/dist/editor/components/Timeline/LoopedIndicator.js +2 -2
  91. package/dist/editor/components/Timeline/LoopedTimelineIndicators.js +3 -3
  92. package/dist/editor/components/Timeline/MaxTimelineTracks.js +1 -1
  93. package/dist/editor/components/Timeline/Timeline.js +2 -1
  94. package/dist/editor/components/Timeline/TimelineCollapseToggle.js +2 -2
  95. package/dist/editor/components/Timeline/TimelineDragHandler.js +1 -1
  96. package/dist/editor/components/Timeline/TimelineInOutPointer.js +2 -2
  97. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js +1 -1
  98. package/dist/editor/components/Timeline/TimelineList.d.ts +2 -2
  99. package/dist/editor/components/Timeline/TimelineList.js +1 -1
  100. package/dist/editor/components/Timeline/TimelineListItem.d.ts +2 -2
  101. package/dist/editor/components/Timeline/TimelineListItem.js +1 -1
  102. package/dist/editor/components/Timeline/TimelineSequence.d.ts +1 -1
  103. package/dist/editor/components/Timeline/TimelineSequence.js +1 -1
  104. package/dist/editor/components/Timeline/TimelineSequenceFrame.js +1 -1
  105. package/dist/editor/components/Timeline/TimelineSlider.js +1 -1
  106. package/dist/editor/components/Timeline/TimelineSliderHandle.js +1 -1
  107. package/dist/editor/components/Timeline/TimelineTracks.d.ts +2 -2
  108. package/dist/editor/components/Timeline/TimelineTracks.js +2 -2
  109. package/dist/editor/components/Timeline/TimelineVideoInfo.js +1 -1
  110. package/dist/editor/components/Timeline/is-collapsed.d.ts +2 -2
  111. package/dist/editor/components/TimelineInOutToggle.js +1 -1
  112. package/dist/editor/components/TopPanel.js +24 -1
  113. package/dist/editor/components/UpdateCheck.d.ts +1 -1
  114. package/dist/editor/components/UpdateCheck.js +1 -1
  115. package/dist/editor/components/UpdateModal/UpdateModal.d.ts +1 -1
  116. package/dist/editor/components/UpdateModal/UpdateModal.js +1 -1
  117. package/dist/editor/components/layout.js +4 -4
  118. package/dist/editor/helpers/calculate-timeline.d.ts +2 -2
  119. package/dist/editor/helpers/create-folder-tree.d.ts +2 -2
  120. package/dist/editor/helpers/get-sequence-visible-range.d.ts +1 -1
  121. package/dist/editor/helpers/get-timeline-nestedness.d.ts +1 -1
  122. package/dist/editor/helpers/get-timeline-sequence-hash.d.ts +1 -1
  123. package/dist/editor/helpers/get-timeline-sequence-layout.d.ts +1 -1
  124. package/dist/editor/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
  125. package/dist/editor/helpers/is-composition-still.d.ts +1 -1
  126. package/dist/editor/helpers/use-compact-ui.d.ts +1 -0
  127. package/dist/editor/helpers/use-compact-ui.js +18 -0
  128. package/dist/editor/helpers/use-keybinding.d.ts +1 -1
  129. package/dist/editor/helpers/validate-new-comp-data.d.ts +1 -1
  130. package/dist/editor/icons/Checkmark.js +1 -1
  131. package/dist/editor/icons/caret.d.ts +1 -1
  132. package/dist/editor/icons/caret.js +4 -4
  133. package/dist/editor/icons/film.d.ts +2 -1
  134. package/dist/editor/icons/film.js +1 -1
  135. package/dist/editor/icons/folder.d.ts +2 -1
  136. package/dist/editor/icons/folder.js +2 -2
  137. package/dist/editor/icons/jump-to-start.d.ts +2 -0
  138. package/dist/editor/icons/jump-to-start.js +8 -0
  139. package/dist/editor/icons/keys.js +3 -3
  140. package/dist/editor/icons/lock.d.ts +2 -1
  141. package/dist/editor/icons/lock.js +2 -2
  142. package/dist/editor/icons/media-volume.js +2 -2
  143. package/dist/editor/icons/pause.d.ts +2 -1
  144. package/dist/editor/icons/pause.js +1 -1
  145. package/dist/editor/icons/play.d.ts +2 -1
  146. package/dist/editor/icons/play.js +1 -1
  147. package/dist/editor/icons/step-back.d.ts +2 -1
  148. package/dist/editor/icons/step-back.js +1 -1
  149. package/dist/editor/icons/step-forward.d.ts +2 -1
  150. package/dist/editor/icons/step-forward.js +1 -1
  151. package/dist/editor/icons/still.d.ts +2 -1
  152. package/dist/editor/icons/still.js +1 -1
  153. package/dist/editor/icons/timeline.d.ts +2 -1
  154. package/dist/editor/icons/timeline.js +1 -1
  155. package/dist/editor/icons/timelineInOutPointer.d.ts +2 -1
  156. package/dist/editor/icons/timelineInOutPointer.js +2 -2
  157. package/dist/editor/state/folders.d.ts +11 -0
  158. package/dist/editor/state/folders.js +23 -0
  159. package/dist/editor/state/highest-z-index.js +2 -2
  160. package/dist/editor/state/keybindings.js +1 -1
  161. package/dist/editor/state/modals.d.ts +2 -2
  162. package/dist/editor/state/preview-size.d.ts +1 -1
  163. package/dist/editor/state/sidebar.d.ts +12 -0
  164. package/dist/editor/state/sidebar.js +40 -0
  165. package/dist/editor/state/z-index.js +1 -1
  166. package/dist/event-source-events.d.ts +6 -0
  167. package/dist/event-source-events.js +2 -0
  168. package/dist/event-source.d.ts +1 -0
  169. package/dist/event-source.js +14 -0
  170. package/dist/format-bytes.d.ts +6 -0
  171. package/dist/format-bytes.js +103 -0
  172. package/dist/get-cli-options.d.ts +5 -3
  173. package/dist/get-cli-options.js +9 -4
  174. package/dist/get-composition-id.d.ts +1 -1
  175. package/dist/get-filename.d.ts +1 -1
  176. package/dist/get-input-props.d.ts +1 -1
  177. package/dist/get-input-props.js +10 -1
  178. package/dist/get-latest-remotion-version.d.ts +1 -0
  179. package/dist/get-latest-remotion-version.js +31 -0
  180. package/dist/image-formats.d.ts +2 -1
  181. package/dist/index.d.ts +62 -12
  182. package/dist/index.js +16 -6
  183. package/dist/lambda-command.js +5 -1
  184. package/dist/log.js +4 -7
  185. package/dist/parse-command-line.d.ts +2 -1
  186. package/dist/parse-command-line.js +6 -0
  187. package/dist/prepare-entry-point.d.ts +11 -0
  188. package/dist/prepare-entry-point.js +36 -0
  189. package/dist/preview-server/dev-middleware/compatible-api.d.ts +7 -0
  190. package/dist/preview-server/dev-middleware/compatible-api.js +20 -0
  191. package/dist/preview-server/dev-middleware/get-paths.d.ts +7 -0
  192. package/dist/preview-server/dev-middleware/get-paths.js +19 -0
  193. package/dist/preview-server/dev-middleware/index.d.ts +3 -0
  194. package/dist/preview-server/dev-middleware/index.js +27 -0
  195. package/dist/preview-server/dev-middleware/is-color-supported.d.ts +1 -0
  196. package/dist/preview-server/dev-middleware/is-color-supported.js +37 -0
  197. package/dist/preview-server/dev-middleware/middleware.d.ts +10 -0
  198. package/dist/preview-server/dev-middleware/middleware.js +224 -0
  199. package/dist/preview-server/dev-middleware/range-parser.d.ts +15 -0
  200. package/dist/preview-server/dev-middleware/range-parser.js +96 -0
  201. package/dist/preview-server/dev-middleware/ready.d.ts +3 -0
  202. package/dist/preview-server/dev-middleware/ready.js +11 -0
  203. package/dist/preview-server/dev-middleware/setup-hooks.d.ts +2 -0
  204. package/dist/preview-server/dev-middleware/setup-hooks.js +42 -0
  205. package/dist/preview-server/dev-middleware/setup-output-filesystem.d.ts +2 -0
  206. package/dist/preview-server/dev-middleware/setup-output-filesystem.js +13 -0
  207. package/dist/preview-server/dev-middleware/types.d.ts +10 -0
  208. package/dist/preview-server/dev-middleware/types.js +2 -0
  209. package/dist/preview-server/error-overlay/entry-basic.d.ts +1 -0
  210. package/dist/preview-server/error-overlay/entry-basic.js +21 -0
  211. package/dist/preview-server/error-overlay/react-overlay/effects/format-warning.d.ts +11 -0
  212. package/dist/preview-server/error-overlay/react-overlay/effects/format-warning.js +41 -0
  213. package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.d.ts +7 -0
  214. package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.js +46 -0
  215. package/dist/preview-server/error-overlay/react-overlay/effects/proxy-console.d.ts +24 -0
  216. package/dist/preview-server/error-overlay/react-overlay/effects/proxy-console.js +64 -0
  217. package/dist/preview-server/error-overlay/react-overlay/effects/resolve-file-source.d.ts +3 -0
  218. package/dist/preview-server/error-overlay/react-overlay/effects/resolve-file-source.js +31 -0
  219. package/dist/preview-server/error-overlay/react-overlay/effects/stack-trace-limit.d.ts +3 -0
  220. package/dist/preview-server/error-overlay/react-overlay/effects/stack-trace-limit.js +43 -0
  221. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-error.d.ts +4 -0
  222. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-error.js +45 -0
  223. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-rejection.d.ts +4 -0
  224. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-rejection.js +41 -0
  225. package/dist/preview-server/error-overlay/react-overlay/index.d.ts +2 -0
  226. package/dist/preview-server/error-overlay/react-overlay/index.js +21 -0
  227. package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.d.ts +8 -0
  228. package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.js +79 -0
  229. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.d.ts +1 -0
  230. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.js +21 -0
  231. package/dist/preview-server/error-overlay/react-overlay/utils/get-lines-around.d.ts +14 -0
  232. package/dist/preview-server/error-overlay/react-overlay/utils/get-lines-around.js +24 -0
  233. package/dist/preview-server/error-overlay/react-overlay/utils/get-source-map.d.ts +7 -0
  234. package/dist/preview-server/error-overlay/react-overlay/utils/get-source-map.js +50 -0
  235. package/dist/preview-server/error-overlay/react-overlay/utils/get-stack-frames.d.ts +2 -0
  236. package/dist/preview-server/error-overlay/react-overlay/utils/get-stack-frames.js +27 -0
  237. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.d.ts +12 -0
  238. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.js +451 -0
  239. package/dist/preview-server/error-overlay/react-overlay/utils/parser.d.ts +2 -0
  240. package/dist/preview-server/error-overlay/react-overlay/utils/parser.js +117 -0
  241. package/dist/preview-server/error-overlay/react-overlay/utils/stack-frame.d.ts +40 -0
  242. package/dist/preview-server/error-overlay/react-overlay/utils/stack-frame.js +31 -0
  243. package/dist/preview-server/error-overlay/react-overlay/utils/unmapper.d.ts +2 -0
  244. package/dist/preview-server/error-overlay/react-overlay/utils/unmapper.js +64 -0
  245. package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.d.ts +2 -0
  246. package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.js +14 -0
  247. package/dist/preview-server/error-overlay/remotion-overlay/Button.d.ts +6 -0
  248. package/dist/preview-server/error-overlay/remotion-overlay/Button.js +24 -0
  249. package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.d.ts +6 -0
  250. package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.js +28 -0
  251. package/dist/preview-server/error-overlay/remotion-overlay/DismissButton.d.ts +2 -0
  252. package/dist/preview-server/error-overlay/remotion-overlay/DismissButton.js +23 -0
  253. package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.d.ts +5 -0
  254. package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.js +45 -0
  255. package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.d.ts +4 -0
  256. package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.js +61 -0
  257. package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.d.ts +6 -0
  258. package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.js +41 -0
  259. package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.d.ts +5 -0
  260. package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.js +91 -0
  261. package/dist/preview-server/error-overlay/remotion-overlay/Overlay.d.ts +14 -0
  262. package/dist/preview-server/error-overlay/remotion-overlay/Overlay.js +49 -0
  263. package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.d.ts +4 -0
  264. package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.js +13 -0
  265. package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.d.ts +8 -0
  266. package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.js +48 -0
  267. package/dist/preview-server/error-overlay/remotion-overlay/Symbolicating.d.ts +2 -0
  268. package/dist/preview-server/error-overlay/remotion-overlay/Symbolicating.js +8 -0
  269. package/dist/preview-server/error-overlay/remotion-overlay/carets.d.ts +3 -0
  270. package/dist/preview-server/error-overlay/remotion-overlay/carets.js +12 -0
  271. package/dist/preview-server/error-overlay/remotion-overlay/format-location.d.ts +1 -0
  272. package/dist/preview-server/error-overlay/remotion-overlay/format-location.js +10 -0
  273. package/dist/preview-server/error-overlay/remotion-overlay/index.d.ts +1 -0
  274. package/dist/preview-server/error-overlay/remotion-overlay/index.js +18 -0
  275. package/dist/preview-server/fast-refresh/helpers.d.ts +39 -0
  276. package/dist/preview-server/fast-refresh/helpers.js +145 -0
  277. package/dist/preview-server/fast-refresh/index.d.ts +30 -0
  278. package/dist/preview-server/fast-refresh/index.js +86 -0
  279. package/dist/preview-server/fast-refresh/loader.d.ts +35 -0
  280. package/dist/preview-server/fast-refresh/loader.js +81 -0
  281. package/dist/preview-server/fast-refresh/runtime.d.ts +35 -0
  282. package/dist/preview-server/fast-refresh/runtime.js +32 -0
  283. package/dist/preview-server/get-package-manager.d.ts +9 -0
  284. package/dist/preview-server/get-package-manager.js +40 -0
  285. package/dist/preview-server/hot-middleware/client.d.ts +19 -0
  286. package/dist/preview-server/hot-middleware/client.js +177 -0
  287. package/dist/preview-server/hot-middleware/index.d.ts +8 -0
  288. package/dist/preview-server/hot-middleware/index.js +150 -0
  289. package/dist/preview-server/hot-middleware/process-update.d.ts +12 -0
  290. package/dist/preview-server/hot-middleware/process-update.js +144 -0
  291. package/dist/preview-server/hot-middleware/strip-ansi.d.ts +1 -0
  292. package/dist/preview-server/hot-middleware/strip-ansi.js +21 -0
  293. package/dist/preview-server/hot-middleware/types.d.ts +27 -0
  294. package/dist/preview-server/hot-middleware/types.js +10 -0
  295. package/dist/preview-server/live-events.d.ts +8 -0
  296. package/dist/preview-server/live-events.js +37 -0
  297. package/dist/preview-server/project-info.d.ts +5 -0
  298. package/dist/preview-server/project-info.js +22 -0
  299. package/dist/preview-server/routes.d.ts +10 -0
  300. package/dist/preview-server/routes.js +131 -0
  301. package/dist/preview-server/serve-static.d.ts +9 -0
  302. package/dist/preview-server/serve-static.js +77 -0
  303. package/dist/preview-server/start-server.d.ts +12 -0
  304. package/dist/preview-server/start-server.js +77 -0
  305. package/dist/preview-server/static-preview.d.ts +1 -0
  306. package/dist/preview-server/static-preview.js +40 -0
  307. package/dist/preview-server/update-available.d.ts +11 -0
  308. package/dist/preview-server/update-available.js +44 -0
  309. package/dist/preview-server/webpack-cache.d.ts +12 -0
  310. package/dist/preview-server/webpack-cache.js +66 -0
  311. package/dist/preview.js +29 -4
  312. package/dist/previewEntry.js +4 -2
  313. package/dist/print-error.js +6 -8
  314. package/dist/print-help.js +11 -14
  315. package/dist/progress-bar.d.ts +5 -3
  316. package/dist/progress-bar.js +4 -7
  317. package/dist/render.js +38 -28
  318. package/dist/setup-cache.d.ts +1 -1
  319. package/dist/setup-cache.js +3 -3
  320. package/dist/still.js +51 -18
  321. package/dist/upgrade.js +9 -7
  322. package/dist/versions.js +3 -0
  323. package/dist/warn-about-ffmpeg-version.d.ts +1 -1
  324. package/dist/webpack-cache.d.ts +12 -0
  325. package/dist/webpack-cache.js +66 -0
  326. package/package.json +13 -12
  327. package/web/favicon.png +0 -0
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.openEventSource = void 0;
4
+ let source = null;
5
+ const openEventSource = () => {
6
+ source = new EventSource('/events');
7
+ source.addEventListener('message', (event) => {
8
+ const newEvent = JSON.parse(event.data);
9
+ if (newEvent.type === 'new-input-props') {
10
+ window.location.reload();
11
+ }
12
+ });
13
+ };
14
+ exports.openEventSource = openEventSource;
@@ -0,0 +1,6 @@
1
+ export declare const formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
2
+ locale: string;
3
+ bits?: boolean;
4
+ binary?: boolean;
5
+ signed: boolean;
6
+ }) => string;
@@ -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;
@@ -1,8 +1,8 @@
1
- import { ChromiumOptions } from '@remotion/renderer';
2
- import { BrowserExecutable, FrameRange } from 'remotion';
1
+ import type { ChromiumOptions } from '@remotion/renderer';
2
+ import type { BrowserExecutable, FrameRange } from 'remotion';
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;
@@ -22,7 +22,9 @@ export declare const getCliOptions: (options: {
22
22
  stillFrame: number;
23
23
  browserExecutable: BrowserExecutable;
24
24
  ffmpegExecutable: import("remotion").FfmpegExecutable;
25
+ ffprobeExecutable: import("remotion").FfmpegExecutable;
25
26
  logLevel: "verbose" | "info" | "warn" | "error";
26
27
  scale: number;
27
28
  chromiumOptions: ChromiumOptions;
29
+ port: number | null;
28
30
  }>;
@@ -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' &&
@@ -117,14 +116,16 @@ const getAndValidateBrowser = async (browserExecutable) => {
117
116
  const getCliOptions = async (options) => {
118
117
  var _a;
119
118
  const frameRange = getAndValidateFrameRange();
120
- const codec = await getFinalCodec({ isLambda: options.isLambda });
119
+ const codec = options.type === 'get-compositions'
120
+ ? 'h264'
121
+ : await getFinalCodec({ isLambda: options.isLambda });
121
122
  const shouldOutputImageSequence = options.type === 'still'
122
123
  ? true
123
124
  : await getAndValidateShouldOutputImageSequence({
124
125
  frameRange,
125
126
  isLambda: options.isLambda,
126
127
  });
127
- const outputFile = options.isLambda
128
+ const outputFile = options.isLambda || options.type === 'get-compositions'
128
129
  ? null
129
130
  : (0, get_filename_1.getOutputFilename)({
130
131
  codec,
@@ -142,7 +143,9 @@ const getCliOptions = async (options) => {
142
143
  const proResProfile = getAndValidateProResProfile(codec);
143
144
  const browserExecutable = remotion_1.Internals.getBrowserExecutable();
144
145
  const ffmpegExecutable = remotion_1.Internals.getCustomFfmpegExecutable();
146
+ const ffprobeExecutable = remotion_1.Internals.getCustomFfprobeExecutable();
145
147
  const scale = remotion_1.Internals.getScale();
148
+ const port = remotion_1.Internals.getServerPort();
146
149
  const chromiumOptions = {
147
150
  disableWebSecurity: remotion_1.Internals.getChromiumDisableWebSecurity(),
148
151
  ignoreCertificateErrors: remotion_1.Internals.getIgnoreCertificateErrors(),
@@ -156,7 +159,7 @@ const getCliOptions = async (options) => {
156
159
  shouldOutputImageSequence,
157
160
  codec,
158
161
  overwrite: remotion_1.Internals.getShouldOverwrite(),
159
- inputProps: (0, get_input_props_1.getInputProps)(),
162
+ inputProps: (0, get_input_props_1.getInputProps)(() => undefined),
160
163
  envVariables: await (0, get_env_1.getEnvironmentVariables)(),
161
164
  quality: remotion_1.Internals.getQuality(),
162
165
  absoluteOutputFile: outputFile
@@ -170,9 +173,11 @@ const getCliOptions = async (options) => {
170
173
  stillFrame: remotion_1.Internals.getStillFrame(),
171
174
  browserExecutable,
172
175
  ffmpegExecutable,
176
+ ffprobeExecutable,
173
177
  logLevel: remotion_1.Internals.Logging.getLogLevel(),
174
178
  scale,
175
179
  chromiumOptions,
180
+ port: port !== null && port !== void 0 ? port : null,
176
181
  };
177
182
  };
178
183
  exports.getCliOptions = getCliOptions;
@@ -1,2 +1,2 @@
1
- import { TCompMetadata } from 'remotion';
1
+ import type { TCompMetadata } from 'remotion';
2
2
  export declare const getCompositionId: (comps: TCompMetadata[]) => string;
@@ -1,4 +1,4 @@
1
- import { Codec } from 'remotion';
1
+ import type { Codec } from 'remotion';
2
2
  export declare const getOutputFilename: ({ codec, imageSequence, type, }: {
3
3
  codec: Codec;
4
4
  imageSequence: boolean;
@@ -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,2 +1,3 @@
1
- import { ImageFormat, Internals } from 'remotion';
1
+ import type { ImageFormat } from 'remotion';
2
+ import { Internals } from 'remotion';
2
3
  export declare const getImageFormat: (codec: ReturnType<typeof Internals.getOutputCodecOrUndefined>) => ImageFormat;
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: chalk.Chalk & chalk.ChalkFunction & {
10
- supportsColor: false | chalk.ColorSupport;
11
- Level: chalk.Level;
12
- Color: ("black" | "blue" | "cyan" | "gray" | "green" | "grey" | "magenta" | "red" | "white" | "yellow" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright") | ("bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgGrey" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright");
13
- ForegroundColor: "black" | "blue" | "cyan" | "gray" | "green" | "grey" | "magenta" | "red" | "white" | "yellow" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright";
14
- BackgroundColor: "bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgGrey" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright";
15
- Modifiers: "bold" | "reset" | "hidden" | "visible" | "italic" | "underline" | "dim" | "inverse" | "strikethrough";
16
- stderr: chalk.Chalk & {
17
- supportsColor: false | chalk.ColorSupport;
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: {
@@ -27,7 +68,7 @@ export declare const CliInternals: {
27
68
  loadConfigFile: (configFileName: string, isJavascript: boolean) => Promise<string | null>;
28
69
  getCliOptions: (options: {
29
70
  isLambda: boolean;
30
- type: "still" | "series";
71
+ type: "still" | "series" | "get-compositions";
31
72
  }) => Promise<{
32
73
  puppeteerTimeout: number;
33
74
  parallelism: number | null;
@@ -47,9 +88,11 @@ export declare const CliInternals: {
47
88
  stillFrame: number;
48
89
  browserExecutable: import("remotion").BrowserExecutable;
49
90
  ffmpegExecutable: import("remotion").FfmpegExecutable;
91
+ ffprobeExecutable: import("remotion").FfmpegExecutable;
50
92
  logLevel: "verbose" | "info" | "warn" | "error";
51
93
  scale: number;
52
94
  chromiumOptions: import("@remotion/renderer").ChromiumOptions;
95
+ port: number | null;
53
96
  }>;
54
97
  parseCommandLine: (type: "sequence" | "still" | "lambda" | "preview" | "versions") => void;
55
98
  loadConfig: () => Promise<string | null>;
@@ -58,4 +101,11 @@ export declare const CliInternals: {
58
101
  quietFlagProvided: () => boolean;
59
102
  parsedCli: import("./parse-command-line").CommandLineOptions & import("minimist").ParsedArgs;
60
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;
61
111
  };
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -9,14 +13,14 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
- var __importDefault = (this && this.__importDefault) || function (mod) {
13
- return (mod && mod.__esModule) ? mod : { "default": mod };
14
- };
15
16
  Object.defineProperty(exports, "__esModule", { value: true });
16
17
  exports.CliInternals = exports.cli = void 0;
17
- const chalk_1 = __importDefault(require("chalk"));
18
+ const renderer_1 = require("@remotion/renderer");
19
+ const chalk_1 = require("./chalk");
18
20
  const check_version_1 = require("./check-version");
19
21
  const compositions_1 = require("./compositions");
22
+ const download_progress_1 = require("./download-progress");
23
+ const format_bytes_1 = require("./format-bytes");
20
24
  const get_cli_options_1 = require("./get-cli-options");
21
25
  const get_config_file_name_1 = require("./get-config-file-name");
22
26
  const handle_common_errors_1 = require("./handle-common-errors");
@@ -45,6 +49,7 @@ const cli = async () => {
45
49
  if (command !== versions_1.VERSIONS_COMMAND) {
46
50
  await (0, versions_1.validateVersionsBeforeCommand)();
47
51
  }
52
+ const errorSymbolicationLock = renderer_1.RenderInternals.registerErrorSymbolicationLock();
48
53
  try {
49
54
  if (command === 'compositions') {
50
55
  await (0, compositions_1.listCompositionsCommand)();
@@ -82,12 +87,15 @@ const cli = async () => {
82
87
  await (0, handle_common_errors_1.handleCommonError)(err);
83
88
  process.exit(1);
84
89
  }
90
+ finally {
91
+ renderer_1.RenderInternals.unlockErrorSymbolicationLock(errorSymbolicationLock);
92
+ }
85
93
  };
86
94
  exports.cli = cli;
87
95
  __exportStar(require("./render"), exports);
88
96
  exports.CliInternals = {
89
97
  createOverwriteableCliOutput: progress_bar_1.createOverwriteableCliOutput,
90
- chalk: chalk_1.default,
98
+ chalk: chalk_1.chalk,
91
99
  makeProgressBar: make_progress_bar_1.makeProgressBar,
92
100
  Log: log_1.Log,
93
101
  loadConfigFile: load_config_1.loadConfigFile,
@@ -99,4 +107,6 @@ exports.CliInternals = {
99
107
  quietFlagProvided: parse_command_line_1.quietFlagProvided,
100
108
  parsedCli: parse_command_line_1.parsedCli,
101
109
  handleCommonError: handle_common_errors_1.handleCommonError,
110
+ formatBytes: format_bytes_1.formatBytes,
111
+ getFileSizeDownloadBar: download_progress_1.getFileSizeDownloadBar,
102
112
  };
@@ -4,6 +4,8 @@ exports.lambdaCommand = void 0;
4
4
  const initialize_render_cli_1 = require("./initialize-render-cli");
5
5
  const log_1 = require("./log");
6
6
  const parse_command_line_1 = require("./parse-command-line");
7
+ const get_package_manager_1 = require("./preview-server/get-package-manager");
8
+ const update_available_1 = require("./preview-server/update-available");
7
9
  const lambdaCommand = async () => {
8
10
  try {
9
11
  const path = require.resolve('@remotion/lambda', {
@@ -15,11 +17,13 @@ const lambdaCommand = async () => {
15
17
  process.exit(0);
16
18
  }
17
19
  catch (err) {
20
+ const manager = (0, get_package_manager_1.getPackageManager)();
21
+ const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
18
22
  log_1.Log.error(err);
19
23
  log_1.Log.error('Remotion Lambda is not installed.');
20
24
  log_1.Log.info('');
21
25
  log_1.Log.info('You can install it using:');
22
- log_1.Log.info('npm i @remotion/lambda');
26
+ log_1.Log.info(`${installCommand} i @remotion/lambda@${(0, update_available_1.getRemotionVersion)()}`);
23
27
  process.exit(1);
24
28
  }
25
29
  };
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.default.blueBright(...args));
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.default.yellow(...args));
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.default.red(...args));
25
+ return console.error(...args.map((a) => chalk_1.chalk.red(a)));
29
26
  }
30
27
  },
31
28
  };
@@ -1,8 +1,9 @@
1
1
  import minimist from 'minimist';
2
- import { BrowserExecutable, Codec, FfmpegExecutable, ImageFormat, OpenGlRenderer, PixelFormat, ProResProfile } from 'remotion';
2
+ import type { BrowserExecutable, Codec, FfmpegExecutable, ImageFormat, OpenGlRenderer, PixelFormat, ProResProfile } from 'remotion';
3
3
  export declare type CommandLineOptions = {
4
4
  ['browser-executable']: BrowserExecutable;
5
5
  ['ffmpeg-executable']: FfmpegExecutable;
6
+ ['ffprobe-executable']: FfmpegExecutable;
6
7
  ['pixel-format']: PixelFormat;
7
8
  ['image-format']: ImageFormat;
8
9
  ['prores-profile']: ProResProfile;
@@ -42,6 +42,9 @@ const parseCommandLine = (type) => {
42
42
  if (exports.parsedCli['ffmpeg-executable']) {
43
43
  remotion_1.Config.Rendering.setFfmpegExecutable((0, path_1.resolve)(exports.parsedCli['ffmpeg-executable']));
44
44
  }
45
+ if (exports.parsedCli['ffprobe-executable']) {
46
+ remotion_1.Config.Rendering.setFfprobeExecutable((0, path_1.resolve)(exports.parsedCli['ffprobe-executable']));
47
+ }
45
48
  if (typeof exports.parsedCli['bundle-cache'] !== 'undefined') {
46
49
  remotion_1.Config.Bundling.setCachingEnabled(exports.parsedCli['bundle-cache'] !== 'false');
47
50
  }
@@ -113,6 +116,9 @@ const parseCommandLine = (type) => {
113
116
  if (typeof exports.parsedCli.scale !== 'undefined') {
114
117
  remotion_1.Config.Rendering.setScale(exports.parsedCli.scale);
115
118
  }
119
+ if (typeof exports.parsedCli.port !== 'undefined') {
120
+ remotion_1.Config.Bundling.setPort(exports.parsedCli.port);
121
+ }
116
122
  };
117
123
  exports.parseCommandLine = parseCommandLine;
118
124
  const quietFlagProvided = () => exports.parsedCli.quiet || exports.parsedCli.q;
@@ -0,0 +1,11 @@
1
+ import { RenderStep } from './step';
2
+ export declare const prepareEntryPoint: ({ file, otherSteps, publicPath, outDir, }: {
3
+ file: string;
4
+ otherSteps: RenderStep[];
5
+ outDir: string | null;
6
+ publicPath: string | null;
7
+ }) => Promise<{
8
+ urlOrBundle: string;
9
+ steps: RenderStep[];
10
+ shouldDelete: boolean;
11
+ }>;
@@ -0,0 +1,36 @@
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.prepareEntryPoint = void 0;
7
+ const renderer_1 = require("@remotion/renderer");
8
+ const promises_1 = require("fs/promises");
9
+ const path_1 = __importDefault(require("path"));
10
+ const process_1 = require("process");
11
+ const log_1 = require("./log");
12
+ const setup_cache_1 = require("./setup-cache");
13
+ const prepareEntryPoint = async ({ file, otherSteps, publicPath, outDir, }) => {
14
+ if (renderer_1.RenderInternals.isServeUrl(file)) {
15
+ return { urlOrBundle: file, steps: otherSteps, shouldDelete: false };
16
+ }
17
+ const joined = path_1.default.resolve(process.cwd(), file);
18
+ try {
19
+ const stats = await (0, promises_1.stat)(joined);
20
+ if (stats.isDirectory()) {
21
+ return { urlOrBundle: joined, steps: otherSteps, shouldDelete: false };
22
+ }
23
+ }
24
+ catch (err) {
25
+ log_1.Log.error(`No file or directory exists at ${joined}.`);
26
+ (0, process_1.exit)(1);
27
+ }
28
+ const urlOrBundle = await (0, setup_cache_1.bundleOnCli)({
29
+ fullPath: joined,
30
+ steps: ['bundling', ...otherSteps],
31
+ outDir,
32
+ publicPath,
33
+ });
34
+ return { urlOrBundle, steps: ['bundling', ...otherSteps], shouldDelete: true };
35
+ };
36
+ exports.prepareEntryPoint = prepareEntryPoint;
@@ -0,0 +1,7 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
4
+ import type { ReadStream } from 'fs';
5
+ import type { IncomingMessage, ServerResponse } from 'http';
6
+ export declare function setHeaderForResponse(res: ServerResponse, name: string, value: string | number): void;
7
+ export declare function send(req: IncomingMessage, res: ServerResponse, bufferOtStream: ReadStream | string | Buffer, byteLength: number): void;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.send = exports.setHeaderForResponse = void 0;
4
+ function setHeaderForResponse(res, name, value) {
5
+ res.setHeader(name, typeof value === 'number' ? String(value) : value);
6
+ }
7
+ exports.setHeaderForResponse = setHeaderForResponse;
8
+ function send(req, res, bufferOtStream, byteLength) {
9
+ if (typeof bufferOtStream === 'string' || Buffer.isBuffer(bufferOtStream)) {
10
+ res.end(bufferOtStream);
11
+ return;
12
+ }
13
+ setHeaderForResponse(res, 'Content-Length', byteLength);
14
+ if (req.method === 'HEAD') {
15
+ res.end();
16
+ return;
17
+ }
18
+ bufferOtStream.pipe(res);
19
+ }
20
+ exports.send = send;
@@ -0,0 +1,7 @@
1
+ import type { DevMiddlewareContext } from './types';
2
+ declare type PublicPath = {
3
+ outputPath: string;
4
+ publicPath: string;
5
+ };
6
+ export declare function getPaths(context: DevMiddlewareContext): PublicPath[];
7
+ export {};