@remotion/bundler 4.0.0-alpha.4 → 4.0.0-alpha4

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 (321) hide show
  1. package/LICENSE.md +8 -8
  2. package/dist/bundle-mode.d.ts +0 -0
  3. package/dist/bundle-mode.js +0 -0
  4. package/dist/bundle.d.ts +23 -5
  5. package/dist/bundle.js +122 -15
  6. package/dist/copy-dir.d.ts +8 -1
  7. package/dist/copy-dir.js +19 -3
  8. package/dist/esbuild-loader/index.d.ts +0 -0
  9. package/dist/esbuild-loader/index.js +0 -0
  10. package/dist/esbuild-loader/interfaces.d.ts +0 -0
  11. package/dist/esbuild-loader/interfaces.js +0 -0
  12. package/dist/fast-refresh/helpers.d.ts +0 -0
  13. package/dist/fast-refresh/helpers.js +2 -2
  14. package/dist/fast-refresh/index.d.ts +0 -0
  15. package/dist/fast-refresh/index.js +0 -0
  16. package/dist/fast-refresh/loader.d.ts +94 -0
  17. package/dist/fast-refresh/loader.js +8 -15
  18. package/dist/fast-refresh/runtime.d.ts +0 -0
  19. package/dist/fast-refresh/runtime.js +0 -0
  20. package/dist/homepage/homepage.d.ts +0 -0
  21. package/dist/homepage/homepage.js +30 -3
  22. package/dist/index-html.d.ts +8 -1
  23. package/dist/index-html.js +16 -4
  24. package/dist/index.d.ts +25 -10
  25. package/dist/index.js +2 -0
  26. package/dist/read-recursively.d.ts +8 -0
  27. package/dist/read-recursively.js +78 -0
  28. package/dist/renderEntry.d.ts +0 -0
  29. package/dist/renderEntry.js +37 -6
  30. package/dist/setup-environment.d.ts +0 -0
  31. package/dist/setup-environment.js +6 -1
  32. package/dist/stringify-with-circular-references.d.ts +1 -0
  33. package/dist/stringify-with-circular-references.js +18 -0
  34. package/dist/test/validate-bundle.test.d.ts +1 -0
  35. package/dist/test/validate-bundle.test.js +10 -0
  36. package/dist/test/validate-public-dir.test.d.ts +1 -0
  37. package/dist/test/validate-public-dir.test.js +21 -0
  38. package/dist/validate-public-dir.d.ts +1 -0
  39. package/dist/validate-public-dir.js +30 -0
  40. package/dist/webpack-cache.d.ts +0 -0
  41. package/dist/webpack-cache.js +0 -0
  42. package/dist/webpack-config.d.ts +5 -3
  43. package/dist/webpack-config.js +12 -9
  44. package/package.json +65 -66
  45. package/react-shim.js +5 -1
  46. package/dist/bundle-mode.d.ts.map +0 -1
  47. package/dist/bundle-mode.js.map +0 -1
  48. package/dist/bundler.d.ts +0 -8
  49. package/dist/bundler.d.ts.map +0 -1
  50. package/dist/bundler.js +0 -77
  51. package/dist/bundler.js.map +0 -1
  52. package/dist/copy-dir.d.ts.map +0 -1
  53. package/dist/copy-dir.js.map +0 -1
  54. package/dist/dev-middleware/compatible-api.d.ts +0 -10
  55. package/dist/dev-middleware/compatible-api.d.ts.map +0 -1
  56. package/dist/dev-middleware/compatible-api.js +0 -45
  57. package/dist/dev-middleware/compatible-api.js.map +0 -1
  58. package/dist/dev-middleware/get-filename-from-url.d.ts +0 -3
  59. package/dist/dev-middleware/get-filename-from-url.d.ts.map +0 -1
  60. package/dist/dev-middleware/get-filename-from-url.js +0 -93
  61. package/dist/dev-middleware/get-filename-from-url.js.map +0 -1
  62. package/dist/dev-middleware/get-paths.d.ts +0 -8
  63. package/dist/dev-middleware/get-paths.d.ts.map +0 -1
  64. package/dist/dev-middleware/get-paths.js +0 -20
  65. package/dist/dev-middleware/get-paths.js.map +0 -1
  66. package/dist/dev-middleware/index.d.ts +0 -4
  67. package/dist/dev-middleware/index.d.ts.map +0 -1
  68. package/dist/dev-middleware/index.js +0 -58
  69. package/dist/dev-middleware/index.js.map +0 -1
  70. package/dist/dev-middleware/is-color-supported.d.ts +0 -2
  71. package/dist/dev-middleware/is-color-supported.d.ts.map +0 -1
  72. package/dist/dev-middleware/is-color-supported.js +0 -34
  73. package/dist/dev-middleware/is-color-supported.js.map +0 -1
  74. package/dist/dev-middleware/middleware.d.ts +0 -5
  75. package/dist/dev-middleware/middleware.d.ts.map +0 -1
  76. package/dist/dev-middleware/middleware.js +0 -142
  77. package/dist/dev-middleware/middleware.js.map +0 -1
  78. package/dist/dev-middleware/range-parser.d.ts +0 -16
  79. package/dist/dev-middleware/range-parser.d.ts.map +0 -1
  80. package/dist/dev-middleware/range-parser.js +0 -97
  81. package/dist/dev-middleware/range-parser.js.map +0 -1
  82. package/dist/dev-middleware/ready.d.ts +0 -6
  83. package/dist/dev-middleware/ready.d.ts.map +0 -1
  84. package/dist/dev-middleware/ready.js +0 -14
  85. package/dist/dev-middleware/ready.js.map +0 -1
  86. package/dist/dev-middleware/setup-hooks.d.ts +0 -3
  87. package/dist/dev-middleware/setup-hooks.d.ts.map +0 -1
  88. package/dist/dev-middleware/setup-hooks.js +0 -45
  89. package/dist/dev-middleware/setup-hooks.js.map +0 -1
  90. package/dist/dev-middleware/setup-output-filesystem.d.ts +0 -3
  91. package/dist/dev-middleware/setup-output-filesystem.d.ts.map +0 -1
  92. package/dist/dev-middleware/setup-output-filesystem.js +0 -14
  93. package/dist/dev-middleware/setup-output-filesystem.js.map +0 -1
  94. package/dist/dev-middleware/types.d.ts +0 -12
  95. package/dist/dev-middleware/types.d.ts.map +0 -1
  96. package/dist/dev-middleware/types.js +0 -3
  97. package/dist/dev-middleware/types.js.map +0 -1
  98. package/dist/error-overlay/entry-basic.d.ts +0 -2
  99. package/dist/error-overlay/entry-basic.d.ts.map +0 -1
  100. package/dist/error-overlay/entry-basic.js +0 -22
  101. package/dist/error-overlay/entry-basic.js.map +0 -1
  102. package/dist/error-overlay/react-overlay/effects/format-warning.d.ts +0 -12
  103. package/dist/error-overlay/react-overlay/effects/format-warning.d.ts.map +0 -1
  104. package/dist/error-overlay/react-overlay/effects/format-warning.js +0 -42
  105. package/dist/error-overlay/react-overlay/effects/format-warning.js.map +0 -1
  106. package/dist/error-overlay/react-overlay/effects/map-error-to-react-stack.d.ts +0 -8
  107. package/dist/error-overlay/react-overlay/effects/map-error-to-react-stack.d.ts.map +0 -1
  108. package/dist/error-overlay/react-overlay/effects/map-error-to-react-stack.js +0 -47
  109. package/dist/error-overlay/react-overlay/effects/map-error-to-react-stack.js.map +0 -1
  110. package/dist/error-overlay/react-overlay/effects/proxy-console.d.ts +0 -25
  111. package/dist/error-overlay/react-overlay/effects/proxy-console.d.ts.map +0 -1
  112. package/dist/error-overlay/react-overlay/effects/proxy-console.js +0 -64
  113. package/dist/error-overlay/react-overlay/effects/proxy-console.js.map +0 -1
  114. package/dist/error-overlay/react-overlay/effects/resolve-file-source.d.ts +0 -4
  115. package/dist/error-overlay/react-overlay/effects/resolve-file-source.d.ts.map +0 -1
  116. package/dist/error-overlay/react-overlay/effects/resolve-file-source.js +0 -32
  117. package/dist/error-overlay/react-overlay/effects/resolve-file-source.js.map +0 -1
  118. package/dist/error-overlay/react-overlay/effects/stack-trace-limit.d.ts +0 -4
  119. package/dist/error-overlay/react-overlay/effects/stack-trace-limit.d.ts.map +0 -1
  120. package/dist/error-overlay/react-overlay/effects/stack-trace-limit.js +0 -44
  121. package/dist/error-overlay/react-overlay/effects/stack-trace-limit.js.map +0 -1
  122. package/dist/error-overlay/react-overlay/effects/unhandled-error.d.ts +0 -5
  123. package/dist/error-overlay/react-overlay/effects/unhandled-error.d.ts.map +0 -1
  124. package/dist/error-overlay/react-overlay/effects/unhandled-error.js +0 -46
  125. package/dist/error-overlay/react-overlay/effects/unhandled-error.js.map +0 -1
  126. package/dist/error-overlay/react-overlay/effects/unhandled-rejection.d.ts +0 -5
  127. package/dist/error-overlay/react-overlay/effects/unhandled-rejection.d.ts.map +0 -1
  128. package/dist/error-overlay/react-overlay/effects/unhandled-rejection.js +0 -42
  129. package/dist/error-overlay/react-overlay/effects/unhandled-rejection.js.map +0 -1
  130. package/dist/error-overlay/react-overlay/index.d.ts +0 -3
  131. package/dist/error-overlay/react-overlay/index.d.ts.map +0 -1
  132. package/dist/error-overlay/react-overlay/index.js +0 -22
  133. package/dist/error-overlay/react-overlay/index.js.map +0 -1
  134. package/dist/error-overlay/react-overlay/listen-to-runtime-errors.d.ts +0 -9
  135. package/dist/error-overlay/react-overlay/listen-to-runtime-errors.d.ts.map +0 -1
  136. package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js +0 -79
  137. package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js.map +0 -1
  138. package/dist/error-overlay/react-overlay/utils/get-file-source.d.ts +0 -2
  139. package/dist/error-overlay/react-overlay/utils/get-file-source.d.ts.map +0 -1
  140. package/dist/error-overlay/react-overlay/utils/get-file-source.js +0 -22
  141. package/dist/error-overlay/react-overlay/utils/get-file-source.js.map +0 -1
  142. package/dist/error-overlay/react-overlay/utils/get-lines-around.d.ts +0 -15
  143. package/dist/error-overlay/react-overlay/utils/get-lines-around.d.ts.map +0 -1
  144. package/dist/error-overlay/react-overlay/utils/get-lines-around.js +0 -25
  145. package/dist/error-overlay/react-overlay/utils/get-lines-around.js.map +0 -1
  146. package/dist/error-overlay/react-overlay/utils/get-source-map.d.ts +0 -14
  147. package/dist/error-overlay/react-overlay/utils/get-source-map.d.ts.map +0 -1
  148. package/dist/error-overlay/react-overlay/utils/get-source-map.js +0 -56
  149. package/dist/error-overlay/react-overlay/utils/get-source-map.js.map +0 -1
  150. package/dist/error-overlay/react-overlay/utils/get-stack-frames.d.ts +0 -9
  151. package/dist/error-overlay/react-overlay/utils/get-stack-frames.d.ts.map +0 -1
  152. package/dist/error-overlay/react-overlay/utils/get-stack-frames.js +0 -22
  153. package/dist/error-overlay/react-overlay/utils/get-stack-frames.js.map +0 -1
  154. package/dist/error-overlay/react-overlay/utils/open-in-editor.d.ts +0 -13
  155. package/dist/error-overlay/react-overlay/utils/open-in-editor.d.ts.map +0 -1
  156. package/dist/error-overlay/react-overlay/utils/open-in-editor.js +0 -456
  157. package/dist/error-overlay/react-overlay/utils/open-in-editor.js.map +0 -1
  158. package/dist/error-overlay/react-overlay/utils/parser.d.ts +0 -3
  159. package/dist/error-overlay/react-overlay/utils/parser.d.ts.map +0 -1
  160. package/dist/error-overlay/react-overlay/utils/parser.js +0 -118
  161. package/dist/error-overlay/react-overlay/utils/parser.js.map +0 -1
  162. package/dist/error-overlay/react-overlay/utils/stack-frame.d.ts +0 -41
  163. package/dist/error-overlay/react-overlay/utils/stack-frame.d.ts.map +0 -1
  164. package/dist/error-overlay/react-overlay/utils/stack-frame.js +0 -32
  165. package/dist/error-overlay/react-overlay/utils/stack-frame.js.map +0 -1
  166. package/dist/error-overlay/react-overlay/utils/unmapper.d.ts +0 -3
  167. package/dist/error-overlay/react-overlay/utils/unmapper.d.ts.map +0 -1
  168. package/dist/error-overlay/react-overlay/utils/unmapper.js +0 -60
  169. package/dist/error-overlay/react-overlay/utils/unmapper.js.map +0 -1
  170. package/dist/error-overlay/remotion-overlay/AskOnDiscord.d.ts +0 -3
  171. package/dist/error-overlay/remotion-overlay/AskOnDiscord.d.ts.map +0 -1
  172. package/dist/error-overlay/remotion-overlay/AskOnDiscord.js +0 -15
  173. package/dist/error-overlay/remotion-overlay/AskOnDiscord.js.map +0 -1
  174. package/dist/error-overlay/remotion-overlay/Button.d.ts +0 -7
  175. package/dist/error-overlay/remotion-overlay/Button.d.ts.map +0 -1
  176. package/dist/error-overlay/remotion-overlay/Button.js +0 -25
  177. package/dist/error-overlay/remotion-overlay/Button.js.map +0 -1
  178. package/dist/error-overlay/remotion-overlay/CodeFrame.d.ts +0 -7
  179. package/dist/error-overlay/remotion-overlay/CodeFrame.d.ts.map +0 -1
  180. package/dist/error-overlay/remotion-overlay/CodeFrame.js +0 -29
  181. package/dist/error-overlay/remotion-overlay/CodeFrame.js.map +0 -1
  182. package/dist/error-overlay/remotion-overlay/DismissButton.d.ts +0 -3
  183. package/dist/error-overlay/remotion-overlay/DismissButton.d.ts.map +0 -1
  184. package/dist/error-overlay/remotion-overlay/DismissButton.js +0 -24
  185. package/dist/error-overlay/remotion-overlay/DismissButton.js.map +0 -1
  186. package/dist/error-overlay/remotion-overlay/ErrorDisplay.d.ts +0 -6
  187. package/dist/error-overlay/remotion-overlay/ErrorDisplay.d.ts.map +0 -1
  188. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +0 -46
  189. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js.map +0 -1
  190. package/dist/error-overlay/remotion-overlay/ErrorLoader.d.ts +0 -5
  191. package/dist/error-overlay/remotion-overlay/ErrorLoader.d.ts.map +0 -1
  192. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +0 -62
  193. package/dist/error-overlay/remotion-overlay/ErrorLoader.js.map +0 -1
  194. package/dist/error-overlay/remotion-overlay/ErrorTitle.d.ts +0 -7
  195. package/dist/error-overlay/remotion-overlay/ErrorTitle.d.ts.map +0 -1
  196. package/dist/error-overlay/remotion-overlay/ErrorTitle.js +0 -42
  197. package/dist/error-overlay/remotion-overlay/ErrorTitle.js.map +0 -1
  198. package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +0 -6
  199. package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts.map +0 -1
  200. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +0 -91
  201. package/dist/error-overlay/remotion-overlay/OpenInEditor.js.map +0 -1
  202. package/dist/error-overlay/remotion-overlay/Overlay.d.ts +0 -15
  203. package/dist/error-overlay/remotion-overlay/Overlay.d.ts.map +0 -1
  204. package/dist/error-overlay/remotion-overlay/Overlay.js +0 -50
  205. package/dist/error-overlay/remotion-overlay/Overlay.js.map +0 -1
  206. package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.d.ts +0 -5
  207. package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.d.ts.map +0 -1
  208. package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +0 -14
  209. package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js.map +0 -1
  210. package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +0 -9
  211. package/dist/error-overlay/remotion-overlay/StackFrame.d.ts.map +0 -1
  212. package/dist/error-overlay/remotion-overlay/StackFrame.js +0 -49
  213. package/dist/error-overlay/remotion-overlay/StackFrame.js.map +0 -1
  214. package/dist/error-overlay/remotion-overlay/Symbolicating.d.ts +0 -3
  215. package/dist/error-overlay/remotion-overlay/Symbolicating.d.ts.map +0 -1
  216. package/dist/error-overlay/remotion-overlay/Symbolicating.js +0 -9
  217. package/dist/error-overlay/remotion-overlay/Symbolicating.js.map +0 -1
  218. package/dist/error-overlay/remotion-overlay/carets.d.ts +0 -4
  219. package/dist/error-overlay/remotion-overlay/carets.d.ts.map +0 -1
  220. package/dist/error-overlay/remotion-overlay/carets.js +0 -13
  221. package/dist/error-overlay/remotion-overlay/carets.js.map +0 -1
  222. package/dist/error-overlay/remotion-overlay/format-location.d.ts +0 -2
  223. package/dist/error-overlay/remotion-overlay/format-location.d.ts.map +0 -1
  224. package/dist/error-overlay/remotion-overlay/format-location.js +0 -11
  225. package/dist/error-overlay/remotion-overlay/format-location.js.map +0 -1
  226. package/dist/error-overlay/remotion-overlay/index.d.ts +0 -2
  227. package/dist/error-overlay/remotion-overlay/index.d.ts.map +0 -1
  228. package/dist/error-overlay/remotion-overlay/index.js +0 -23
  229. package/dist/error-overlay/remotion-overlay/index.js.map +0 -1
  230. package/dist/esbuild-loader/index.d.ts.map +0 -1
  231. package/dist/esbuild-loader/index.js.map +0 -1
  232. package/dist/esbuild-loader/interfaces.d.ts.map +0 -1
  233. package/dist/esbuild-loader/interfaces.js.map +0 -1
  234. package/dist/fast-refresh/helpers.d.ts.map +0 -1
  235. package/dist/fast-refresh/helpers.js.map +0 -1
  236. package/dist/fast-refresh/index.d.ts.map +0 -1
  237. package/dist/fast-refresh/index.js.map +0 -1
  238. package/dist/fast-refresh/loader.d.ts.map +0 -1
  239. package/dist/fast-refresh/loader.js.map +0 -1
  240. package/dist/fast-refresh/runtime.d.ts.map +0 -1
  241. package/dist/fast-refresh/runtime.js.map +0 -1
  242. package/dist/get-latest-remotion-version.d.ts +0 -2
  243. package/dist/get-latest-remotion-version.d.ts.map +0 -1
  244. package/dist/get-latest-remotion-version.js +0 -32
  245. package/dist/get-latest-remotion-version.js.map +0 -1
  246. package/dist/get-package-manager.d.ts +0 -9
  247. package/dist/get-package-manager.d.ts.map +0 -1
  248. package/dist/get-package-manager.js +0 -39
  249. package/dist/get-package-manager.js.map +0 -1
  250. package/dist/get-port.d.ts +0 -2
  251. package/dist/get-port.d.ts.map +0 -1
  252. package/dist/get-port.js +0 -79
  253. package/dist/get-port.js.map +0 -1
  254. package/dist/homepage/homepage.d.ts.map +0 -1
  255. package/dist/homepage/homepage.js.map +0 -1
  256. package/dist/hot-middleware/client.d.ts +0 -20
  257. package/dist/hot-middleware/client.d.ts.map +0 -1
  258. package/dist/hot-middleware/client.js +0 -207
  259. package/dist/hot-middleware/client.js.map +0 -1
  260. package/dist/hot-middleware/index.d.ts +0 -14
  261. package/dist/hot-middleware/index.d.ts.map +0 -1
  262. package/dist/hot-middleware/index.js +0 -181
  263. package/dist/hot-middleware/index.js.map +0 -1
  264. package/dist/hot-middleware/process-update.d.ts +0 -13
  265. package/dist/hot-middleware/process-update.d.ts.map +0 -1
  266. package/dist/hot-middleware/process-update.js +0 -148
  267. package/dist/hot-middleware/process-update.js.map +0 -1
  268. package/dist/hot-middleware/strip-ansi.d.ts +0 -2
  269. package/dist/hot-middleware/strip-ansi.d.ts.map +0 -1
  270. package/dist/hot-middleware/strip-ansi.js +0 -22
  271. package/dist/hot-middleware/strip-ansi.js.map +0 -1
  272. package/dist/hot-middleware/types.d.ts +0 -38
  273. package/dist/hot-middleware/types.d.ts.map +0 -1
  274. package/dist/hot-middleware/types.js +0 -18
  275. package/dist/hot-middleware/types.js.map +0 -1
  276. package/dist/index.d.ts.map +0 -1
  277. package/dist/index.js.map +0 -1
  278. package/dist/project-info.d.ts +0 -6
  279. package/dist/project-info.d.ts.map +0 -1
  280. package/dist/project-info.js +0 -23
  281. package/dist/project-info.js.map +0 -1
  282. package/dist/renderEntry.d.ts.map +0 -1
  283. package/dist/renderEntry.js.map +0 -1
  284. package/dist/setup-environment.d.ts.map +0 -1
  285. package/dist/setup-environment.js.map +0 -1
  286. package/dist/start-server.d.ts +0 -9
  287. package/dist/start-server.d.ts.map +0 -1
  288. package/dist/start-server.js +0 -122
  289. package/dist/start-server.js.map +0 -1
  290. package/dist/static-preview.d.ts +0 -2
  291. package/dist/static-preview.d.ts.map +0 -1
  292. package/dist/static-preview.js +0 -41
  293. package/dist/static-preview.js.map +0 -1
  294. package/dist/test/expect-to-throw.d.ts +0 -2
  295. package/dist/test/expect-to-throw.d.ts.map +0 -1
  296. package/dist/test/expect-to-throw.js +0 -15
  297. package/dist/test/expect-to-throw.js.map +0 -1
  298. package/dist/test/latest-remotion-version.test.d.ts +0 -2
  299. package/dist/test/latest-remotion-version.test.d.ts.map +0 -1
  300. package/dist/test/latest-remotion-version.test.js +0 -7
  301. package/dist/test/latest-remotion-version.test.js.map +0 -1
  302. package/dist/test/parse-error-stack.test.d.ts +0 -2
  303. package/dist/test/parse-error-stack.test.d.ts.map +0 -1
  304. package/dist/test/parse-error-stack.test.js +0 -18
  305. package/dist/test/parse-error-stack.test.js.map +0 -1
  306. package/dist/test/parse-module-not-found.test.d.ts +0 -2
  307. package/dist/test/parse-module-not-found.test.d.ts.map +0 -1
  308. package/dist/test/parse-module-not-found.test.js +0 -18
  309. package/dist/test/parse-module-not-found.test.js.map +0 -1
  310. package/dist/test/secure-source-read.test.d.ts +0 -2
  311. package/dist/test/secure-source-read.test.d.ts.map +0 -1
  312. package/dist/test/secure-source-read.test.js +0 -9
  313. package/dist/test/secure-source-read.test.js.map +0 -1
  314. package/dist/update-available.d.ts +0 -11
  315. package/dist/update-available.d.ts.map +0 -1
  316. package/dist/update-available.js +0 -37
  317. package/dist/update-available.js.map +0 -1
  318. package/dist/webpack-cache.d.ts.map +0 -1
  319. package/dist/webpack-cache.js.map +0 -1
  320. package/dist/webpack-config.d.ts.map +0 -1
  321. package/dist/webpack-config.js.map +0 -1
