@remotion/cli 3.1.5 → 3.1.8

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 (491) hide show
  1. package/dist/chalk/symbols.d.ts +111 -0
  2. package/dist/chalk/symbols.js +75 -0
  3. package/dist/chalk/utilities.d.ts +2 -0
  4. package/dist/chalk/utilities.js +37 -0
  5. package/dist/code-frame.js +3 -3
  6. package/dist/compositions.d.ts +1 -1
  7. package/dist/compositions.js +16 -4
  8. package/dist/config/browser-executable.d.ts +3 -0
  9. package/dist/config/browser-executable.js +12 -0
  10. package/dist/config/browser.d.ts +3 -0
  11. package/dist/config/browser.js +18 -0
  12. package/dist/config/chromium-flags.d.ts +9 -0
  13. package/dist/config/chromium-flags.js +33 -0
  14. package/dist/config/codec.d.ts +7 -0
  15. package/dist/config/codec.js +40 -0
  16. package/dist/config/concurrency.d.ts +3 -0
  17. package/dist/config/concurrency.js +12 -0
  18. package/dist/config/crf.d.ts +4 -0
  19. package/dist/config/crf.js +23 -0
  20. package/dist/config/env-file.d.ts +2 -0
  21. package/dist/config/env-file.js +10 -0
  22. package/dist/config/every-nth-frame.d.ts +3 -0
  23. package/dist/config/every-nth-frame.js +20 -0
  24. package/dist/config/ffmpeg-executable.d.ts +5 -0
  25. package/dist/config/ffmpeg-executable.js +21 -0
  26. package/dist/config/frame-range.d.ts +4 -0
  27. package/dist/config/frame-range.js +35 -0
  28. package/dist/config/image-format.d.ts +3 -0
  29. package/dist/config/image-format.js +20 -0
  30. package/dist/config/image-sequence.d.ts +3 -0
  31. package/dist/config/image-sequence.js +15 -0
  32. package/dist/config/index.d.ts +43 -0
  33. package/dist/config/index.js +162 -0
  34. package/dist/config/log.d.ts +3 -0
  35. package/dist/config/log.js +12 -0
  36. package/dist/config/max-timeline-tracks.d.ts +2 -0
  37. package/dist/config/max-timeline-tracks.js +24 -0
  38. package/dist/config/number-of-gif-loops.d.ts +4 -0
  39. package/dist/config/number-of-gif-loops.js +21 -0
  40. package/dist/config/output-location.d.ts +2 -0
  41. package/dist/config/output-location.js +16 -0
  42. package/dist/config/override-webpack.d.ts +5 -0
  43. package/dist/config/override-webpack.js +14 -0
  44. package/dist/config/overwrite.d.ts +2 -0
  45. package/dist/config/overwrite.js +14 -0
  46. package/dist/config/pixel-format.d.ts +3 -0
  47. package/dist/config/pixel-format.js +16 -0
  48. package/dist/config/preview-server.d.ts +2 -0
  49. package/dist/config/preview-server.js +20 -0
  50. package/dist/config/prores-profile.d.ts +3 -0
  51. package/dist/config/prores-profile.js +12 -0
  52. package/dist/config/quality.d.ts +2 -0
  53. package/dist/config/quality.js +17 -0
  54. package/dist/config/scale.d.ts +3 -0
  55. package/dist/config/scale.js +15 -0
  56. package/dist/config/still-frame.d.ts +2 -0
  57. package/dist/config/still-frame.js +12 -0
  58. package/dist/config/timeout.d.ts +2 -0
  59. package/dist/config/timeout.js +17 -0
  60. package/dist/config/webpack-caching.d.ts +3 -0
  61. package/dist/config/webpack-caching.js +16 -0
  62. package/dist/editor/components/CompositionManager.d.ts +4 -0
  63. package/dist/editor/components/CompositionManager.js +60 -0
  64. package/dist/editor/components/CompositionSelectorItem.d.ts +1 -1
  65. package/dist/editor/components/CompositionSelectorItem.js +2 -1
  66. package/dist/editor/components/Editor.js +2 -1
  67. package/dist/editor/components/InitialCompositionLoader.d.ts +1 -1
  68. package/dist/editor/components/InitialCompositionLoader.js +17 -4
  69. package/dist/editor/components/Menu/MenuItem.js +1 -1
  70. package/dist/editor/components/Menu/MenuSubItem.js +1 -1
  71. package/dist/editor/components/Menu/styles.d.ts +3 -2
  72. package/dist/editor/components/Menu/styles.js +10 -3
  73. package/dist/editor/components/NewComposition/ComboBox.js +12 -2
  74. package/dist/editor/components/PlayPause.js +4 -0
  75. package/dist/editor/components/Timeline/TimelineDragHandler.js +3 -2
  76. package/dist/editor/components/Timeline/TimelineInOutPointer.js +2 -1
  77. package/dist/editor/components/Timeline/TimelineListItem.js +1 -0
  78. package/dist/editor/components/Timeline/TimelineScrollable.d.ts +4 -0
  79. package/dist/editor/components/Timeline/TimelineScrollable.js +23 -0
  80. package/dist/editor/components/Timeline/TimelineZoomControls.d.ts +2 -0
  81. package/dist/editor/components/Timeline/TimelineZoomControls.js +29 -0
  82. package/dist/editor/components/Timeline/timeline-scroll-logic.d.ts +4 -0
  83. package/dist/editor/components/Timeline/timeline-scroll-logic.js +13 -0
  84. package/dist/editor/components/TimelineInOutToggle.js +3 -2
  85. package/dist/editor/state/in-out.d.ts +12 -0
  86. package/dist/editor/state/in-out.js +23 -0
  87. package/dist/editor/state/timeline-zoom.d.ts +10 -0
  88. package/dist/editor/state/timeline-zoom.js +24 -0
  89. package/dist/find-closest-package-json.d.ts +2 -0
  90. package/dist/find-closest-package-json.js +35 -0
  91. package/dist/get-cli-options.d.ts +6 -7
  92. package/dist/get-cli-options.js +43 -48
  93. package/dist/get-composition-id.d.ts +1 -2
  94. package/dist/get-composition-id.js +2 -3
  95. package/dist/get-config-file-name.d.ts +1 -1
  96. package/dist/get-config-file-name.js +9 -6
  97. package/dist/get-env.js +6 -4
  98. package/dist/get-filename.d.ts +4 -3
  99. package/dist/get-filename.js +5 -5
  100. package/dist/get-final-output-codec.d.ts +6 -0
  101. package/dist/get-final-output-codec.js +63 -0
  102. package/dist/image-formats.d.ts +3 -3
  103. package/dist/image-formats.js +4 -3
  104. package/dist/index.d.ts +11 -10
  105. package/dist/index.js +17 -9
  106. package/dist/initialize-render-cli.d.ts +1 -1
  107. package/dist/initialize-render-cli.js +8 -3
  108. package/dist/lambda-command.d.ts +1 -1
  109. package/dist/lambda-command.js +4 -4
  110. package/dist/load-config.d.ts +1 -1
  111. package/dist/load-config.js +16 -5
  112. package/dist/log.js +7 -6
  113. package/dist/parse-command-line.d.ts +1 -1
  114. package/dist/parse-command-line.js +31 -30
  115. package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.js +2 -2
  116. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.d.ts +1 -1
  117. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.js +3 -3
  118. package/dist/preview-server/fast-refresh/helpers.d.ts +39 -0
  119. package/dist/preview-server/fast-refresh/helpers.js +145 -0
  120. package/dist/preview-server/fast-refresh/index.d.ts +30 -0
  121. package/dist/preview-server/fast-refresh/index.js +86 -0
  122. package/dist/preview-server/fast-refresh/loader.d.ts +35 -0
  123. package/dist/preview-server/fast-refresh/loader.js +81 -0
  124. package/dist/preview-server/fast-refresh/runtime.d.ts +35 -0
  125. package/dist/preview-server/fast-refresh/runtime.js +32 -0
  126. package/dist/preview-server/get-package-manager.d.ts +1 -1
  127. package/dist/preview-server/get-package-manager.js +2 -2
  128. package/dist/preview-server/project-info.d.ts +1 -1
  129. package/dist/preview-server/project-info.js +3 -3
  130. package/dist/preview-server/routes.d.ts +2 -1
  131. package/dist/preview-server/routes.js +28 -17
  132. package/dist/preview-server/start-server.d.ts +1 -0
  133. package/dist/preview-server/start-server.js +4 -2
  134. package/dist/preview-server/static-preview.d.ts +1 -0
  135. package/dist/preview-server/static-preview.js +40 -0
  136. package/dist/preview-server/update-available.d.ts +1 -1
  137. package/dist/preview-server/update-available.js +8 -5
  138. package/dist/preview-server/webpack-cache.d.ts +12 -0
  139. package/dist/preview-server/webpack-cache.js +66 -0
  140. package/dist/preview.d.ts +1 -1
  141. package/dist/preview.js +5 -4
  142. package/dist/previewEntry.js +1 -0
  143. package/dist/progress-bar.d.ts +1 -2
  144. package/dist/progress-bar.js +5 -4
  145. package/dist/render.d.ts +1 -1
  146. package/dist/render.js +39 -19
  147. package/dist/setup-cache.d.ts +10 -1
  148. package/dist/setup-cache.js +32 -10
  149. package/dist/still.d.ts +1 -1
  150. package/dist/still.js +45 -29
  151. package/dist/truthy.d.ts +3 -0
  152. package/dist/truthy.js +7 -0
  153. package/dist/upgrade.d.ts +1 -1
  154. package/dist/upgrade.js +5 -10
  155. package/dist/user-passed-output-location.d.ts +5 -1
  156. package/dist/user-passed-output-location.js +14 -7
  157. package/dist/versions.d.ts +2 -2
  158. package/dist/versions.js +13 -12
  159. package/package.json +10 -10
  160. package/dist/ansi/ansi-diff.d.ts.map +0 -1
  161. package/dist/ansi/ansi-diff.js.map +0 -1
  162. package/dist/ansi/ansi-regex.d.ts.map +0 -1
  163. package/dist/ansi/ansi-regex.js.map +0 -1
  164. package/dist/ansi/ansi-split.d.ts.map +0 -1
  165. package/dist/ansi/ansi-split.js.map +0 -1
  166. package/dist/check-version.d.ts.map +0 -1
  167. package/dist/check-version.js.map +0 -1
  168. package/dist/code-frame.d.ts.map +0 -1
  169. package/dist/code-frame.js.map +0 -1
  170. package/dist/compositions.d.ts.map +0 -1
  171. package/dist/compositions.js.map +0 -1
  172. package/dist/download-progress.d.ts.map +0 -1
  173. package/dist/download-progress.js.map +0 -1
  174. package/dist/editor/components/AudioWaveform.d.ts.map +0 -1
  175. package/dist/editor/components/AudioWaveform.js.map +0 -1
  176. package/dist/editor/components/AudioWaveformBar.d.ts.map +0 -1
  177. package/dist/editor/components/AudioWaveformBar.js.map +0 -1
  178. package/dist/editor/components/Canvas.d.ts.map +0 -1
  179. package/dist/editor/components/Canvas.js.map +0 -1
  180. package/dist/editor/components/CheckboardToggle.d.ts.map +0 -1
  181. package/dist/editor/components/CheckboardToggle.js.map +0 -1
  182. package/dist/editor/components/ClipboardIcon.d.ts.map +0 -1
  183. package/dist/editor/components/ClipboardIcon.js.map +0 -1
  184. package/dist/editor/components/CompositionSelector.d.ts.map +0 -1
  185. package/dist/editor/components/CompositionSelector.js.map +0 -1
  186. package/dist/editor/components/CompositionSelectorItem.d.ts.map +0 -1
  187. package/dist/editor/components/CompositionSelectorItem.js.map +0 -1
  188. package/dist/editor/components/ControlButton.d.ts.map +0 -1
  189. package/dist/editor/components/ControlButton.js.map +0 -1
  190. package/dist/editor/components/CopyButton.d.ts.map +0 -1
  191. package/dist/editor/components/CopyButton.js.map +0 -1
  192. package/dist/editor/components/CurrentComposition.d.ts.map +0 -1
  193. package/dist/editor/components/CurrentComposition.js.map +0 -1
  194. package/dist/editor/components/Editor.d.ts.map +0 -1
  195. package/dist/editor/components/Editor.js.map +0 -1
  196. package/dist/editor/components/EditorContent.d.ts.map +0 -1
  197. package/dist/editor/components/EditorContent.js.map +0 -1
  198. package/dist/editor/components/FpsCounter.d.ts.map +0 -1
  199. package/dist/editor/components/FpsCounter.js.map +0 -1
  200. package/dist/editor/components/FramePersistor.d.ts.map +0 -1
  201. package/dist/editor/components/FramePersistor.js.map +0 -1
  202. package/dist/editor/components/GlobalKeybindings.d.ts.map +0 -1
  203. package/dist/editor/components/GlobalKeybindings.js.map +0 -1
  204. package/dist/editor/components/KeyboardShortcutsModal.d.ts.map +0 -1
  205. package/dist/editor/components/KeyboardShortcutsModal.js.map +0 -1
  206. package/dist/editor/components/LoadingIndicator.d.ts.map +0 -1
  207. package/dist/editor/components/LoadingIndicator.js.map +0 -1
  208. package/dist/editor/components/LoopToggle.d.ts.map +0 -1
  209. package/dist/editor/components/LoopToggle.js.map +0 -1
  210. package/dist/editor/components/Menu/MenuDivider.d.ts.map +0 -1
  211. package/dist/editor/components/Menu/MenuDivider.js.map +0 -1
  212. package/dist/editor/components/Menu/MenuItem.d.ts.map +0 -1
  213. package/dist/editor/components/Menu/MenuItem.js.map +0 -1
  214. package/dist/editor/components/Menu/MenuSubItem.d.ts.map +0 -1
  215. package/dist/editor/components/Menu/MenuSubItem.js.map +0 -1
  216. package/dist/editor/components/Menu/SubMenu.d.ts.map +0 -1
  217. package/dist/editor/components/Menu/SubMenu.js.map +0 -1
  218. package/dist/editor/components/Menu/portals.d.ts.map +0 -1
  219. package/dist/editor/components/Menu/portals.js.map +0 -1
  220. package/dist/editor/components/Menu/styles.d.ts.map +0 -1
  221. package/dist/editor/components/Menu/styles.js.map +0 -1
  222. package/dist/editor/components/MenuToolbar.d.ts.map +0 -1
  223. package/dist/editor/components/MenuToolbar.js.map +0 -1
  224. package/dist/editor/components/ModalContainer.d.ts.map +0 -1
  225. package/dist/editor/components/ModalContainer.js.map +0 -1
  226. package/dist/editor/components/ModalHeader.d.ts.map +0 -1
  227. package/dist/editor/components/ModalHeader.js.map +0 -1
  228. package/dist/editor/components/MuteToggle.d.ts.map +0 -1
  229. package/dist/editor/components/MuteToggle.js.map +0 -1
  230. package/dist/editor/components/NewComposition/CancelButton.d.ts.map +0 -1
  231. package/dist/editor/components/NewComposition/CancelButton.js.map +0 -1
  232. package/dist/editor/components/NewComposition/ComboBox.d.ts.map +0 -1
  233. package/dist/editor/components/NewComposition/ComboBox.js.map +0 -1
  234. package/dist/editor/components/NewComposition/CopyHint.d.ts.map +0 -1
  235. package/dist/editor/components/NewComposition/CopyHint.js.map +0 -1
  236. package/dist/editor/components/NewComposition/InputDragger.d.ts.map +0 -1
  237. package/dist/editor/components/NewComposition/InputDragger.js.map +0 -1
  238. package/dist/editor/components/NewComposition/MenuContent.d.ts.map +0 -1
  239. package/dist/editor/components/NewComposition/MenuContent.js.map +0 -1
  240. package/dist/editor/components/NewComposition/NewCompAspectRatio.d.ts.map +0 -1
  241. package/dist/editor/components/NewComposition/NewCompAspectRatio.js.map +0 -1
  242. package/dist/editor/components/NewComposition/NewCompCode.d.ts.map +0 -1
  243. package/dist/editor/components/NewComposition/NewCompCode.js.map +0 -1
  244. package/dist/editor/components/NewComposition/NewCompDuration.d.ts.map +0 -1
  245. package/dist/editor/components/NewComposition/NewCompDuration.js.map +0 -1
  246. package/dist/editor/components/NewComposition/NewComposition.d.ts.map +0 -1
  247. package/dist/editor/components/NewComposition/NewComposition.js.map +0 -1
  248. package/dist/editor/components/NewComposition/RemInput.d.ts.map +0 -1
  249. package/dist/editor/components/NewComposition/RemInput.js.map +0 -1
  250. package/dist/editor/components/NewComposition/ToggleAspectRatio.d.ts.map +0 -1
  251. package/dist/editor/components/NewComposition/ToggleAspectRatio.js.map +0 -1
  252. package/dist/editor/components/NewComposition/ValidationMessage.d.ts.map +0 -1
  253. package/dist/editor/components/NewComposition/ValidationMessage.js.map +0 -1
  254. package/dist/editor/components/NewComposition/new-comp-layout.d.ts.map +0 -1
  255. package/dist/editor/components/NewComposition/new-comp-layout.js.map +0 -1
  256. package/dist/editor/components/NewComposition/render-aspect-ratio.d.ts.map +0 -1
  257. package/dist/editor/components/NewComposition/render-aspect-ratio.js.map +0 -1
  258. package/dist/editor/components/PlayPause.d.ts.map +0 -1
  259. package/dist/editor/components/PlayPause.js.map +0 -1
  260. package/dist/editor/components/PlaybackKeyboardShortcutsManager.d.ts.map +0 -1
  261. package/dist/editor/components/PlaybackKeyboardShortcutsManager.js.map +0 -1
  262. package/dist/editor/components/PlaybackRatePersistor.d.ts.map +0 -1
  263. package/dist/editor/components/PlaybackRatePersistor.js.map +0 -1
  264. package/dist/editor/components/PlaybackRateSelector.d.ts.map +0 -1
  265. package/dist/editor/components/PlaybackRateSelector.js.map +0 -1
  266. package/dist/editor/components/Preview.d.ts.map +0 -1
  267. package/dist/editor/components/Preview.js.map +0 -1
  268. package/dist/editor/components/PreviewToolbar.d.ts.map +0 -1
  269. package/dist/editor/components/PreviewToolbar.js.map +0 -1
  270. package/dist/editor/components/RichTimelineToggle.d.ts.map +0 -1
  271. package/dist/editor/components/RichTimelineToggle.js.map +0 -1
  272. package/dist/editor/components/SizeSelector.d.ts.map +0 -1
  273. package/dist/editor/components/SizeSelector.js.map +0 -1
  274. package/dist/editor/components/Splitter/SplitterContainer.d.ts.map +0 -1
  275. package/dist/editor/components/Splitter/SplitterContainer.js.map +0 -1
  276. package/dist/editor/components/Splitter/SplitterContext.d.ts.map +0 -1
  277. package/dist/editor/components/Splitter/SplitterContext.js.map +0 -1
  278. package/dist/editor/components/Splitter/SplitterElement.d.ts.map +0 -1
  279. package/dist/editor/components/Splitter/SplitterElement.js.map +0 -1
  280. package/dist/editor/components/Splitter/SplitterHandle.d.ts.map +0 -1
  281. package/dist/editor/components/Splitter/SplitterHandle.js.map +0 -1
  282. package/dist/editor/components/Thumbnail.d.ts.map +0 -1
  283. package/dist/editor/components/Thumbnail.js.map +0 -1
  284. package/dist/editor/components/TimeValue.d.ts.map +0 -1
  285. package/dist/editor/components/TimeValue.js.map +0 -1
  286. package/dist/editor/components/Timeline/LoopedIndicator.d.ts.map +0 -1
  287. package/dist/editor/components/Timeline/LoopedIndicator.js.map +0 -1
  288. package/dist/editor/components/Timeline/LoopedTimelineIndicators.d.ts.map +0 -1
  289. package/dist/editor/components/Timeline/LoopedTimelineIndicators.js.map +0 -1
  290. package/dist/editor/components/Timeline/MaxTimelineTracks.d.ts.map +0 -1
  291. package/dist/editor/components/Timeline/MaxTimelineTracks.js.map +0 -1
  292. package/dist/editor/components/Timeline/Timeline.d.ts.map +0 -1
  293. package/dist/editor/components/Timeline/Timeline.js.map +0 -1
  294. package/dist/editor/components/Timeline/TimelineCollapseToggle.d.ts.map +0 -1
  295. package/dist/editor/components/Timeline/TimelineCollapseToggle.js.map +0 -1
  296. package/dist/editor/components/Timeline/TimelineDragHandler.d.ts.map +0 -1
  297. package/dist/editor/components/Timeline/TimelineDragHandler.js.map +0 -1
  298. package/dist/editor/components/Timeline/TimelineInOutPointer.d.ts.map +0 -1
  299. package/dist/editor/components/Timeline/TimelineInOutPointer.js.map +0 -1
  300. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.d.ts.map +0 -1
  301. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js.map +0 -1
  302. package/dist/editor/components/Timeline/TimelineList.d.ts.map +0 -1
  303. package/dist/editor/components/Timeline/TimelineList.js.map +0 -1
  304. package/dist/editor/components/Timeline/TimelineListItem.d.ts.map +0 -1
  305. package/dist/editor/components/Timeline/TimelineListItem.js.map +0 -1
  306. package/dist/editor/components/Timeline/TimelineSequence.d.ts.map +0 -1
  307. package/dist/editor/components/Timeline/TimelineSequence.js.map +0 -1
  308. package/dist/editor/components/Timeline/TimelineSequenceFrame.d.ts.map +0 -1
  309. package/dist/editor/components/Timeline/TimelineSequenceFrame.js.map +0 -1
  310. package/dist/editor/components/Timeline/TimelineSlider.d.ts.map +0 -1
  311. package/dist/editor/components/Timeline/TimelineSlider.js.map +0 -1
  312. package/dist/editor/components/Timeline/TimelineSliderHandle.d.ts.map +0 -1
  313. package/dist/editor/components/Timeline/TimelineSliderHandle.js.map +0 -1
  314. package/dist/editor/components/Timeline/TimelineTracks.d.ts.map +0 -1
  315. package/dist/editor/components/Timeline/TimelineTracks.js.map +0 -1
  316. package/dist/editor/components/Timeline/TimelineVideoInfo.d.ts.map +0 -1
  317. package/dist/editor/components/Timeline/TimelineVideoInfo.js.map +0 -1
  318. package/dist/editor/components/Timeline/is-collapsed.d.ts.map +0 -1
  319. package/dist/editor/components/Timeline/is-collapsed.js.map +0 -1
  320. package/dist/editor/components/Timeline/timeline-refs.d.ts.map +0 -1
  321. package/dist/editor/components/Timeline/timeline-refs.js.map +0 -1
  322. package/dist/editor/components/Timeline/timeline-state-reducer.d.ts.map +0 -1
  323. package/dist/editor/components/Timeline/timeline-state-reducer.js.map +0 -1
  324. package/dist/editor/components/TimelineInOutToggle.d.ts.map +0 -1
  325. package/dist/editor/components/TimelineInOutToggle.js.map +0 -1
  326. package/dist/editor/components/TopPanel.d.ts.map +0 -1
  327. package/dist/editor/components/TopPanel.js.map +0 -1
  328. package/dist/editor/components/UpdateCheck.d.ts.map +0 -1
  329. package/dist/editor/components/UpdateCheck.js.map +0 -1
  330. package/dist/editor/components/UpdateModal/UpdateModal.d.ts.map +0 -1
  331. package/dist/editor/components/UpdateModal/UpdateModal.js.map +0 -1
  332. package/dist/editor/components/layout.d.ts.map +0 -1
  333. package/dist/editor/components/layout.js.map +0 -1
  334. package/dist/editor/helpers/calculate-timeline.d.ts.map +0 -1
  335. package/dist/editor/helpers/calculate-timeline.js.map +0 -1
  336. package/dist/editor/helpers/checkerboard-background.d.ts.map +0 -1
  337. package/dist/editor/helpers/checkerboard-background.js.map +0 -1
  338. package/dist/editor/helpers/colors.d.ts.map +0 -1
  339. package/dist/editor/helpers/colors.js.map +0 -1
  340. package/dist/editor/helpers/copy-text.d.ts.map +0 -1
  341. package/dist/editor/helpers/copy-text.js.map +0 -1
  342. package/dist/editor/helpers/create-folder-tree.d.ts.map +0 -1
  343. package/dist/editor/helpers/create-folder-tree.js.map +0 -1
  344. package/dist/editor/helpers/get-left-of-timeline-slider.d.ts.map +0 -1
  345. package/dist/editor/helpers/get-left-of-timeline-slider.js.map +0 -1
  346. package/dist/editor/helpers/get-sequence-visible-range.d.ts.map +0 -1
  347. package/dist/editor/helpers/get-sequence-visible-range.js.map +0 -1
  348. package/dist/editor/helpers/get-timeline-nestedness.d.ts.map +0 -1
  349. package/dist/editor/helpers/get-timeline-nestedness.js.map +0 -1
  350. package/dist/editor/helpers/get-timeline-sequence-hash.d.ts.map +0 -1
  351. package/dist/editor/helpers/get-timeline-sequence-hash.js.map +0 -1
  352. package/dist/editor/helpers/get-timeline-sequence-layout.d.ts.map +0 -1
  353. package/dist/editor/helpers/get-timeline-sequence-layout.js.map +0 -1
  354. package/dist/editor/helpers/get-timeline-sequence-sort-key.d.ts.map +0 -1
  355. package/dist/editor/helpers/get-timeline-sequence-sort-key.js.map +0 -1
  356. package/dist/editor/helpers/is-composition-still.d.ts.map +0 -1
  357. package/dist/editor/helpers/is-composition-still.js.map +0 -1
  358. package/dist/editor/helpers/is-current-selected-still.d.ts.map +0 -1
  359. package/dist/editor/helpers/is-current-selected-still.js.map +0 -1
  360. package/dist/editor/helpers/noop.d.ts.map +0 -1
  361. package/dist/editor/helpers/noop.js.map +0 -1
  362. package/dist/editor/helpers/persist-open-folders.d.ts.map +0 -1
  363. package/dist/editor/helpers/persist-open-folders.js.map +0 -1
  364. package/dist/editor/helpers/timeline-layout.d.ts.map +0 -1
  365. package/dist/editor/helpers/timeline-layout.js.map +0 -1
  366. package/dist/editor/helpers/use-keybinding.d.ts.map +0 -1
  367. package/dist/editor/helpers/use-keybinding.js.map +0 -1
  368. package/dist/editor/helpers/validate-new-comp-data.d.ts.map +0 -1
  369. package/dist/editor/helpers/validate-new-comp-data.js.map +0 -1
  370. package/dist/editor/icons/Checkmark.d.ts.map +0 -1
  371. package/dist/editor/icons/Checkmark.js.map +0 -1
  372. package/dist/editor/icons/caret.d.ts.map +0 -1
  373. package/dist/editor/icons/caret.js.map +0 -1
  374. package/dist/editor/icons/film.d.ts.map +0 -1
  375. package/dist/editor/icons/film.js.map +0 -1
  376. package/dist/editor/icons/folder.d.ts.map +0 -1
  377. package/dist/editor/icons/folder.js.map +0 -1
  378. package/dist/editor/icons/keys.d.ts.map +0 -1
  379. package/dist/editor/icons/keys.js.map +0 -1
  380. package/dist/editor/icons/lock.d.ts.map +0 -1
  381. package/dist/editor/icons/lock.js.map +0 -1
  382. package/dist/editor/icons/media-volume.d.ts.map +0 -1
  383. package/dist/editor/icons/media-volume.js.map +0 -1
  384. package/dist/editor/icons/pause.d.ts.map +0 -1
  385. package/dist/editor/icons/pause.js.map +0 -1
  386. package/dist/editor/icons/play.d.ts.map +0 -1
  387. package/dist/editor/icons/play.js.map +0 -1
  388. package/dist/editor/icons/step-back.d.ts.map +0 -1
  389. package/dist/editor/icons/step-back.js.map +0 -1
  390. package/dist/editor/icons/step-forward.d.ts.map +0 -1
  391. package/dist/editor/icons/step-forward.js.map +0 -1
  392. package/dist/editor/icons/still.d.ts.map +0 -1
  393. package/dist/editor/icons/still.js.map +0 -1
  394. package/dist/editor/icons/timeline.d.ts.map +0 -1
  395. package/dist/editor/icons/timeline.js.map +0 -1
  396. package/dist/editor/icons/timelineInOutPointer.d.ts.map +0 -1
  397. package/dist/editor/icons/timelineInOutPointer.js.map +0 -1
  398. package/dist/editor/state/aspect-ratio-locked.d.ts.map +0 -1
  399. package/dist/editor/state/aspect-ratio-locked.js.map +0 -1
  400. package/dist/editor/state/checkerboard.d.ts.map +0 -1
  401. package/dist/editor/state/checkerboard.js.map +0 -1
  402. package/dist/editor/state/highest-z-index.d.ts.map +0 -1
  403. package/dist/editor/state/highest-z-index.js.map +0 -1
  404. package/dist/editor/state/input-dragger-click-lock.d.ts.map +0 -1
  405. package/dist/editor/state/input-dragger-click-lock.js.map +0 -1
  406. package/dist/editor/state/keybindings.d.ts.map +0 -1
  407. package/dist/editor/state/keybindings.js.map +0 -1
  408. package/dist/editor/state/loop.d.ts.map +0 -1
  409. package/dist/editor/state/loop.js.map +0 -1
  410. package/dist/editor/state/marks.d.ts.map +0 -1
  411. package/dist/editor/state/marks.js.map +0 -1
  412. package/dist/editor/state/modals.d.ts.map +0 -1
  413. package/dist/editor/state/modals.js.map +0 -1
  414. package/dist/editor/state/mute.d.ts.map +0 -1
  415. package/dist/editor/state/mute.js.map +0 -1
  416. package/dist/editor/state/playbackrate.d.ts.map +0 -1
  417. package/dist/editor/state/playbackrate.js.map +0 -1
  418. package/dist/editor/state/preview-size.d.ts.map +0 -1
  419. package/dist/editor/state/preview-size.js.map +0 -1
  420. package/dist/editor/state/render-frame.d.ts.map +0 -1
  421. package/dist/editor/state/render-frame.js.map +0 -1
  422. package/dist/editor/state/rich-timeline.d.ts.map +0 -1
  423. package/dist/editor/state/rich-timeline.js.map +0 -1
  424. package/dist/editor/state/timeline-ref.d.ts.map +0 -1
  425. package/dist/editor/state/timeline-ref.js.map +0 -1
  426. package/dist/editor/state/timeline.d.ts.map +0 -1
  427. package/dist/editor/state/timeline.js.map +0 -1
  428. package/dist/editor/state/z-index.d.ts.map +0 -1
  429. package/dist/editor/state/z-index.js.map +0 -1
  430. package/dist/get-cli-options.d.ts.map +0 -1
  431. package/dist/get-cli-options.js.map +0 -1
  432. package/dist/get-composition-id.d.ts.map +0 -1
  433. package/dist/get-composition-id.js.map +0 -1
  434. package/dist/get-config-file-name.d.ts.map +0 -1
  435. package/dist/get-config-file-name.js.map +0 -1
  436. package/dist/get-env.d.ts.map +0 -1
  437. package/dist/get-env.js.map +0 -1
  438. package/dist/get-filename.d.ts.map +0 -1
  439. package/dist/get-filename.js.map +0 -1
  440. package/dist/get-input-props.d.ts.map +0 -1
  441. package/dist/get-input-props.js.map +0 -1
  442. package/dist/handle-common-errors.d.ts.map +0 -1
  443. package/dist/handle-common-errors.js.map +0 -1
  444. package/dist/image-formats.d.ts.map +0 -1
  445. package/dist/image-formats.js.map +0 -1
  446. package/dist/index.d.ts.map +0 -1
  447. package/dist/index.js.map +0 -1
  448. package/dist/initialize-render-cli.d.ts.map +0 -1
  449. package/dist/initialize-render-cli.js.map +0 -1
  450. package/dist/is-javascript.d.ts.map +0 -1
  451. package/dist/is-javascript.js.map +0 -1
  452. package/dist/lambda-command.d.ts.map +0 -1
  453. package/dist/lambda-command.js.map +0 -1
  454. package/dist/load-config.d.ts.map +0 -1
  455. package/dist/load-config.js.map +0 -1
  456. package/dist/log.d.ts.map +0 -1
  457. package/dist/log.js.map +0 -1
  458. package/dist/make-progress-bar.d.ts.map +0 -1
  459. package/dist/make-progress-bar.js.map +0 -1
  460. package/dist/parse-command-line.d.ts.map +0 -1
  461. package/dist/parse-command-line.js.map +0 -1
  462. package/dist/preview.d.ts.map +0 -1
  463. package/dist/preview.js.map +0 -1
  464. package/dist/previewEntry.d.ts.map +0 -1
  465. package/dist/previewEntry.js.map +0 -1
  466. package/dist/print-error.d.ts.map +0 -1
  467. package/dist/print-error.js.map +0 -1
  468. package/dist/print-help.d.ts.map +0 -1
  469. package/dist/print-help.js.map +0 -1
  470. package/dist/progress-bar.d.ts.map +0 -1
  471. package/dist/progress-bar.js.map +0 -1
  472. package/dist/render.d.ts.map +0 -1
  473. package/dist/render.js.map +0 -1
  474. package/dist/resolve-from.d.ts.map +0 -1
  475. package/dist/resolve-from.js.map +0 -1
  476. package/dist/setup-cache.d.ts.map +0 -1
  477. package/dist/setup-cache.js.map +0 -1
  478. package/dist/step.d.ts.map +0 -1
  479. package/dist/step.js.map +0 -1
  480. package/dist/still.d.ts.map +0 -1
  481. package/dist/still.js.map +0 -1
  482. package/dist/upgrade.d.ts.map +0 -1
  483. package/dist/upgrade.js.map +0 -1
  484. package/dist/user-passed-output-location.d.ts.map +0 -1
  485. package/dist/user-passed-output-location.js.map +0 -1
  486. package/dist/validate-ffmpeg-version.d.ts.map +0 -1
  487. package/dist/validate-ffmpeg-version.js.map +0 -1
  488. package/dist/versions.d.ts.map +0 -1
  489. package/dist/versions.js.map +0 -1
  490. package/dist/warn-about-ffmpeg-version.d.ts.map +0 -1
  491. package/dist/warn-about-ffmpeg-version.js.map +0 -1
