@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,2 @@
1
+ import { RenderStep } from './step';
2
+ export declare const bundleOnCli: (fullPath: string, steps: RenderStep[]) => Promise<string>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bundleOnCli = void 0;
4
+ const bundler_1 = require("@remotion/bundler");
5
+ const remotion_1 = require("remotion");
6
+ const log_1 = require("./log");
7
+ const parse_command_line_1 = require("./parse-command-line");
8
+ const progress_bar_1 = require("./progress-bar");
9
+ const bundleOnCli = async (fullPath, steps) => {
10
+ var _a;
11
+ const shouldCache = remotion_1.Internals.getWebpackCaching();
12
+ const cacheExistedBefore = bundler_1.BundlerInternals.cacheExists('production', null);
13
+ if (cacheExistedBefore && !shouldCache) {
14
+ log_1.Log.info('🧹 Cache disabled but found. Deleting... ');
15
+ await bundler_1.BundlerInternals.clearCache('production', null);
16
+ }
17
+ const bundleStartTime = Date.now();
18
+ const bundlingProgress = (0, progress_bar_1.createOverwriteableCliOutput)((0, parse_command_line_1.quietFlagProvided)());
19
+ const bundled = await (0, bundler_1.bundle)(fullPath, (progress) => {
20
+ bundlingProgress.update((0, progress_bar_1.makeBundlingProgress)({
21
+ progress: progress / 100,
22
+ steps,
23
+ doneIn: null,
24
+ }));
25
+ }, {
26
+ enableCaching: shouldCache,
27
+ webpackOverride: (_a = remotion_1.Internals.getWebpackOverrideFn()) !== null && _a !== void 0 ? _a : remotion_1.Internals.defaultOverrideFunction,
28
+ });
29
+ bundlingProgress.update((0, progress_bar_1.makeBundlingProgress)({
30
+ progress: 1,
31
+ steps,
32
+ doneIn: Date.now() - bundleStartTime,
33
+ }) + '\n');
34
+ log_1.Log.verbose('Bundled under', bundled);
35
+ const cacheExistedAfter = bundler_1.BundlerInternals.cacheExists('production', null);
36
+ if (cacheExistedAfter && !cacheExistedBefore) {
37
+ log_1.Log.info('⚡️ Cached bundle. Subsequent renders will be faster.');
38
+ }
39
+ return bundled;
40
+ };
41
+ exports.bundleOnCli = bundleOnCli;
@@ -0,0 +1 @@
1
+ export declare const bundleCommand: () => Promise<void>;
package/dist/bundle.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bundleCommand = void 0;
4
+ const get_cli_options_1 = require("./get-cli-options");
5
+ const initialize_render_cli_1 = require("./initialize-render-cli");
6
+ const log_1 = require("./log");
7
+ const parse_command_line_1 = require("./parse-command-line");
8
+ const prepare_entry_point_1 = require("./prepare-entry-point");
9
+ const bundleCommand = async () => {
10
+ const file = parse_command_line_1.parsedCli._[1];
11
+ if (!file) {
12
+ log_1.Log.error('No entry point specified. Pass more arguments:');
13
+ log_1.Log.error(' npx remotion bundle [entry-point]');
14
+ log_1.Log.error('Documentation: https://www.remotion.dev/docs/render');
15
+ process.exit(1);
16
+ }
17
+ await (0, initialize_render_cli_1.initializeRenderCli)('bundle');
18
+ const { publicPath, bundleOutDir } = await (0, get_cli_options_1.getCliOptions)({
19
+ isLambda: false,
20
+ type: 'get-compositions-or-bundle',
21
+ });
22
+ const { urlOrBundle } = await (0, prepare_entry_point_1.prepareEntryPoint)({
23
+ file,
24
+ otherSteps: [],
25
+ outDir: bundleOutDir,
26
+ publicPath,
27
+ });
28
+ log_1.Log.info();
29
+ log_1.Log.info(urlOrBundle);
30
+ };
31
+ exports.bundleCommand = bundleCommand;
@@ -0,0 +1,58 @@
1
+ declare type Style = {
2
+ codes: [number, number];
3
+ name: string;
4
+ wrap?: (input: string, newline: boolean) => string;
5
+ };
6
+ declare type Method = (str: string) => string;
7
+ declare type Colors = {
8
+ enabled: boolean;
9
+ visible: boolean;
10
+ styles: Record<string, Style>;
11
+ keys: Record<string, string[]>;
12
+ alias?: (name: string, col: string) => void;
13
+ };
14
+ declare type ColorsWithMethods = Colors & {
15
+ reset: Method;
16
+ bold: Method;
17
+ dim: Method;
18
+ italic: Method;
19
+ underline: Method;
20
+ inverse: Method;
21
+ hidden: Method;
22
+ strikethrough: Method;
23
+ black: Method;
24
+ red: Method;
25
+ green: Method;
26
+ yellow: Method;
27
+ blue: Method;
28
+ magenta: Method;
29
+ cyan: Method;
30
+ white: Method;
31
+ gray: Method;
32
+ bgBlack: Method;
33
+ bgRed: Method;
34
+ bgGreen: Method;
35
+ bgYellow: Method;
36
+ bgBlue: Method;
37
+ bgMagenta: Method;
38
+ bgCyan: Method;
39
+ bgWhite: Method;
40
+ blackBright: Method;
41
+ redBright: Method;
42
+ greenBright: Method;
43
+ yellowBright: Method;
44
+ blueBright: Method;
45
+ magentaBright: Method;
46
+ cyanBright: Method;
47
+ whiteBright: Method;
48
+ bgBlackBright: Method;
49
+ bgRedBright: Method;
50
+ bgGreenBright: Method;
51
+ bgYellowBright: Method;
52
+ bgBlueBright: Method;
53
+ bgMagentaBright: Method;
54
+ bgCyanBright: Method;
55
+ bgWhiteBright: Method;
56
+ };
57
+ export declare const chalk: ColorsWithMethods;
58
+ export {};
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chalk = void 0;
4
+ const hasColor = () => {
5
+ if (typeof process !== 'undefined') {
6
+ return process.env.FORCE_COLOR !== '0';
7
+ }
8
+ return false;
9
+ };
10
+ exports.chalk = (() => {
11
+ const colors = {
12
+ enabled: hasColor(),
13
+ visible: true,
14
+ styles: {},
15
+ keys: {},
16
+ };
17
+ const ansi = (st) => {
18
+ const open = `\u001b[${st.codes[0]}m`;
19
+ const close = `\u001b[${st.codes[1]}m`;
20
+ const regex = new RegExp(`\\u001b\\[${st.codes[1]}m`, 'g');
21
+ st.wrap = (input, newline) => {
22
+ if (input.includes(close))
23
+ input = input.replace(regex, close + open);
24
+ const output = open + input + close;
25
+ // see https://github.com/chalk/chalk/pull/92, thanks to the
26
+ // chalk contributors for this fix. However, we've confirmed that
27
+ // this issue is also present in Windows terminals
28
+ return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output;
29
+ };
30
+ return st;
31
+ };
32
+ const wrap = (sty, input, newline) => {
33
+ var _a;
34
+ return (_a = sty.wrap) === null || _a === void 0 ? void 0 : _a.call(sty, input, newline);
35
+ };
36
+ const style = (input, stack) => {
37
+ if (input === '' || input === null || input === undefined)
38
+ return '';
39
+ if (colors.enabled === false)
40
+ return input;
41
+ if (colors.visible === false)
42
+ return '';
43
+ let str = String(input);
44
+ const nl = str.includes('\n');
45
+ let n = stack.length;
46
+ while (n-- > 0)
47
+ str = wrap(colors.styles[stack[n]], str, nl);
48
+ return str;
49
+ };
50
+ const define = (name, codes, type) => {
51
+ colors.styles[name] = ansi({ name, codes });
52
+ const keys = colors.keys[type] || (colors.keys[type] = []);
53
+ keys.push(name);
54
+ Reflect.defineProperty(colors, name, {
55
+ configurable: true,
56
+ enumerable: true,
57
+ set(value) {
58
+ var _a;
59
+ (_a = colors.alias) === null || _a === void 0 ? void 0 : _a.call(colors, name, value);
60
+ },
61
+ get() {
62
+ const color = (input) => style(input, color.stack);
63
+ Reflect.setPrototypeOf(color, colors);
64
+ color.stack = this.stack ? this.stack.concat(name) : [name];
65
+ return color;
66
+ },
67
+ });
68
+ };
69
+ define('reset', [0, 0], 'modifier');
70
+ define('bold', [1, 22], 'modifier');
71
+ define('dim', [2, 22], 'modifier');
72
+ define('italic', [3, 23], 'modifier');
73
+ define('underline', [4, 24], 'modifier');
74
+ define('inverse', [7, 27], 'modifier');
75
+ define('hidden', [8, 28], 'modifier');
76
+ define('strikethrough', [9, 29], 'modifier');
77
+ define('black', [30, 39], 'color');
78
+ define('red', [31, 39], 'color');
79
+ define('green', [32, 39], 'color');
80
+ define('yellow', [33, 39], 'color');
81
+ define('blue', [34, 39], 'color');
82
+ define('magenta', [35, 39], 'color');
83
+ define('cyan', [36, 39], 'color');
84
+ define('white', [37, 39], 'color');
85
+ define('gray', [90, 39], 'color');
86
+ define('grey', [90, 39], 'color');
87
+ define('bgBlack', [40, 49], 'bg');
88
+ define('bgRed', [41, 49], 'bg');
89
+ define('bgGreen', [42, 49], 'bg');
90
+ define('bgYellow', [43, 49], 'bg');
91
+ define('bgBlue', [44, 49], 'bg');
92
+ define('bgMagenta', [45, 49], 'bg');
93
+ define('bgCyan', [46, 49], 'bg');
94
+ define('bgWhite', [47, 49], 'bg');
95
+ define('blackBright', [90, 39], 'bright');
96
+ define('redBright', [91, 39], 'bright');
97
+ define('greenBright', [92, 39], 'bright');
98
+ define('yellowBright', [93, 39], 'bright');
99
+ define('blueBright', [94, 39], 'bright');
100
+ define('magentaBright', [95, 39], 'bright');
101
+ define('cyanBright', [96, 39], 'bright');
102
+ define('whiteBright', [97, 39], 'bright');
103
+ define('bgBlackBright', [100, 49], 'bgBright');
104
+ define('bgRedBright', [101, 49], 'bgBright');
105
+ define('bgGreenBright', [102, 49], 'bgBright');
106
+ define('bgYellowBright', [103, 49], 'bgBright');
107
+ define('bgBlueBright', [104, 49], 'bgBright');
108
+ define('bgMagentaBright', [105, 49], 'bgBright');
109
+ define('bgCyanBright', [106, 49], 'bgBright');
110
+ define('bgWhiteBright', [107, 49], 'bgBright');
111
+ colors.alias = (name, color) => {
112
+ // @ts-expect-error
113
+ const fn = colors[color];
114
+ if (typeof fn !== 'function') {
115
+ throw new TypeError('Expected alias to be the name of an existing color (string) or a function');
116
+ }
117
+ if (!fn.stack) {
118
+ Reflect.defineProperty(fn, 'name', { value: name });
119
+ colors.styles[name] = fn;
120
+ fn.stack = [name];
121
+ }
122
+ Reflect.defineProperty(colors, name, {
123
+ configurable: true,
124
+ enumerable: true,
125
+ set(value) {
126
+ var _a;
127
+ (_a = colors.alias) === null || _a === void 0 ? void 0 : _a.call(colors, name, value);
128
+ },
129
+ get() {
130
+ const col = (input) => style(input, col.stack);
131
+ Reflect.setPrototypeOf(col, colors);
132
+ col.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack;
133
+ return col;
134
+ },
135
+ });
136
+ };
137
+ return colors;
138
+ })();
@@ -0,0 +1,111 @@
1
+ declare const isHyper: boolean;
2
+ declare const isWindows: boolean;
3
+ declare const isLinux: boolean;
4
+ declare const common: {
5
+ ballotDisabled: string;
6
+ ballotOff: string;
7
+ ballotOn: string;
8
+ bullet: string;
9
+ bulletWhite: string;
10
+ fullBlock: string;
11
+ heart: string;
12
+ identicalTo: string;
13
+ line: string;
14
+ mark: string;
15
+ middot: string;
16
+ minus: string;
17
+ multiplication: string;
18
+ obelus: string;
19
+ pencilDownRight: string;
20
+ pencilRight: string;
21
+ pencilUpRight: string;
22
+ percent: string;
23
+ pilcrow2: string;
24
+ pilcrow: string;
25
+ plusMinus: string;
26
+ question: string;
27
+ section: string;
28
+ starsOff: string;
29
+ starsOn: string;
30
+ upDownArrow: string;
31
+ };
32
+ declare const windows: {
33
+ check: string;
34
+ cross: string;
35
+ ellipsisLarge: string;
36
+ ellipsis: string;
37
+ info: string;
38
+ questionSmall: string;
39
+ pointer: string;
40
+ pointerSmall: string;
41
+ radioOff: string;
42
+ radioOn: string;
43
+ warning: string;
44
+ ballotDisabled: string;
45
+ ballotOff: string;
46
+ ballotOn: string;
47
+ bullet: string;
48
+ bulletWhite: string;
49
+ fullBlock: string;
50
+ heart: string;
51
+ identicalTo: string;
52
+ line: string;
53
+ mark: string;
54
+ middot: string;
55
+ minus: string;
56
+ multiplication: string;
57
+ obelus: string;
58
+ pencilDownRight: string;
59
+ pencilRight: string;
60
+ pencilUpRight: string;
61
+ percent: string;
62
+ pilcrow2: string;
63
+ pilcrow: string;
64
+ plusMinus: string;
65
+ question: string;
66
+ section: string;
67
+ starsOff: string;
68
+ starsOn: string;
69
+ upDownArrow: string;
70
+ };
71
+ declare const other: {
72
+ ballotCross: string;
73
+ check: string;
74
+ cross: string;
75
+ ellipsisLarge: string;
76
+ ellipsis: string;
77
+ info: string;
78
+ questionFull: string;
79
+ questionSmall: string;
80
+ pointer: string;
81
+ pointerSmall: string;
82
+ radioOff: string;
83
+ radioOn: string;
84
+ warning: string;
85
+ ballotDisabled: string;
86
+ ballotOff: string;
87
+ ballotOn: string;
88
+ bullet: string;
89
+ bulletWhite: string;
90
+ fullBlock: string;
91
+ heart: string;
92
+ identicalTo: string;
93
+ line: string;
94
+ mark: string;
95
+ middot: string;
96
+ minus: string;
97
+ multiplication: string;
98
+ obelus: string;
99
+ pencilDownRight: string;
100
+ pencilRight: string;
101
+ pencilUpRight: string;
102
+ percent: string;
103
+ pilcrow2: string;
104
+ pilcrow: string;
105
+ plusMinus: string;
106
+ question: string;
107
+ section: string;
108
+ starsOff: string;
109
+ starsOn: string;
110
+ upDownArrow: string;
111
+ };
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+ const isHyper = typeof process !== 'undefined' && process.env.TERM_PROGRAM === 'Hyper';
3
+ const isWindows = typeof process !== 'undefined' && process.platform === 'win32';
4
+ const isLinux = typeof process !== 'undefined' && process.platform === 'linux';
5
+ const common = {
6
+ ballotDisabled: '☒',
7
+ ballotOff: '☐',
8
+ ballotOn: '☑',
9
+ bullet: '•',
10
+ bulletWhite: '◦',
11
+ fullBlock: '█',
12
+ heart: '❤',
13
+ identicalTo: '≡',
14
+ line: '─',
15
+ mark: '※',
16
+ middot: '·',
17
+ minus: '-',
18
+ multiplication: '×',
19
+ obelus: '÷',
20
+ pencilDownRight: '✎',
21
+ pencilRight: '✏',
22
+ pencilUpRight: '✐',
23
+ percent: '%',
24
+ pilcrow2: '❡',
25
+ pilcrow: '¶',
26
+ plusMinus: '±',
27
+ question: '?',
28
+ section: '§',
29
+ starsOff: '☆',
30
+ starsOn: '★',
31
+ upDownArrow: '↕',
32
+ };
33
+ const windows = {
34
+ ...common,
35
+ check: '√',
36
+ cross: '×',
37
+ ellipsisLarge: '...',
38
+ ellipsis: '...',
39
+ info: 'i',
40
+ questionSmall: '?',
41
+ pointer: '>',
42
+ pointerSmall: '»',
43
+ radioOff: '( )',
44
+ radioOn: '(*)',
45
+ warning: '‼',
46
+ };
47
+ const other = {
48
+ ...common,
49
+ ballotCross: '✘',
50
+ check: '✔',
51
+ cross: '✖',
52
+ ellipsisLarge: '⋯',
53
+ ellipsis: '…',
54
+ info: 'ℹ',
55
+ questionFull: '?',
56
+ questionSmall: '﹖',
57
+ pointer: isLinux ? '▸' : '❯',
58
+ pointerSmall: isLinux ? '‣' : '›',
59
+ radioOff: '◯',
60
+ radioOn: '◉',
61
+ warning: '⚠',
62
+ };
63
+ module.exports = isWindows && !isHyper ? windows : other;
64
+ Reflect.defineProperty(module.exports, 'common', {
65
+ enumerable: false,
66
+ value: common,
67
+ });
68
+ Reflect.defineProperty(module.exports, 'windows', {
69
+ enumerable: false,
70
+ value: windows,
71
+ });
72
+ Reflect.defineProperty(module.exports, 'other', {
73
+ enumerable: false,
74
+ value: other,
75
+ });
@@ -0,0 +1,2 @@
1
+ export declare function stringReplaceAll(string: string, substring: string, replacer: string): string;
2
+ export declare function stringEncaseCRLFWithFirstIndex(string: string, prefix: string, postfix: string, index: number): string;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stringEncaseCRLFWithFirstIndex = exports.stringReplaceAll = void 0;
4
+ function stringReplaceAll(string, substring, replacer) {
5
+ let index = string.indexOf(substring);
6
+ if (index === -1) {
7
+ return string;
8
+ }
9
+ const substringLength = substring.length;
10
+ let endIndex = 0;
11
+ let returnValue = '';
12
+ do {
13
+ returnValue += string.slice(endIndex, index) + substring + replacer;
14
+ endIndex = index + substringLength;
15
+ index = string.indexOf(substring, endIndex);
16
+ } while (index !== -1);
17
+ returnValue += string.slice(endIndex);
18
+ return returnValue;
19
+ }
20
+ exports.stringReplaceAll = stringReplaceAll;
21
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
22
+ let endIndex = 0;
23
+ let returnValue = '';
24
+ do {
25
+ const gotCR = string[index - 1] === '\r';
26
+ returnValue +=
27
+ string.slice(endIndex, gotCR ? index - 1 : index) +
28
+ prefix +
29
+ (gotCR ? '\r\n' : '\n') +
30
+ postfix;
31
+ endIndex = index + 1;
32
+ index = string.indexOf('\n', endIndex);
33
+ } while (index !== -1);
34
+ returnValue += string.slice(endIndex);
35
+ return returnValue;
36
+ }
37
+ exports.stringEncaseCRLFWithFirstIndex = stringEncaseCRLFWithFirstIndex;
@@ -1,2 +1,2 @@
1
- import { ErrorWithStackFrame } from '@remotion/renderer';
1
+ import type { ErrorWithStackFrame } from '@remotion/renderer';
2
2
  export declare const printCodeFrameAndStack: (err: ErrorWithStackFrame) => void;
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.printCodeFrameAndStack = void 0;
7
- const chalk_1 = __importDefault(require("chalk"));
8
4
  const remotion_1 = require("remotion");