package/LICENSE.md CHANGED
@@ -1,34 +1,34 @@
1
1
  # Remotion License
2
2
 
3
- Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion create videos for free (even commercial), while a company license is required for for-profit organisations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
3
+ Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
4
4
 
5
5
  - [Free license](#free-license)
6
6
  - [Company license](#company-license)
7
7
 
8
8
  ## Free license
9
9
 
10
- Copyright © 2022 [Jonny Burger](https://jonny.io)
10
+ Copyright © 2023 [Remotion](https://www.remotion.dev/)
11
11
 
12
12
  ### Eligibility
13
13
 
14
14
  You are eligible to use Remotion for free if you are:
15
15
 
16
16
  - an individual
17
- - a for-profit organisation with up to 3 employees
18
- - a non-profit or not-for-profit organisation
17
+ - a for-profit organization with up to 3 employees
18
+ - a non-profit or not-for-profit organization
19
19
  - evaluating whether Remotion is a good fit, and are not yet using it in a commercial way
20
20
 
21
21
  ### Allowed use cases
22
22
 
23
- Permission is hereby granted, free of charge, to any person eligible for the "Free license", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify and the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
23
+ Permission is hereby granted, free of charge, to any person eligible for the "Free license", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
24
24
 
25
25
  ### Disallowed use cases
26
26
 
27
- It is not allowed to copy or modify Remotion code for the purpose of selling, renting, licensing, relicensing, sublicensing your own derivate of Remotion.
27
+ It is not allowed to copy or modify Remotion code for the purpose of selling, renting, licensing, relicensing, or sublicensing your own derivate of Remotion.
28
28
 
29
29
  ### Warranty notice
30
30
 
31
- The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
31
+ The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
32
32
 
33
33
  ### Support
34
34
 
@@ -36,6 +36,6 @@ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
36
36
 
37
37
  ## Company license
38
38
 
39
- You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support.
39
+ You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)).
40
40
 
41
41
  Visit [companies.remotion.dev](https://companies.remotion.dev) for pricing and to buy a license.
File without changes
File without changes
package/dist/bundle.d.ts CHANGED
@@ -1,17 +1,35 @@
1
1
  import type { WebpackOverrideFn } from 'remotion';
2
2
  import webpack from 'webpack';
3
- export declare type BundleOptions = {
3
+ export declare type LegacyBundleOptions = {
4
4
  webpackOverride?: WebpackOverrideFn;
5
5
  outDir?: string;
6
6
  enableCaching?: boolean;
7
7
  publicPath?: string;
8
8
  rootDir?: string;
9
+ publicDir?: string | null;
10
+ onPublicDirCopyProgress?: (bytes: number) => void;
11
+ onSymlinkDetected?: (path: string) => void;
9
12
  };
10
- export declare const getConfig: ({ entryPoint, outDir, resolvedRemotionRoot, onProgressUpdate, options, }: {
13
+ export declare const getConfig: ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, }: {
11
14
  outDir: string;
12
15
  entryPoint: string;
13
16
  resolvedRemotionRoot: string;
14
- onProgressUpdate?: ((progress: number) => void) | undefined;
15
- options?: BundleOptions | undefined;
17
+ onProgress?: ((progress: number) => void) | undefined;
18
+ options?: LegacyBundleOptions | undefined;
16
19
  }) => [string, webpack.Configuration];
17
- export declare const bundle: (entryPoint: string, onProgressUpdate?: ((progress: number) => void) | undefined, options?: BundleOptions) => Promise<string>;
20
+ export declare type BundleOptions = {
21
+ entryPoint: string;
22
+ onProgress?: (progress: number) => void;
23
+ ignoreRegisterRootWarning?: boolean;
24
+ } & LegacyBundleOptions;
25
+ declare type Arguments = [options: BundleOptions] | [
26
+ entryPoint: string,
27
+ onProgress?: (progress: number) => void,
28
+ options?: LegacyBundleOptions
29
+ ];
30
+ /**
31
+ * @description The method bundles a Remotion project using Webpack and prepares it for rendering using renderMedia()
32
+ * @see [Documentation](https://www.remotion.dev/docs/bundle)
33
+ */
34
+ export declare function bundle(...args: Arguments): Promise<string>;
35
+ export {};
package/dist/bundle.js CHANGED
@@ -1,10 +1,33 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
27
  };
5
28
  Object.defineProperty(exports, "__esModule", { value: true });
6
29
  exports.bundle = exports.getConfig = void 0;
7
- const fs_1 = __importDefault(require("fs"));
30
+ const fs_1 = __importStar(require("fs"));
8
31
  const os_1 = __importDefault(require("os"));
9
32
  const path_1 = __importDefault(require("path"));
10
33
  const util_1 = require("util");
@@ -12,15 +35,15 @@ const webpack_1 = __importDefault(require("webpack"));
12
35
  const worker_threads_1 = require("worker_threads");
13
36
  const copy_dir_1 = require("./copy-dir");
14
37
  const index_html_1 = require("./index-html");
38
+ const read_recursively_1 = require("./read-recursively");
15
39
  const webpack_config_1 = require("./webpack-config");
16
- const entry = require.resolve('./renderEntry');
17
40
  const promisified = (0, util_1.promisify)(webpack_1.default);
18
41
  const prepareOutDir = async (specified) => {
19
42
  if (specified) {
20
43
  await fs_1.default.promises.mkdir(specified, { recursive: true });
21
44
  return specified;
22
45
  }
23
- return fs_1.default.promises.mkdtemp(path_1.default.join(os_1.default.tmpdir(), 'react-motion-graphics'));
46
+ return fs_1.default.promises.mkdtemp(path_1.default.join(os_1.default.tmpdir(), 'remotion-webpack-bundle-'));
24
47
  };
25
48
  const trimLeadingSlash = (p) => {
26
49
  if (p.startsWith('/')) {
@@ -34,28 +57,82 @@ const trimTrailingSlash = (p) => {
34
57
  }
35
58
  return p;
36
59
  };
37
- const getConfig = ({ entryPoint, outDir, resolvedRemotionRoot, onProgressUpdate, options, }) => {
60
+ const getConfig = ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, }) => {
38
61
  var _a, _b;
62
+ const entry = require.resolve('./renderEntry');
39
63
  return (0, webpack_config_1.webpackConfig)({
40
64
  entry,
41
65
  userDefinedComponent: entryPoint,
42
66
  outDir,
43
67
  environment: 'production',
44
68
  webpackOverride: (_a = options === null || options === void 0 ? void 0 : options.webpackOverride) !== null && _a !== void 0 ? _a : ((f) => f),
45
- onProgressUpdate,
69
+ onProgress,
46
70
  enableCaching: (_b = options === null || options === void 0 ? void 0 : options.enableCaching) !== null && _b !== void 0 ? _b : true,
47
71
  maxTimelineTracks: 15,
48
72
  // For production, the variables are set dynamically
49
73
  envVariables: {},
50
74
  entryPoints: [],
51
75
  remotionRoot: resolvedRemotionRoot,
76
+ keyboardShortcutsEnabled: false,
77
+ poll: null,
52
78
  });
53
79
  };
54
80
  exports.getConfig = getConfig;
55
- const bundle = async (entryPoint, onProgressUpdate, options) => {
56
- var _a, _b, _c;
57
- const resolvedRemotionRoot = (_a = options === null || options === void 0 ? void 0 : options.rootDir) !== null && _a !== void 0 ? _a : process.cwd();
58
- const outDir = await prepareOutDir((_b = options === null || options === void 0 ? void 0 : options.outDir) !== null && _b !== void 0 ? _b : null);
81
+ const convertArgumentsIntoOptions = (args) => {
82
+ var _a;
83
+ if (args.length === 0) {
84
+ throw new TypeError('bundle() was called without arguments');
85
+ }
86
+ const firstArg = args[0];
87
+ if (typeof firstArg === 'string') {
88
+ return {
89
+ entryPoint: firstArg,
90
+ onProgress: args[1],
91
+ ...((_a = args[2]) !== null && _a !== void 0 ? _a : {}),
92
+ };
93
+ }
94
+ if (typeof firstArg.entryPoint !== 'string') {
95
+ throw new TypeError('bundle() was called without the `entryPoint` option');
96
+ }
97
+ return firstArg;
98
+ };
99
+ const recursionLimit = 5;
100
+ const findClosestPackageJsonFolder = (currentDir) => {
101
+ let possiblePackageJson = '';
102
+ for (let i = 0; i < recursionLimit; i++) {
103
+ possiblePackageJson = path_1.default.join(currentDir, 'package.json');
104
+ const exists = fs_1.default.existsSync(possiblePackageJson);
105
+ if (exists) {
106
+ return path_1.default.dirname(possiblePackageJson);
107
+ }
108
+ currentDir = path_1.default.dirname(currentDir);
109
+ }
110
+ return null;
111
+ };
112
+ const validateEntryPoint = async (entryPoint) => {
113
+ const contents = await fs_1.promises.readFile(entryPoint, 'utf8');
114
+ if (!contents.includes('registerRoot')) {
115
+ throw new Error([
116
+ `You passed ${entryPoint} as your entry point, but this file does not contain "registerRoot".`,
117
+ 'You should use the file that calls registerRoot() as the entry point.',
118
+ 'To ignore this error, pass "ignoreRegisterRootWarning" to bundle().',
119
+ 'This error cannot be ignored on the CLI.',
120
+ ].join(' '));
121
+ }
122
+ };
123
+ /**
124
+ * @description The method bundles a Remotion project using Webpack and prepares it for rendering using renderMedia()
125
+ * @see [Documentation](https://www.remotion.dev/docs/bundle)
126
+ */
127
+ async function bundle(...args) {
128
+ var _a, _b, _c, _d;
129
+ const actualArgs = convertArgumentsIntoOptions(args);
130
+ const entryPoint = path_1.default.resolve(process.cwd(), actualArgs.entryPoint);
131
+ const resolvedRemotionRoot = (_b = (_a = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.rootDir) !== null && _a !== void 0 ? _a : findClosestPackageJsonFolder(entryPoint)) !== null && _b !== void 0 ? _b : process.cwd();
132
+ if (!actualArgs.ignoreRegisterRootWarning) {
133
+ await validateEntryPoint(entryPoint);
134
+ }
135
+ const outDir = await prepareOutDir((_c = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.outDir) !== null && _c !== void 0 ? _c : null);
59
136
  // The config might use an override which might use
60
137
  // `process.cwd()`. The context should always be the Remotion root.
61
138
  // This is not supported in worker threads (used for tests)
@@ -63,11 +140,12 @@ const bundle = async (entryPoint, onProgressUpdate, options) => {
63
140
  if (worker_threads_1.isMainThread) {
64
141
  process.chdir(resolvedRemotionRoot);
65
142
  }
143
+ const { onProgress, ...options } = actualArgs;
66
144
  const [, config] = (0, exports.getConfig)({
67
145
  outDir,
68
146
  entryPoint,
69
147
  resolvedRemotionRoot,
70
- onProgressUpdate,
148
+ onProgress,
71
149
  options,
72
150
  });
73
151
  const output = await promisified([config]);
@@ -81,16 +159,35 @@ const bundle = async (entryPoint, onProgressUpdate, options) => {
81
159
  if (errors !== undefined && errors.length > 0) {
82
160
  throw new Error(errors[0].message + '\n' + errors[0].details);
83
161
  }
84
- const baseDir = (_c = options === null || options === void 0 ? void 0 : options.publicPath) !== null && _c !== void 0 ? _c : '/';
162
+ const baseDir = (_d = actualArgs === null || actualArgs === void 0 ? void 0 : actualArgs.publicPath) !== null && _d !== void 0 ? _d : '/';
85
163
  const staticHash = '/' +
86
164
  [trimTrailingSlash(trimLeadingSlash(baseDir)), 'public']
87
165
  .filter(Boolean)
88
166
  .join('/');
89
- // TODO: Unhardcode public directory
90
- const from = path_1.default.join(resolvedRemotionRoot, 'public');
167
+ const from = (options === null || options === void 0 ? void 0 : options.publicDir)
168
+ ? path_1.default.resolve(resolvedRemotionRoot, options.publicDir)
169
+ : path_1.default.join(resolvedRemotionRoot, 'public');
91
170
  const to = path_1.default.join(outDir, 'public');
171
+ let symlinkWarningShown = false;
172
+ const showSymlinkWarning = (ent, src) => {
173
+ if (symlinkWarningShown) {
174
+ return;
175
+ }
176
+ const absolutePath = path_1.default.join(src, ent.name);
177
+ if (options.onSymlinkDetected) {
178
+ options.onSymlinkDetected(absolutePath);
179
+ return;
180
+ }
181
+ symlinkWarningShown = true;
182
+ console.warn(`\nFound a symbolic link in the public folder (${absolutePath}). The symlink will be forwarded into the bundle.`);
183
+ };
92
184
  if (fs_1.default.existsSync(from)) {
93
- await (0, copy_dir_1.copyDir)(from, to);
185
+ await (0, copy_dir_1.copyDir)({
186
+ src: from,
187
+ dest: to,
188
+ onSymlinkDetected: showSymlinkWarning,
189
+ onProgress: (prog) => { var _a; return (_a = options.onPublicDirCopyProgress) === null || _a === void 0 ? void 0 : _a.call(options, prog); },
190
+ });
94
191
  }
95
192
  const html = (0, index_html_1.indexHtml)({
96
193
  staticHash,
@@ -98,8 +195,18 @@ const bundle = async (entryPoint, onProgressUpdate, options) => {
98
195
  editorName: null,
99
196
  inputProps: null,
100
197
  remotionRoot: resolvedRemotionRoot,
198
+ previewServerCommand: null,
199
+ numberOfAudioTags: 0,
200
+ publicFiles: (0, read_recursively_1.readRecursively)({
201
+ folder: '.',
202
+ startPath: from,
203
+ staticHash,
204
+ limit: 1000,
205
+ }),
206
+ includeFavicon: false,
207
+ title: 'Remotion Bundle',
101
208
  });
102
209
  fs_1.default.writeFileSync(path_1.default.join(outDir, 'index.html'), html);
103
210
  return outDir;
104
- };
211
+ }
105
212
  exports.bundle = bundle;
@@ -1 +1,8 @@
1
- export declare function copyDir(src: string, dest: string): Promise<void>;
1
+ /// <reference types="node" />
2
+ import fs from 'fs';
3
+ export declare function copyDir({ src, dest, onSymlinkDetected, onProgress, }: {
4
+ src: string;
5
+ dest: string;
6
+ onSymlinkDetected: (entry: fs.Dirent, dir: string) => void;
7
+ onProgress: (bytes: number) => void;
8
+ }): Promise<void>;
package/dist/copy-dir.js CHANGED
@@ -6,17 +6,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.copyDir = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
- async function copyDir(src, dest) {
9
+ async function copyDir({ src, dest, onSymlinkDetected, onProgress, }) {
10
10
  await fs_1.default.promises.mkdir(dest, { recursive: true });
11
11
  const entries = await fs_1.default.promises.readdir(src, { withFileTypes: true });
12
+ let copied = 0;
12
13
  for (const entry of entries) {
13
14
  const srcPath = path_1.default.join(src, entry.name);
14
15
  const destPath = path_1.default.join(dest, entry.name);
15
16
  if (entry.isDirectory()) {
16
- await copyDir(srcPath, destPath);
17
+ await copyDir({
18
+ src: srcPath,
19
+ dest: destPath,
20
+ onSymlinkDetected,
21
+ onProgress,
22
+ });
23
+ }
24
+ else if (entry.isSymbolicLink()) {
25
+ const realpath = await fs_1.default.promises.realpath(srcPath);
26
+ onSymlinkDetected(entry, src);
27
+ await fs_1.default.promises.symlink(realpath, destPath);
17
28
  }
18
29
  else {
19
- await fs_1.default.promises.copyFile(srcPath, destPath);
30
+ const [, { size }] = await Promise.all([
31
+ fs_1.default.promises.copyFile(srcPath, destPath),
32
+ fs_1.default.promises.stat(srcPath),
33
+ ]);
34
+ copied += size;
35
+ onProgress(copied);
20
36
  }
21
37
  }
22
38
  }
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -127,10 +127,10 @@ function scheduleUpdate() {
127
127
  }
128
128
  };
129
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') {
130
+ if (((_a = __webpack_module__.hot) === null || _a === void 0 ? void 0 : _a.status()) === 'idle') {
131
131
  return;
132
132
  }
133
- (_b = module.hot) === null || _b === void 0 ? void 0 : _b.addStatusHandler((status) => {
133
+ (_b = __webpack_module__.hot) === null || _b === void 0 ? void 0 : _b.addStatusHandler((status) => {
134
134
  if (status === 'idle') {
135
135
  execute();
136
136
  }
File without changes
File without changes
@@ -31,5 +31,99 @@
31
31
  * SOFTWARE.
32
32
  */
33
33
  import type { LoaderDefinition } from 'webpack';
34
+ declare global {
35
+ const __webpack_hash__: unknown;
36
+ interface HotNotifierInfo {
37
+ type: 'self-declined' | 'declined' | 'unaccepted' | 'accepted' | 'disposed' | 'accept-errored' | 'self-accept-errored' | 'self-accept-error-handler-errored';
38
+ /**
39
+ * The module in question.
40
+ */
41
+ moduleId: number;
42
+ /**
43
+ * For errors: the module id owning the accept handler.
44
+ */
45
+ dependencyId?: number | undefined;
46
+ /**
47
+ * For declined/accepted/unaccepted: the chain from where the update was propagated.
48
+ */
49
+ chain?: number[] | undefined;
50
+ /**
51
+ * For declined: the module id of the declining parent
52
+ */
53
+ parentId?: number | undefined;
54
+ /**
55
+ * For accepted: the modules that are outdated and will be disposed
56
+ */
57
+ outdatedModules?: number[] | undefined;
58
+ /**
59
+ * For accepted: The location of accept handlers that will handle the update
60
+ */
61
+ outdatedDependencies?: {
62
+ [dependencyId: number]: number[];
63
+ } | undefined;
64
+ /**
65
+ * For errors: the thrown error
66
+ */
67
+ error?: Error | undefined;
68
+ /**
69
+ * For self-accept-error-handler-errored: the error thrown by the module
70
+ * before the error handler tried to handle it.
71
+ */
72
+ originalError?: Error | undefined;
73
+ }
74
+ interface AcceptOptions {
75
+ /**
76
+ * If true the update process continues even if some modules are not accepted (and would bubble to the entry point).
77
+ */
78
+ ignoreUnaccepted?: boolean | undefined;
79
+ /**
80
+ * Ignore changes made to declined modules.
81
+ */
82
+ ignoreDeclined?: boolean | undefined;
83
+ /**
84
+ * Ignore errors throw in accept handlers, error handlers and while reevaluating module.
85
+ */
86
+ ignoreErrored?: boolean | undefined;
87
+ /**
88
+ * Notifier for declined modules.
89
+ */
90
+ onDeclined?: ((info: HotNotifierInfo) => void) | undefined;
91
+ /**
92
+ * Notifier for unaccepted modules.
93
+ */
94
+ onUnaccepted?: ((info: HotNotifierInfo) => void) | undefined;
95
+ /**
96
+ * Notifier for accepted modules.
97
+ */
98
+ onAccepted?: ((info: HotNotifierInfo) => void) | undefined;
99
+ /**
100
+ * Notifier for disposed modules.
101
+ */
102
+ onDisposed?: ((info: HotNotifierInfo) => void) | undefined;
103
+ /**
104
+ * Notifier for errors.
105
+ */
106
+ onErrored?: ((info: HotNotifierInfo) => void) | undefined;
107
+ /**
108
+ * Indicates that apply() is automatically called by check function
109
+ */
110
+ autoApply?: boolean | undefined;
111
+ }
112
+ const __webpack_module__: {
113
+ id: string;
114
+ exports: unknown;
115
+ hot: {
116
+ accept: () => void;
117
+ dispose: (onDispose: (data: Record<string, unknown>) => void) => void;
118
+ invalidate: () => void;
119
+ data?: Record<string, unknown>;
120
+ addStatusHandler(callback: (status: string) => void): void;
121
+ status(): string;
122
+ apply(options?: AcceptOptions): Promise<ModuleId[]>;
123
+ check(autoApply?: boolean): Promise<null | ModuleId[]>;
124
+ };
125
+ };
126
+ type ModuleId = string | number;
127
+ }
34
128
  declare const ReactRefreshLoader: LoaderDefinition;
35
129
  export default ReactRefreshLoader;
@@ -12,34 +12,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  // This function gets unwrapped into global scope, which is why we don't invert
13
13
  // if-blocks. Also, you cannot use `return`.
14
14
  function RefreshModuleRuntime() {
15
+ var _a, _b;
15
16
  // Legacy CSS implementations will `eval` browser code in a Node.js context
16
17
  // to extract CSS. For backwards compatibility, we need to check we're in a
17
18
  // browser context before continuing.
18
19
  if (typeof self !== 'undefined' &&
19
20
  // AMP / No-JS mode does not inject these helpers:
20
21
  '$RefreshHelpers$' in self) {
21
- // @ts-expect-error
22
- // eslint-disable-next-line no-proto
23
- const currentExports = module.__proto__.exports;
24
- let prevExports = null;
25
- // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
26
- if (module.hot && module.hot.data && module.hot.data.prevExports) {
27
- prevExports = module.hot.data.prevExports;
28
- }
22
+ const currentExports = __webpack_module__.exports;
23
+ const prevExports = (_b = (_a = __webpack_module__.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;
29
24
  // This cannot happen in MainTemplate because the exports mismatch between
30
25
  // templating and execution.
31
- self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);
26
+ self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, __webpack_module__.id);
32
27
  // A module can be accepted automatically based on its exports, e.g. when
33
28
  // it is a Refresh Boundary.
34
29
  if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {
35
30
  // Save the previous exports on update so we can compare the boundary
36
31
  // signatures.
37
- module.hot.dispose((data) => {
32
+ __webpack_module__.hot.dispose((data) => {
38
33
  data.prevExports = currentExports;
39
34
  });
40
35
  // Unconditionally accept an update to this module, we'll check if it's
41
36
  // still a Refresh Boundary later.
42
- module.hot.accept();
37
+ __webpack_module__.hot.accept();
43
38
  // This field is set when the previous version of this module was a
44
39
  // Refresh Boundary, letting us know we need to check for invalidation or
45
40
  // enqueue an update.
@@ -52,8 +47,7 @@ function RefreshModuleRuntime() {
52
47
  // re-render. Similarly, if you convert a class component to a
53
48
  // function, we want to invalidate the boundary.
54
49
  if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {
55
- // @ts-expect-error
56
- module.hot.invalidate();
50
+ __webpack_module__.hot.invalidate();
57
51
  }
58
52
  else {
59
53
  self.$RefreshHelpers$.scheduleUpdate();
@@ -67,8 +61,7 @@ function RefreshModuleRuntime() {
67
61
  // because we already accepted this update (accidental side effect).
68
62
  const isNoLongerABoundary = prevExports !== null;
69
63
  if (isNoLongerABoundary) {
70
- // @ts-expect-error
71
- module.hot.invalidate();
64
+ __webpack_module__.hot.invalidate();
72
65
  }
73
66
  }
74
67
  }
File without changes
File without changes
File without changes
@@ -26,10 +26,14 @@ const pre = {
26
26
  const AvailableCompositions = () => {
27
27
  const [comps, setComps] = (0, react_1.useState)(null);
28
28
  (0, react_1.useEffect)(() => {
29
+ if ((0, bundle_mode_1.getBundleMode)().type !== 'evaluation') {
30
+ return;
31
+ }
29
32
  let timeout = null;
30
33
  const check = () => {
31
34
  if (window.ready === true) {
32
- setComps(window.getStaticCompositions());
35
+ const newComps = window.getStaticCompositions();
36
+ setComps(newComps);
33
37
  }
34
38
  else {
35
39
  timeout = setTimeout(check, 250);
@@ -50,13 +54,36 @@ const AvailableCompositions = () => {
50
54
  return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: showComps, children: "Click here to see a list of available compositions." }));
51
55
  }
52
56
  return ((0, jsx_runtime_1.jsxs)("div", { children: [comps === null ? (0, jsx_runtime_1.jsx)("p", { children: "Loading compositions..." }) : null, (0, jsx_runtime_1.jsx)("ul", { children: comps === null
53
- ? null
57
+ ? []
54
58
  : comps.map((c) => {
55
59
  return (0, jsx_runtime_1.jsx)("li", { children: c.id }, c.id);
56
60
  }) })] }));
57
61
  };
62
+ const TestCORS = () => {
63
+ const [serveUrl, setServeUrl] = (0, react_1.useState)('');
64
+ const [result, setResult] = (0, react_1.useState)('');
65
+ const handleServeUrl = (0, react_1.useCallback)((e) => {
66
+ setServeUrl(e.target.value);
67
+ }, []);
68
+ const isCORSWorking = (0, react_1.useCallback)(async (e) => {
69
+ e.preventDefault();
70
+ try {
71
+ const response = await fetch(serveUrl, { mode: 'cors' });
72
+ if (response.ok) {
73
+ setResult(`CORS is enabled on this URL: ${serveUrl}`);
74
+ }
75
+ else {
76
+ setResult('URL does not support CORS - See DevTools console for more details');
77
+ }
78
+ }
79
+ catch (error) {
80
+ setResult('URL does not support CORS - See DevTools console for more details');
81
+ }
82
+ }, [serveUrl]);
83
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("p", { children: ["Quickly test if a URL is supported being loaded on origin", ' ', (0, jsx_runtime_1.jsx)("code", { children: window.location.origin }), ". Enter the URL of an asset below."] }), result ? (0, jsx_runtime_1.jsx)("p", { className: "result", children: result }) : null, (0, jsx_runtime_1.jsxs)("form", { onSubmit: isCORSWorking, children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "serveurl", children: (0, jsx_runtime_1.jsx)("input", { placeholder: "Enter URL", type: "text", name: "serveurl", value: serveUrl, onChange: handleServeUrl }) }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("button", { type: "submit", children: "Test CORS" })] })] }));
84
+ };
58
85
  const Homepage = () => {
59
86
  const url = window.location.origin + window.location.pathname;
60
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("h1", { children: "Remotion Bundle" }), "This is a website which contains a bundled Remotion video. You can render videos based on this URL.", (0, jsx_runtime_1.jsx)("h2", { children: "Available compositions" }), (0, jsx_runtime_1.jsx)(AvailableCompositions, {}), (0, jsx_runtime_1.jsx)("h2", { children: "How to render" }), "Locally: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: pre, children: ["npx remotion render ", url, " ", '<comp-name> <output-location>'] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "With Remotion Lambda: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: pre, children: ["npx remotion lambda render ", url, " ", '<comp-name>'] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("p", { children: ["You can also render still images, and use the Node.JS APIs", ' ', (0, jsx_runtime_1.jsx)("code", { children: "getCompositions()" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "renderMedia()" }), ",", ' ', (0, jsx_runtime_1.jsx)("code", { children: "renderMediaOnLambda()" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "renderStill()" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "renderStillOnLambda()" }), " with this URL."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Visit", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.dev/docs", target: "_blank", children: "remotion.dev/docs" }), ' ', "to read the documentation."] })] }));
87
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("h1", { children: "Remotion Bundle" }), "This is a website which contains a bundled Remotion video. You can render videos based on this URL.", (0, jsx_runtime_1.jsx)("h2", { children: "Available compositions" }), (0, jsx_runtime_1.jsx)(AvailableCompositions, {}), (0, jsx_runtime_1.jsx)("h2", { children: "How to render" }), "Locally: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: pre, children: ["npx remotion render ", url, " ", '<comp-name> <output-location>'] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "With Remotion Lambda: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: pre, children: ["npx remotion lambda render ", url, " ", '<comp-name>'] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("p", { children: ["You can also render still images, and use the Node.JS APIs", ' ', (0, jsx_runtime_1.jsx)("code", { children: "getCompositions()" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "renderMedia()" }), ",", ' ', (0, jsx_runtime_1.jsx)("code", { children: "renderMediaOnLambda()" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "renderStill()" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "renderStillOnLambda()" }), " with this URL."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Visit", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.dev/docs", target: "_blank", children: "remotion.dev/docs" }), ' ', "to read the documentation."] }), (0, jsx_runtime_1.jsx)("h2", { children: "CORS testing tool" }), (0, jsx_runtime_1.jsx)(TestCORS, {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {})] }));
61
88
  };
62
89
  exports.Homepage = Homepage;
@@ -1,7 +1,14 @@
1
- export declare const indexHtml: ({ baseDir, editorName, inputProps, staticHash, remotionRoot, }: {
1
+ import type { StaticFile } from 'remotion';
2
+ export declare const indexHtml: ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, previewServerCommand, numberOfAudioTags, publicFiles, includeFavicon, title, }: {
2
3
  staticHash: string;
3
4
  baseDir: string;
4
5
  editorName: string | null;
5
6
  inputProps: object | null;
7
+ envVariables?: Record<string, string> | undefined;
6
8
  remotionRoot: string;
9
+ previewServerCommand: string | null;
10
+ numberOfAudioTags: number;
11
+ publicFiles: StaticFile[];
12
+ includeFavicon: boolean;
13
+ title: string;
7
14
  }) => string;