@@ -8,12 +8,14 @@ const bundler_1 = require("@remotion/bundler");
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const os_1 = __importDefault(require("os"));
10
10
  const path_1 = __importDefault(require("path"));
11
+ const worker_threads_1 = require("worker_threads");
11
12
  const log_1 = require("./log");
12
- const loadConfigFile = async (configFileName, isJavascript) => {
13
- const resolved = path_1.default.resolve(process.cwd(), configFileName);
14
- const tsconfigJson = path_1.default.join(process.cwd(), 'tsconfig.json');
13
+ const loadConfigFile = async (remotionRoot, configFileName, isJavascript) => {
14
+ const resolved = path_1.default.resolve(remotionRoot, configFileName);
15
+ const tsconfigJson = path_1.default.join(remotionRoot, 'tsconfig.json');
15
16
  if (!isJavascript && !fs_1.default.existsSync(tsconfigJson)) {
16
- log_1.Log.error('Could not find a tsconfig.json file in your project. Did you delete it? Create a tsconfig.json in the root of your project. Copy the default file from https://github.com/remotion-dev/template/blob/main/tsconfig.json.');
17
+ log_1.Log.error('Could not find a tsconfig.json file in your project. Did you delete it? Create a tsconfig.json in the root of your project. Copy the default file from https://github.com/remotion-dev/template-helloworld/blob/main/tsconfig.json.');
18
+ log_1.Log.error('The root directory is:', remotionRoot);
17
19
  process.exit(1);
18
20
  }
19
21
  const out = path_1.default.join(await fs_1.default.promises.mkdtemp(path_1.default.join(os_1.default.tmpdir(), 'remotion-')), 'bundle.js');
@@ -23,7 +25,7 @@ const loadConfigFile = async (configFileName, isJavascript) => {
23
25
  bundle: true,
24
26
  entryPoints: [resolved],
25
27
  tsconfig: isJavascript ? undefined : tsconfigJson,
26
- absWorkingDir: process.cwd(),
28
+ absWorkingDir: remotionRoot,
27
29
  outfile: out,
28
30
  external: [
29
31
  'remotion',
@@ -44,8 +46,17 @@ const loadConfigFile = async (configFileName, isJavascript) => {
44
46
  process.exit(1);
45
47
  }
46
48
  const file = await fs_1.default.promises.readFile(out, 'utf8');
49
+ const currentCwd = process.cwd();
50
+ // The config file is always executed from the Remotion root, if `process.cwd()` is being used. We cannot enforce this in worker threads used for testing
51
+ if (worker_threads_1.isMainThread) {
52
+ process.chdir(remotionRoot);
53
+ }
54
+ // Exectute the contents of the config file
47
55
  // eslint-disable-next-line no-eval
48
56
  eval(file);
57
+ if (worker_threads_1.isMainThread) {
58
+ process.chdir(currentCwd);
59
+ }
49
60
  await fs_1.default.promises.unlink(out);
50
61
  return resolved;
51
62
  };
package/dist/log.js CHANGED
@@ -1,27 +1,28 @@
1
1
  "use strict";
2
- /* eslint-disable no-console */
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.Log = void 0;
5
- const remotion_1 = require("remotion");
4
+ /* eslint-disable no-console */
5
+ const renderer_1 = require("@remotion/renderer");
6
6
  const chalk_1 = require("./chalk");
7
+ const config_1 = require("./config");
7
8
  exports.Log = {
8
9
  verbose: (...args) => {
9
- if (remotion_1.Internals.Logging.isEqualOrBelowLogLevel(remotion_1.Internals.Logging.getLogLevel(), 'verbose')) {
10
+ if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose')) {
10
11
  return console.log(...args.map((a) => chalk_1.chalk.blueBright(a)));
11
12
  }
12
13
  },
13
14
  info: (...args) => {
14
- if (remotion_1.Internals.Logging.isEqualOrBelowLogLevel(remotion_1.Internals.Logging.getLogLevel(), 'info')) {
15
+ if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'info')) {
15
16
  return console.log(...args);
16
17
  }
17
18
  },
18
19
  warn: (...args) => {
19
- if (remotion_1.Internals.Logging.isEqualOrBelowLogLevel(remotion_1.Internals.Logging.getLogLevel(), 'warn')) {
20
+ if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'warn')) {
20
21
  return console.warn(...args.map((a) => chalk_1.chalk.yellow(a)));
21
22
  }
22
23
  },
23
24
  error: (...args) => {
24
- if (remotion_1.Internals.Logging.isEqualOrBelowLogLevel(remotion_1.Internals.Logging.getLogLevel(), 'error')) {
25
+ if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'error')) {
25
26
  return console.error(...args.map((a) => chalk_1.chalk.red(a)));
26
27
  }
27
28
  },
@@ -1,5 +1,5 @@
1
+ import type { BrowserExecutable, Codec, FfmpegExecutable, ImageFormat, OpenGlRenderer, PixelFormat, ProResProfile } from '@remotion/renderer';
1
2
  import minimist from 'minimist';
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;
@@ -4,9 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.quietFlagProvided = exports.parseCommandLine = exports.parsedCli = exports.BooleanFlags = void 0;
7
+ const renderer_1 = require("@remotion/renderer");
7
8
  const minimist_1 = __importDefault(require("minimist"));
8
9
  const path_1 = require("path");
9
- const remotion_1 = require("remotion");
10
+ const config_1 = require("./config");
10
11
  const log_1 = require("./log");
11
12
  exports.BooleanFlags = [
12
13
  'force',
@@ -31,99 +32,99 @@ exports.parsedCli = (0, minimist_1.default)(process.argv.slice(2), {
31
32
  });
32
33
  const parseCommandLine = (type) => {
33
34
  if (exports.parsedCli['pixel-format']) {
34
- remotion_1.Config.Output.setPixelFormat(exports.parsedCli['pixel-format']);
35
+ config_1.Config.Output.setPixelFormat(exports.parsedCli['pixel-format']);
35
36
  }
36
37
  if (exports.parsedCli['image-format']) {
37
- remotion_1.Config.Rendering.setImageFormat(exports.parsedCli['image-format']);
38
+ config_1.Config.Rendering.setImageFormat(exports.parsedCli['image-format']);
38
39
  }
39
40
  if (exports.parsedCli['browser-executable']) {
40
- remotion_1.Config.Puppeteer.setBrowserExecutable(exports.parsedCli['browser-executable']);
41
+ config_1.Config.Puppeteer.setBrowserExecutable(exports.parsedCli['browser-executable']);
41
42
  }
42
43
  if (exports.parsedCli['ffmpeg-executable']) {
43
- remotion_1.Config.Rendering.setFfmpegExecutable((0, path_1.resolve)(exports.parsedCli['ffmpeg-executable']));
44
+ config_1.Config.Rendering.setFfmpegExecutable((0, path_1.resolve)(exports.parsedCli['ffmpeg-executable']));
44
45
  }
45
46
  if (exports.parsedCli['number-of-gif-loops']) {
46
- remotion_1.Config.Rendering.setNumberOfGifLoops(exports.parsedCli['number-of-gif-loops']);
47
+ config_1.Config.Rendering.setNumberOfGifLoops(exports.parsedCli['number-of-gif-loops']);
47
48
  }
48
49
  if (exports.parsedCli['ffprobe-executable']) {
49
- remotion_1.Config.Rendering.setFfprobeExecutable((0, path_1.resolve)(exports.parsedCli['ffprobe-executable']));
50
+ config_1.Config.Rendering.setFfprobeExecutable((0, path_1.resolve)(exports.parsedCli['ffprobe-executable']));
50
51
  }
51
52
  if (typeof exports.parsedCli['bundle-cache'] !== 'undefined') {
52
- remotion_1.Config.Bundling.setCachingEnabled(exports.parsedCli['bundle-cache'] !== 'false');
53
+ config_1.Config.Bundling.setCachingEnabled(exports.parsedCli['bundle-cache'] !== 'false');
53
54
  }
54
55
  if (exports.parsedCli['disable-web-security']) {
55
- remotion_1.Config.Puppeteer.setChromiumDisableWebSecurity(true);
56
+ config_1.Config.Puppeteer.setChromiumDisableWebSecurity(true);
56
57
  }
57
58
  if (exports.parsedCli['ignore-certificate-errors']) {
58
- remotion_1.Config.Puppeteer.setChromiumIgnoreCertificateErrors(true);
59
+ config_1.Config.Puppeteer.setChromiumIgnoreCertificateErrors(true);
59
60
  }
60
61
  if (exports.parsedCli['disable-headless']) {
61
- remotion_1.Config.Puppeteer.setChromiumHeadlessMode(false);
62
+ config_1.Config.Puppeteer.setChromiumHeadlessMode(false);
62
63
  }
63
64
  if (exports.parsedCli.log) {
64
- if (!remotion_1.Internals.Logging.isValidLogLevel(exports.parsedCli.log)) {
65
+ if (!renderer_1.RenderInternals.isValidLogLevel(exports.parsedCli.log)) {
65
66
  log_1.Log.error('Invalid `--log` value passed.');
66
- log_1.Log.error(`Accepted values: ${remotion_1.Internals.Logging.logLevels
67
+ log_1.Log.error(`Accepted values: ${renderer_1.RenderInternals.logLevels
67
68
  .map((l) => `'${l}'`)
68
69
  .join(', ')}.`);
69
70
  process.exit(1);
70
71
  }
71
- remotion_1.Internals.Logging.setLogLevel(exports.parsedCli.log);
72
+ config_1.ConfigInternals.Logging.setLogLevel(exports.parsedCli.log);
72
73
  }
73
74
  if (exports.parsedCli.concurrency) {
74
- remotion_1.Config.Rendering.setConcurrency(exports.parsedCli.concurrency);
75
+ config_1.Config.Rendering.setConcurrency(exports.parsedCli.concurrency);
75
76
  }
76
77
  if (exports.parsedCli.timeout) {
77
- remotion_1.Config.Puppeteer.setTimeoutInMilliseconds(exports.parsedCli.timeout);
78
+ config_1.Config.Puppeteer.setTimeoutInMilliseconds(exports.parsedCli.timeout);
78
79
  }
79
80
  if (exports.parsedCli.frames) {
80
81
  if (type === 'still') {
81
82
  log_1.Log.error('--frames flag was passed to the `still` command. This flag only works with the `render` command. Did you mean `--frame`? See reference: https://www.remotion.dev/docs/cli/');
82
83
  process.exit(1);
83
84
  }
84
- remotion_1.Internals.setFrameRangeFromCli(exports.parsedCli.frames);
85
+ config_1.ConfigInternals.setFrameRangeFromCli(exports.parsedCli.frames);
85
86
  }
86
87
  if (exports.parsedCli.frame) {
87
88
  if (type === 'sequence') {
88
89
  log_1.Log.error('--frame flag was passed to the `render` command. This flag only works with the `still` command. Did you mean `--frames`? See reference: https://www.remotion.dev/docs/cli/');
89
90
  process.exit(1);
90
91
  }
91
- remotion_1.Internals.setStillFrame(Number(exports.parsedCli.frame));
92
+ config_1.ConfigInternals.setStillFrame(Number(exports.parsedCli.frame));
92
93
  }
93
94
  if (exports.parsedCli.png) {
94
95
  log_1.Log.warn('The --png flag has been deprecrated. Use --sequence --image-format=png from now on.');
95
- remotion_1.Config.Output.setImageSequence(true);
96
- remotion_1.Config.Rendering.setImageFormat('png');
96
+ config_1.Config.Output.setImageSequence(true);
97
+ config_1.Config.Rendering.setImageFormat('png');
97
98
  }
98
99
  if (exports.parsedCli.sequence) {
99
- remotion_1.Config.Output.setImageSequence(true);
100
+ config_1.Config.Output.setImageSequence(true);
100
101
  }
101
102
  if (typeof exports.parsedCli.crf !== 'undefined') {
102
- remotion_1.Config.Output.setCrf(exports.parsedCli.crf);
103
+ config_1.Config.Output.setCrf(exports.parsedCli.crf);
103
104
  }
104
105
  if (exports.parsedCli.codec) {
105
- remotion_1.Config.Output.setCodec(exports.parsedCli.codec);
106
+ config_1.Config.Output.setCodec(exports.parsedCli.codec);
106
107
  }
107
108
  if (exports.parsedCli['every-nth-frame']) {
108
- remotion_1.Config.Rendering.setEveryNthFrame(exports.parsedCli['every-nth-frame']);
109
+ config_1.Config.Rendering.setEveryNthFrame(exports.parsedCli['every-nth-frame']);
109
110
  }
110
111
  if (exports.parsedCli.gl) {
111
- remotion_1.Config.Puppeteer.setChromiumOpenGlRenderer(exports.parsedCli.gl);
112
+ config_1.Config.Puppeteer.setChromiumOpenGlRenderer(exports.parsedCli.gl);
112
113
  }
113
114
  if (exports.parsedCli['prores-profile']) {
114
- remotion_1.Config.Output.setProResProfile(String(exports.parsedCli['prores-profile']));
115
+ config_1.Config.Output.setProResProfile(String(exports.parsedCli['prores-profile']));
115
116
  }
116
117
  if (exports.parsedCli.overwrite) {
117
- remotion_1.Config.Output.setOverwriteOutput(exports.parsedCli.overwrite);
118
+ config_1.Config.Output.setOverwriteOutput(exports.parsedCli.overwrite);
118
119
  }
119
120
  if (typeof exports.parsedCli.quality !== 'undefined') {
120
- remotion_1.Config.Rendering.setQuality(exports.parsedCli.quality);
121
+ config_1.Config.Rendering.setQuality(exports.parsedCli.quality);
121
122
  }
122
123
  if (typeof exports.parsedCli.scale !== 'undefined') {
123
- remotion_1.Config.Rendering.setScale(exports.parsedCli.scale);
124
+ config_1.Config.Rendering.setScale(exports.parsedCli.scale);
124
125
  }
125
126
  if (typeof exports.parsedCli.port !== 'undefined') {
126
- remotion_1.Config.Bundling.setPort(exports.parsedCli.port);
127
+ config_1.Config.Bundling.setPort(exports.parsedCli.port);
127
128
  }
128
129
  };
129
130
  exports.parseCommandLine = parseCommandLine;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLocationFromBuildError = void 0;
4
- const remotion_1 = require("remotion");
4
+ const truthy_1 = require("../../../../truthy");
5
5
  const getLocationFromBuildError = (err) => {
6
6
  var _a;
7
7
  if (!err.stack) {
@@ -41,6 +41,6 @@ const getLocationFromBuildError = (err) => {
41
41
  fileName: filename.trim(),
42
42
  };
43
43
  })
44
- .filter(remotion_1.Internals.truthy)[0]) !== null && _a !== void 0 ? _a : null);
44
+ .filter(truthy_1.truthy)[0]) !== null && _a !== void 0 ? _a : null);
45
45
  };
46
46
  exports.getLocationFromBuildError = getLocationFromBuildError;
@@ -1 +1 @@
1
- export declare const getFileSource: (p: string) => Promise<string>;
1
+ export declare const getFileSource: (remotionRoot: string, p: string) => Promise<string>;
@@ -7,12 +7,12 @@ exports.getFileSource = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const allowedFileExtensions = ['js', 'ts', 'tsx', 'jsx', 'map', 'mjs'];
10
- const getFileSource = (p) => {
10
+ const getFileSource = (remotionRoot, p) => {
11
11
  if (!allowedFileExtensions.find((extension) => p.endsWith(extension))) {
12
12
  throw new Error(`Not allowed to open ${p}`);
13
13
  }
14
- const resolved = path_1.default.resolve(process.cwd(), p);
15
- const relativeToProcessCwd = path_1.default.relative(process.cwd(), resolved);
14
+ const resolved = path_1.default.resolve(remotionRoot, p);
15
+ const relativeToProcessCwd = path_1.default.relative(remotionRoot, resolved);
16
16
  if (relativeToProcessCwd.startsWith('..')) {
17
17
  throw new Error(`Not allowed to open ${relativeToProcessCwd}`);
18
18
  }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
3
+ */
4
+ /**
5
+ * MIT License
6
+ *
7
+ * Copyright (c) Facebook, Inc. and its affiliates.
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ */
27
+ declare function registerExportsForReactRefresh(moduleExports: unknown, moduleID: unknown): void;
28
+ declare function isReactRefreshBoundary(moduleExports: unknown): boolean;
29
+ declare function shouldInvalidateReactRefreshBoundary(prevExports: unknown, nextExports: unknown): boolean;
30
+ declare function getRefreshBoundarySignature(moduleExports: unknown): any[];
31
+ declare function scheduleUpdate(): void;
32
+ declare const _default: {
33
+ registerExportsForReactRefresh: typeof registerExportsForReactRefresh;
34
+ isReactRefreshBoundary: typeof isReactRefreshBoundary;
35
+ shouldInvalidateReactRefreshBoundary: typeof shouldInvalidateReactRefreshBoundary;
36
+ getRefreshBoundarySignature: typeof getRefreshBoundarySignature;
37
+ scheduleUpdate: typeof scheduleUpdate;
38
+ };
39
+ export default _default;
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ /**
3
+ * Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
4
+ */
5
+ /**
6
+ * MIT License
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ * of this software and associated documentation files (the "Software"), to deal
12
+ * in the Software without restriction, including without limitation the rights
13
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ * copies of the Software, and to permit persons to whom the Software is
15
+ * furnished to do so, subject to the following conditions:
16
+ *
17
+ * The above copyright notice and this permission notice shall be included in all
18
+ * copies or substantial portions of the Software.
19
+ *
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ * SOFTWARE.
27
+ */
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ // This file is copied from the Metro JavaScript bundler, with minor tweaks for
30
+ // webpack compatibility.
31
+ //
32
+ // https://github.com/facebook/metro/blob/d6b9685c730d0d63577db40f41369157f28dfa3a/packages/metro/src/lib/polyfills/require.js
33
+ const RefreshRuntime = require('react-refresh/runtime');
34
+ function isSafeExport(key) {
35
+ return (key === '__esModule' ||
36
+ key === '__N_SSG' ||
37
+ key === '__N_SSP' ||
38
+ key === 'config');
39
+ }
40
+ function registerExportsForReactRefresh(moduleExports, moduleID) {
41
+ RefreshRuntime.register(moduleExports, moduleID + ' %exports%');
42
+ if (moduleExports === null ||
43
+ moduleExports === undefined ||
44
+ typeof moduleExports !== 'object') {
45
+ // Exit if we can't iterate over exports.
46
+ // (This is important for legacy environments.)
47
+ return;
48
+ }
49
+ for (const key in moduleExports) {
50
+ if (isSafeExport(key)) {
51
+ continue;
52
+ }
53
+ // @ts-expect-error
54
+ const exportValue = moduleExports[key];
55
+ const typeID = moduleID + ' %exports% ' + key;
56
+ RefreshRuntime.register(exportValue, typeID);
57
+ }
58
+ }
59
+ function isReactRefreshBoundary(moduleExports) {
60
+ if (RefreshRuntime.isLikelyComponentType(moduleExports)) {
61
+ return true;
62
+ }
63
+ if (moduleExports === null ||
64
+ moduleExports === undefined ||
65
+ typeof moduleExports !== 'object') {
66
+ // Exit if we can't iterate over exports.
67
+ return false;
68
+ }
69
+ let hasExports = false;
70
+ let areAllExportsComponents = true;
71
+ for (const key in moduleExports) {
72
+ hasExports = true;
73
+ if (isSafeExport(key)) {
74
+ continue;
75
+ }
76
+ // @ts-expect-error
77
+ const exportValue = moduleExports[key];
78
+ if (!RefreshRuntime.isLikelyComponentType(exportValue)) {
79
+ areAllExportsComponents = false;
80
+ }
81
+ }
82
+ return hasExports && areAllExportsComponents;
83
+ }
84
+ function shouldInvalidateReactRefreshBoundary(prevExports, nextExports) {
85
+ const prevSignature = getRefreshBoundarySignature(prevExports);
86
+ const nextSignature = getRefreshBoundarySignature(nextExports);
87
+ if (prevSignature.length !== nextSignature.length) {
88
+ return true;
89
+ }
90
+ for (let i = 0; i < nextSignature.length; i++) {
91
+ if (prevSignature[i] !== nextSignature[i]) {
92
+ return true;
93
+ }
94
+ }
95
+ return false;
96
+ }
97
+ function getRefreshBoundarySignature(moduleExports) {
98
+ const signature = [];
99
+ signature.push(RefreshRuntime.getFamilyByType(moduleExports));
100
+ if (moduleExports === null ||
101
+ moduleExports === undefined ||
102
+ typeof moduleExports !== 'object') {
103
+ // Exit if we can't iterate over exports.
104
+ // (This is important for legacy environments.)
105
+ return signature;
106
+ }
107
+ for (const key in moduleExports) {
108
+ if (isSafeExport(key)) {
109
+ continue;
110
+ }
111
+ // @ts-expect-error
112
+ const exportValue = moduleExports[key];
113
+ signature.push(key);
114
+ signature.push(RefreshRuntime.getFamilyByType(exportValue));
115
+ }
116
+ return signature;
117
+ }
118
+ function scheduleUpdate() {
119
+ var _a, _b;
120
+ const execute = () => {
121
+ try {
122
+ RefreshRuntime.performReactRefresh();
123
+ }
124
+ catch (err) {
125
+ console.warn('Warning: Failed to re-render. We will retry on the next Fast Refresh event.\n' +
126
+ err);
127
+ }
128
+ };
129
+ // Only trigger refresh if the webpack HMR state is idle
130
+ if (((_a = module.hot) === null || _a === void 0 ? void 0 : _a.status()) === 'idle') {
131
+ return;
132
+ }
133
+ (_b = module.hot) === null || _b === void 0 ? void 0 : _b.addStatusHandler((status) => {
134
+ if (status === 'idle') {
135
+ execute();
136
+ }
137
+ });
138
+ }
139
+ exports.default = {
140
+ registerExportsForReactRefresh,
141
+ isReactRefreshBoundary,
142
+ shouldInvalidateReactRefreshBoundary,
143
+ getRefreshBoundarySignature,
144
+ scheduleUpdate,
145
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
3
+ */
4
+ /**
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2020 Vercel, Inc.
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ */
27
+ import webpack from 'webpack';
28
+ export declare class ReactFreshWebpackPlugin {
29
+ apply(compiler: webpack.Compiler): void;
30
+ }
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ /**
3
+ * Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ReactFreshWebpackPlugin = void 0;
7
+ /**
8
+ * The MIT License (MIT)
9
+ *
10
+ * Copyright (c) 2020 Vercel, Inc.
11
+ *
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ * in the Software without restriction, including without limitation the rights
15
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ * copies of the Software, and to permit persons to whom the Software is
17
+ * furnished to do so, subject to the following conditions:
18
+ *
19
+ * The above copyright notice and this permission notice shall be included in all
20
+ * copies or substantial portions of the Software.
21
+ *
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ * SOFTWARE.
29
+ */
30
+ // This file is copied from the @vercel/next.js, with removed TS annotations
31
+ // minor tweaks, and removed all webpack v4-related functionality
32
+ //
33
+ // https://github.com/vercel/next.js/blob/canary/packages/react-refresh-utils/ReactRefreshWebpackPlugin.ts
34
+ const webpack_1 = require("webpack");
35
+ class ReactRefreshRuntimeModule extends webpack_1.RuntimeModule {
36
+ constructor() {
37
+ super('react refresh', 5);
38
+ }
39
+ generate() {
40
+ const { runtimeTemplate } = this.compilation;
41
+ return webpack_1.Template.asString([
42
+ `${webpack_1.RuntimeGlobals.interceptModuleExecution}.push(${runtimeTemplate.basicFunction('options', [
43
+ `const originalFactory = options.factory;`,
44
+ `options.factory = ${runtimeTemplate.basicFunction('moduleObject, moduleExports, webpackRequire', [
45
+ // Legacy CSS implementations will `eval` browser code in a Node.js
46
+ // context to extract CSS. For backwards compatibility, we need to check
47
+ // we're in a browser context before continuing.
48
+ `const hasRefresh = typeof self !== "undefined" && !!self.$RefreshInterceptModuleExecution$;`,
49
+ `const cleanup = hasRefresh ? self.$RefreshInterceptModuleExecution$(moduleObject.id) : () => {};`,
50
+ 'try {',
51
+ webpack_1.Template.indent('originalFactory.call(this, moduleObject, moduleExports, webpackRequire);'),
52
+ '} finally {',
53
+ webpack_1.Template.indent(`cleanup();`),
54
+ '}',
55
+ ])}`,
56
+ ])})`,
57
+ ]);
58
+ }
59
+ }
60
+ class ReactFreshWebpackPlugin {
61
+ apply(compiler) {
62
+ const webpackMajorVersion = parseInt(webpack_1.version !== null && webpack_1.version !== void 0 ? webpack_1.version : '', 10);
63
+ if (webpackMajorVersion < 5) {
64
+ throw new Error(`ReactFreshWebpackPlugin does not support webpack v${webpackMajorVersion}.`);
65
+ }
66
+ compiler.hooks.compilation.tap(this.constructor.name, (compilation) => {
67
+ compilation.mainTemplate.hooks.localVars.tap(this.constructor.name, (source) => webpack_1.Template.asString([
68
+ source,
69
+ '',
70
+ '// noop fns to prevent runtime errors during initialization',
71
+ 'if (typeof self !== "undefined") {',
72
+ webpack_1.Template.indent('self.$RefreshReg$ = function () {};'),
73
+ webpack_1.Template.indent('self.$RefreshSig$ = function () {'),
74
+ webpack_1.Template.indent(webpack_1.Template.indent('return function (type) {')),
75
+ webpack_1.Template.indent(webpack_1.Template.indent(webpack_1.Template.indent('return type;'))),
76
+ webpack_1.Template.indent(webpack_1.Template.indent('};')),
77
+ webpack_1.Template.indent('};'),
78
+ '}',
79
+ ]));
80
+ compilation.hooks.additionalTreeRuntimeRequirements.tap(this.constructor.name, (chunk) => {
81
+ compilation.addRuntimeModule(chunk, new ReactRefreshRuntimeModule());
82
+ });
83
+ });
84
+ }
85
+ }
86
+ exports.ReactFreshWebpackPlugin = ReactFreshWebpackPlugin;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * ⚠️ Be careful when refactoring this file!
3
+ * This gets injected into every file of the browser.
4
+ * You cannot have returns, optional chains, inverse the if statement etc.
5
+ * Check the Typescript output in dist/ to see that no extra `var` statements were produced
6
+ */
7
+ /**
8
+ * Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
9
+ */
10
+ /**
11
+ * The MIT License (MIT)
12
+ *
13
+ * Copyright (c) 2020 Vercel, Inc.
14
+ *
15
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ * of this software and associated documentation files (the "Software"), to deal
17
+ * in the Software without restriction, including without limitation the rights
18
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ * copies of the Software, and to permit persons to whom the Software is
20
+ * furnished to do so, subject to the following conditions:
21
+ *
22
+ * The above copyright notice and this permission notice shall be included in all
23
+ * copies or substantial portions of the Software.
24
+ *
25
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ * SOFTWARE.
32
+ */
33
+ import { LoaderDefinition } from 'webpack';
34
+ declare const ReactRefreshLoader: LoaderDefinition;
35
+ export default ReactRefreshLoader;