5
+ const chalk_1 = require("./chalk");
9
6
  const log_1 = require("./log");
10
7
  const makeFileName = (firstFrame) => {
11
8
  return [
@@ -24,12 +21,12 @@ const printCodeFrame = (frame) => {
24
21
  }
25
22
  log_1.Log.info();
26
23
  const longestLineNumber = Math.max(...frame.originalScriptCode.map((script) => script.lineNumber)).toString().length;
27
- log_1.Log.info('at', chalk_1.default.underline(makeFileName(frame)));
24
+ log_1.Log.info('at', chalk_1.chalk.underline(makeFileName(frame)));
28
25
  const alignLeftAmount = Math.min(...frame.originalScriptCode.map((c) => c.content.length - c.content.trimStart().length));
29
26
  log_1.Log.info(`${frame.originalScriptCode
30
27
  .map((c) => {
31
28
  const content = `${String(c.lineNumber).padStart(longestLineNumber, ' ')} | ${c.content.substring(alignLeftAmount)}`;
32
- return c.highlight ? content : chalk_1.default.gray(content);
29
+ return c.highlight ? content : chalk_1.chalk.gray(content);
33
30
  })
34
31
  .join('\n')}`);
35
32
  };
@@ -38,7 +35,7 @@ const logLine = (frame) => {
38
35
  if (!fileName) {
39
36
  return;
40
37
  }
41
- log_1.Log.info(chalk_1.default.gray(['at', frame.originalFunctionName, `${chalk_1.default.blueBright(`(${fileName})`)}`]
38
+ log_1.Log.info(chalk_1.chalk.gray(['at', frame.originalFunctionName, `${chalk_1.chalk.blueBright(`(${fileName})`)}`]
42
39
  .filter(remotion_1.Internals.truthy)
43
40
  .join(' ')));
44
41
  };
@@ -49,7 +46,7 @@ const printCodeFrameAndStack = (err) => {
49
46
  return;
50
47
  }
51
48
  const firstFrame = err.symbolicatedStackFrames[0];
52
- log_1.Log.error(chalk_1.default.bgRed(chalk_1.default.white(` ${err.name} `)), err.message);
49
+ log_1.Log.error(chalk_1.chalk.bgRed(chalk_1.chalk.white(` ${err.name} `)), err.message);
53
50
  printCodeFrame(firstFrame);
54
51
  log_1.Log.info();
55
52
  for (const frame of err.symbolicatedStackFrames) {
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.listCompositionsCommand = void 0;
7
7
  const renderer_1 = require("@remotion/renderer");
8
8
  const path_1 = __importDefault(require("path"));
9
+ const get_cli_options_1 = require("./get-cli-options");
9
10
  const get_config_file_name_1 = require("./get-config-file-name");
10
11
  const log_1 = require("./log");
11
12
  const parse_command_line_1 = require("./parse-command-line");
@@ -26,15 +27,25 @@ const max = (arr) => {
26
27
  const listCompositionsCommand = async () => {
27
28
  const file = parse_command_line_1.parsedCli._[1];
28
29
  if (!file) {
29
- log_1.Log.error('The compositions command requires you to specify a root file. For example');
30
+ log_1.Log.error('The `compositions` command requires you to specify a root file. For example');
30
31
  log_1.Log.error(' npx remotion compositions src/index.tsx');
31
32
  log_1.Log.error('See https://www.remotion.dev/docs/register-root for more information.');
32
33
  process.exit(1);
33
34
  }
34
35
  const fullPath = path_1.default.join(process.cwd(), file);
35
- (0, get_config_file_name_1.loadConfig)();
36
+ await (0, get_config_file_name_1.loadConfig)();
37
+ const { browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, } = await (0, get_cli_options_1.getCliOptions)({ isLambda: false, type: 'get-compositions' });
36
38
  const bundled = await (0, setup_cache_1.bundleOnCli)(fullPath, ['bundling']);
37
- const compositions = await (0, renderer_1.getCompositions)(bundled);
39
+ const compositions = await (0, renderer_1.getCompositions)(bundled, {
40
+ browserExecutable,
41
+ ffmpegExecutable,
42
+ ffprobeExecutable,
43
+ chromiumOptions,
44
+ envVariables,
45
+ inputProps,
46
+ timeoutInMilliseconds: puppeteerTimeout,
47
+ port,
48
+ });
38
49
  log_1.Log.info();
39
50
  log_1.Log.info('The following compositions are available:');
40
51
  log_1.Log.info();
@@ -1,2 +1,3 @@
1
- import { DownloadProgress } from './progress-bar';
1
+ import type { DownloadProgress } from './progress-bar';
2
+ export declare const getFileSizeDownloadBar: (downloaded: number) => string;
2
3
  export declare const makeMultiDownloadProgress: (progresses: DownloadProgress[]) => string | null;
@@ -1,22 +1,37 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeMultiDownloadProgress = void 0;
3
+ exports.makeMultiDownloadProgress = exports.getFileSizeDownloadBar = void 0;
4
+ const format_bytes_1 = require("./format-bytes");
4
5
  const make_progress_bar_1 = require("./make-progress-bar");
6
+ const getFileSizeDownloadBar = (downloaded) => {
7
+ const desiredLength = (0, make_progress_bar_1.makeProgressBar)(0).length;
8
+ return `[${(0, format_bytes_1.formatBytes)(downloaded).padEnd(desiredLength - 2, ' ')}]`;
9
+ };
10
+ exports.getFileSizeDownloadBar = getFileSizeDownloadBar;
5
11
  const makeMultiDownloadProgress = (progresses) => {
6
12
  if (progresses.length === 0) {
7
13
  return null;
8
14
  }
9
15
  if (progresses.length === 1) {
10
16
  const [progress] = progresses;
17
+ const truncatedFileName = progress.name.length >= 60
18
+ ? progress.name.substring(0, 57) + '...'
19
+ : progress.name;
11
20
  return [
12
21
  ` +`,
13
- (0, make_progress_bar_1.makeProgressBar)(progress.progress),
14
- `Downloading ${progress.name}`,
22
+ progress.progress
23
+ ? (0, make_progress_bar_1.makeProgressBar)(progress.progress)
24
+ : (0, exports.getFileSizeDownloadBar)(progress.downloaded),
25
+ `Downloading ${truncatedFileName}`,
15
26
  ].join(' ');
16
27
  }
28
+ const everyFileHasContentLength = progresses.every((p) => p.totalBytes !== null);
17
29
  return [
18
30
  ` +`,
19
- (0, make_progress_bar_1.makeProgressBar)(progresses.reduce((a, b) => a + b.progress, 0) / progresses.length),
31
+ everyFileHasContentLength
32
+ ? (0, make_progress_bar_1.makeProgressBar)(progresses.reduce((a, b) => a + b.progress, 0) /
33
+ progresses.length)
34
+ : (0, exports.getFileSizeDownloadBar)(progresses.reduce((a, b) => a + b.downloaded, 0)),
20
35
  `Downloading ${progresses.length} files`,
21
36
  ].join(' ');
22
37
  };
@@ -98,13 +98,13 @@ const AudioWaveform = ({ src, fps, startFrom, durationInFrames, visualizationWid
98
98
  });
99
99
  }, [durationInFrames, fps, metadata, startFrom, visualizationWidth]);
100
100
  if (error) {
101
- return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)("div", { style: errorMessage, children: "No waveform available. Audio might not support CORS." }, void 0) }, void 0));
101
+ return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)("div", { style: errorMessage, children: "No waveform available. Audio might not support CORS." }) }));
102
102
  }
103
103
  if (!metadata) {
104
104
  return null;
105
105
  }
106
106
  return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [normalized.map((w) => {
107
107
  return (0, jsx_runtime_1.jsx)(AudioWaveformBar_1.AudioWaveformBar, { amplitude: w.amplitude }, w.index);
108
- }), (0, jsx_runtime_1.jsx)("canvas", { ref: canvas, style: canvasStyle, width: visualizationWidth, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT }, void 0)] }, void 0));
108
+ }), (0, jsx_runtime_1.jsx)("canvas", { ref: canvas, style: canvasStyle, width: visualizationWidth, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT })] }));
109
109
  };
110
110
  exports.AudioWaveform = AudioWaveform;
@@ -19,6 +19,6 @@ const AudioWaveformBar = ({ amplitude }) => {
19
19
  height: (timeline_layout_1.TIMELINE_LAYER_HEIGHT / 2) * amplitude,
20
20
  };
21
21
  }, [amplitude]);
22
- return (0, jsx_runtime_1.jsx)("div", { style: style }, void 0);
22
+ return (0, jsx_runtime_1.jsx)("div", { style: style });
23
23
  };
24
24
  exports.AudioWaveformBar = AudioWaveformBar;