@remotion/renderer 3.2.21 → 3.2.23-ensure-ffmpeg.123

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 (353) hide show
  1. package/LICENSE.md +8 -8
  2. package/dist/assets/calculate-asset-positions.d.ts +0 -0
  3. package/dist/assets/calculate-asset-positions.js +0 -0
  4. package/dist/assets/calculate-atempo.d.ts +0 -0
  5. package/dist/assets/calculate-atempo.js +0 -0
  6. package/dist/assets/convert-assets-to-file-urls.d.ts +0 -0
  7. package/dist/assets/convert-assets-to-file-urls.js +0 -0
  8. package/dist/assets/download-and-map-assets-to-file.d.ts +0 -0
  9. package/dist/assets/download-and-map-assets-to-file.js +7 -7
  10. package/dist/assets/download-file.d.ts +0 -0
  11. package/dist/assets/download-file.js +0 -0
  12. package/dist/assets/download-map.d.ts +0 -0
  13. package/dist/assets/download-map.js +0 -0
  14. package/dist/assets/ffmpeg-volume-expression.d.ts +0 -0
  15. package/dist/assets/ffmpeg-volume-expression.js +0 -0
  16. package/dist/assets/flatten-volume-array.d.ts +0 -0
  17. package/dist/assets/flatten-volume-array.js +0 -0
  18. package/dist/assets/get-audio-channels.d.ts +1 -1
  19. package/dist/assets/get-audio-channels.js +5 -4
  20. package/dist/assets/get-video-stream-duration.d.ts +1 -1
  21. package/dist/assets/get-video-stream-duration.js +5 -4
  22. package/dist/assets/read-file.d.ts +0 -0
  23. package/dist/assets/read-file.js +0 -0
  24. package/dist/assets/round-volume-to-avoid-stack-overflow.d.ts +0 -0
  25. package/dist/assets/round-volume-to-avoid-stack-overflow.js +0 -0
  26. package/dist/assets/sanitize-filename.d.ts +0 -0
  27. package/dist/assets/sanitize-filename.js +0 -0
  28. package/dist/assets/sanitize-filepath.d.ts +0 -0
  29. package/dist/assets/sanitize-filepath.js +0 -0
  30. package/dist/assets/truncate-utf8-bytes.d.ts +0 -0
  31. package/dist/assets/truncate-utf8-bytes.js +0 -0
  32. package/dist/assets/types.d.ts +0 -0
  33. package/dist/assets/types.js +0 -0
  34. package/dist/browser/Browser.d.ts +0 -0
  35. package/dist/browser/Browser.js +0 -0
  36. package/dist/browser/BrowserConnector.d.ts +0 -0
  37. package/dist/browser/BrowserConnector.js +0 -0
  38. package/dist/browser/BrowserFetcher.d.ts +1 -0
  39. package/dist/browser/BrowserFetcher.js +23 -20
  40. package/dist/browser/BrowserPage.d.ts +0 -0
  41. package/dist/browser/BrowserPage.js +0 -0
  42. package/dist/browser/BrowserRunner.d.ts +1 -4
  43. package/dist/browser/BrowserRunner.js +28 -71
  44. package/dist/browser/Connection.d.ts +0 -0
  45. package/dist/browser/Connection.js +0 -0
  46. package/dist/browser/ConsoleMessage.d.ts +0 -0
  47. package/dist/browser/ConsoleMessage.js +0 -0
  48. package/dist/browser/DOMWorld.d.ts +0 -0
  49. package/dist/browser/DOMWorld.js +0 -0
  50. package/dist/browser/Errors.d.ts +0 -0
  51. package/dist/browser/Errors.js +0 -0
  52. package/dist/browser/EvalTypes.d.ts +0 -0
  53. package/dist/browser/EvalTypes.js +0 -0
  54. package/dist/browser/EventEmitter.d.ts +0 -0
  55. package/dist/browser/EventEmitter.js +0 -0
  56. package/dist/browser/ExecutionContext.d.ts +0 -0
  57. package/dist/browser/ExecutionContext.js +0 -0
  58. package/dist/browser/FrameManager.d.ts +0 -0
  59. package/dist/browser/FrameManager.js +0 -0
  60. package/dist/browser/HTTPRequest.d.ts +0 -0
  61. package/dist/browser/HTTPRequest.js +0 -0
  62. package/dist/browser/HTTPResponse.d.ts +0 -0
  63. package/dist/browser/HTTPResponse.js +0 -0
  64. package/dist/browser/JSHandle.d.ts +0 -0
  65. package/dist/browser/JSHandle.js +0 -0
  66. package/dist/browser/LaunchOptions.d.ts +0 -4
  67. package/dist/browser/LaunchOptions.js +0 -0
  68. package/dist/browser/Launcher.d.ts +1 -1
  69. package/dist/browser/Launcher.js +5 -363
  70. package/dist/browser/LifecycleWatcher.d.ts +0 -0
  71. package/dist/browser/LifecycleWatcher.js +0 -0
  72. package/dist/browser/NetworkEventManager.d.ts +0 -0
  73. package/dist/browser/NetworkEventManager.js +0 -0
  74. package/dist/browser/NetworkManager.d.ts +0 -0
  75. package/dist/browser/NetworkManager.js +0 -0
  76. package/dist/browser/NodeWebSocketTransport.d.ts +0 -0
  77. package/dist/browser/NodeWebSocketTransport.js +0 -0
  78. package/dist/browser/Product.d.ts +0 -0
  79. package/dist/browser/Product.js +0 -0
  80. package/dist/browser/PuppeteerNode.d.ts +0 -0
  81. package/dist/browser/PuppeteerNode.js +1 -4
  82. package/dist/browser/PuppeteerViewport.d.ts +0 -0
  83. package/dist/browser/PuppeteerViewport.js +0 -0
  84. package/dist/browser/ScreenshotOptions.d.ts +0 -0
  85. package/dist/browser/ScreenshotOptions.js +0 -0
  86. package/dist/browser/Target.d.ts +0 -0
  87. package/dist/browser/Target.js +0 -0
  88. package/dist/browser/TaskQueue.d.ts +0 -0
  89. package/dist/browser/TaskQueue.js +0 -0
  90. package/dist/browser/TimeoutSettings.d.ts +0 -0
  91. package/dist/browser/TimeoutSettings.js +0 -0
  92. package/dist/browser/assert.d.ts +0 -0
  93. package/dist/browser/assert.js +0 -0
  94. package/dist/browser/create-browser-fetcher.d.ts +0 -0
  95. package/dist/browser/create-browser-fetcher.js +2 -44
  96. package/dist/browser/devtools-commands.d.ts +0 -0
  97. package/dist/browser/devtools-commands.js +0 -0
  98. package/dist/browser/devtools-types.d.ts +0 -0
  99. package/dist/browser/devtools-types.js +0 -0
  100. package/dist/browser/get-download-destination.d.ts +0 -0
  101. package/dist/browser/get-download-destination.js +0 -0
  102. package/dist/browser/mitt/index.d.ts +0 -0
  103. package/dist/browser/mitt/index.js +0 -0
  104. package/dist/browser/node.d.ts +0 -0
  105. package/dist/browser/node.js +0 -0
  106. package/dist/browser/revisions.d.ts +0 -1
  107. package/dist/browser/revisions.js +0 -1
  108. package/dist/browser/util.d.ts +0 -0
  109. package/dist/browser/util.js +0 -0
  110. package/dist/browser-executable.d.ts +0 -0
  111. package/dist/browser-executable.js +0 -0
  112. package/dist/browser-log.d.ts +0 -0
  113. package/dist/browser-log.js +0 -0
  114. package/dist/browser.d.ts +0 -0
  115. package/dist/browser.js +0 -0
  116. package/dist/calculate-ffmpeg-filters.d.ts +0 -0
  117. package/dist/calculate-ffmpeg-filters.js +0 -0
  118. package/dist/calculate-sar-dar-pixels.d.ts +0 -0
  119. package/dist/calculate-sar-dar-pixels.js +0 -0
  120. package/dist/can-use-parallel-encoding.d.ts +0 -0
  121. package/dist/can-use-parallel-encoding.js +0 -0
  122. package/dist/check-apple-silicon.d.ts +1 -0
  123. package/dist/check-apple-silicon.js +55 -0
  124. package/dist/chunk.d.ts +0 -0
  125. package/dist/chunk.js +0 -0
  126. package/dist/codec-supports-media.d.ts +0 -0
  127. package/dist/codec-supports-media.js +0 -0
  128. package/dist/codec.d.ts +0 -0
  129. package/dist/codec.js +0 -0
  130. package/dist/combine-videos.d.ts +7 -2
  131. package/dist/combine-videos.js +5 -4
  132. package/dist/compress-assets.d.ts +0 -0
  133. package/dist/compress-assets.js +0 -0
  134. package/dist/convert-number-of-gif-loops-to-ffmpeg.d.ts +0 -0
  135. package/dist/convert-number-of-gif-loops-to-ffmpeg.js +0 -0
  136. package/dist/convert-to-pcm.d.ts +2 -1
  137. package/dist/convert-to-pcm.js +3 -2
  138. package/dist/convert-to-positive-frame-index.d.ts +4 -0
  139. package/dist/convert-to-positive-frame-index.js +8 -0
  140. package/dist/create-ffmpeg-complex-filter.d.ts +0 -0
  141. package/dist/create-ffmpeg-complex-filter.js +0 -0
  142. package/dist/create-ffmpeg-merge-filter.d.ts +0 -0
  143. package/dist/create-ffmpeg-merge-filter.js +0 -0
  144. package/dist/create-silent-audio.d.ts +2 -1
  145. package/dist/create-silent-audio.js +3 -2
  146. package/dist/crf.d.ts +5 -1
  147. package/dist/crf.js +33 -6
  148. package/dist/cycle-browser-tabs.d.ts +0 -0
  149. package/dist/cycle-browser-tabs.js +0 -0
  150. package/dist/delay-render-embedded-stack.d.ts +0 -0
  151. package/dist/delay-render-embedded-stack.js +0 -0
  152. package/dist/delete-directory.d.ts +0 -0
  153. package/dist/delete-directory.js +0 -0
  154. package/dist/ensure-ffmpeg.d.ts +10 -0
  155. package/dist/ensure-ffmpeg.js +50 -0
  156. package/dist/ensure-frames-in-order.d.ts +0 -0
  157. package/dist/ensure-frames-in-order.js +0 -0
  158. package/dist/ensure-output-directory.d.ts +0 -0
  159. package/dist/ensure-output-directory.js +0 -0
  160. package/dist/ensure-presentation-timestamp.d.ts +8 -1
  161. package/dist/ensure-presentation-timestamp.js +14 -5
  162. package/dist/error-handling/handle-javascript-exception.d.ts +0 -0
  163. package/dist/error-handling/handle-javascript-exception.js +0 -0
  164. package/dist/error-handling/symbolicate-error.d.ts +0 -0
  165. package/dist/error-handling/symbolicate-error.js +0 -0
  166. package/dist/error-handling/symbolicateable-error.d.ts +0 -0
  167. package/dist/error-handling/symbolicateable-error.js +0 -0
  168. package/dist/extract-frame-from-video.d.ts +1 -1
  169. package/dist/extract-frame-from-video.js +22 -9
  170. package/dist/ffmpeg-executable.d.ts +0 -0
  171. package/dist/ffmpeg-executable.js +0 -0
  172. package/dist/ffmpeg-filter-file.d.ts +0 -0
  173. package/dist/ffmpeg-filter-file.js +0 -0
  174. package/dist/ffmpeg-flags.d.ts +20 -2
  175. package/dist/ffmpeg-flags.js +200 -9
  176. package/dist/ffmpeg-override.d.ts +4 -0
  177. package/dist/{ffmpeg-args-hook.js → ffmpeg-override.js} +0 -0
  178. package/dist/find-closest-package-json.d.ts +2 -0
  179. package/dist/find-closest-package-json.js +31 -0
  180. package/dist/frame-range.d.ts +0 -0
  181. package/dist/frame-range.js +0 -0
  182. package/dist/frame-to-ffmpeg-timestamp.d.ts +0 -0
  183. package/dist/frame-to-ffmpeg-timestamp.js +0 -0
  184. package/dist/get-audio-codec-name.d.ts +0 -0
  185. package/dist/get-audio-codec-name.js +0 -0
  186. package/dist/get-browser-instance.d.ts +0 -0
  187. package/dist/get-browser-instance.js +0 -0
  188. package/dist/get-codec-name.d.ts +0 -0
  189. package/dist/get-codec-name.js +0 -0
  190. package/dist/get-compositions.d.ts +0 -0
  191. package/dist/get-compositions.js +9 -4
  192. package/dist/get-concurrency.d.ts +0 -0
  193. package/dist/get-concurrency.js +0 -0
  194. package/dist/get-duration-from-frame-range.d.ts +0 -0
  195. package/dist/get-duration-from-frame-range.js +0 -0
  196. package/dist/get-extension-from-codec.d.ts +0 -0
  197. package/dist/get-extension-from-codec.js +4 -0
  198. package/dist/get-extension-of-filename.d.ts +0 -0
  199. package/dist/get-extension-of-filename.js +0 -0
  200. package/dist/get-frame-padded-index.d.ts +0 -0
  201. package/dist/get-frame-padded-index.js +0 -0
  202. package/dist/get-frame-to-render.d.ts +0 -0
  203. package/dist/get-frame-to-render.js +0 -0
  204. package/dist/get-local-browser-executable.d.ts +0 -0
  205. package/dist/get-local-browser-executable.js +1 -3
  206. package/dist/get-port.d.ts +0 -0
  207. package/dist/get-port.js +0 -0
  208. package/dist/get-prores-profile-name.d.ts +0 -0
  209. package/dist/get-prores-profile-name.js +0 -0
  210. package/dist/get-video-info.d.ts +1 -1
  211. package/dist/get-video-info.js +5 -4
  212. package/dist/get-video-threads-flag.d.ts +0 -0
  213. package/dist/get-video-threads-flag.js +0 -0
  214. package/dist/guess-extension-for-media.d.ts +5 -1
  215. package/dist/guess-extension-for-media.js +3 -2
  216. package/dist/image-format.d.ts +1 -1
  217. package/dist/image-format.js +3 -0
  218. package/dist/index.d.ts +21 -27
  219. package/dist/index.js +19 -24
  220. package/dist/is-audio-codec.d.ts +0 -0
  221. package/dist/is-audio-codec.js +0 -0
  222. package/dist/is-beyond-last-frame.d.ts +0 -0
  223. package/dist/is-beyond-last-frame.js +0 -0
  224. package/dist/is-serve-url.d.ts +0 -0
  225. package/dist/is-serve-url.js +0 -0
  226. package/dist/last-frame-from-video-cache.d.ts +1 -1
  227. package/dist/last-frame-from-video-cache.js +0 -0
  228. package/dist/legacy-webpack-config.d.ts +0 -0
  229. package/dist/legacy-webpack-config.js +0 -0
  230. package/dist/log-level.d.ts +0 -0
  231. package/dist/log-level.js +0 -0
  232. package/dist/make-cancel-signal.d.ts +0 -0
  233. package/dist/make-cancel-signal.js +0 -0
  234. package/dist/merge-audio-track.d.ts +1 -0
  235. package/dist/merge-audio-track.js +7 -2
  236. package/dist/mime-db.d.ts +0 -0
  237. package/dist/mime-db.js +0 -0
  238. package/dist/mime-types.d.ts +0 -0
  239. package/dist/mime-types.js +0 -0
  240. package/dist/normalize-serve-url.d.ts +0 -0
  241. package/dist/normalize-serve-url.js +0 -0
  242. package/dist/offthread-video-server.d.ts +2 -1
  243. package/dist/offthread-video-server.js +2 -1
  244. package/dist/open-browser.d.ts +0 -0
  245. package/dist/open-browser.js +1 -11
  246. package/dist/overwrite.d.ts +0 -0
  247. package/dist/overwrite.js +0 -0
  248. package/dist/p-limit.d.ts +0 -0
  249. package/dist/p-limit.js +0 -0
  250. package/dist/parse-browser-error-stack.d.ts +0 -0
  251. package/dist/parse-browser-error-stack.js +0 -0
  252. package/dist/parse-ffmpeg-progress.d.ts +0 -0
  253. package/dist/parse-ffmpeg-progress.js +0 -0
  254. package/dist/perf.d.ts +0 -0
  255. package/dist/perf.js +0 -0
  256. package/dist/pixel-format.d.ts +1 -1
  257. package/dist/pixel-format.js +3 -0
  258. package/dist/pool.d.ts +0 -0
  259. package/dist/pool.js +0 -0
  260. package/dist/prepare-server.d.ts +2 -1
  261. package/dist/prepare-server.js +3 -1
  262. package/dist/preprocess-audio-track.d.ts +1 -0
  263. package/dist/preprocess-audio-track.js +4 -3
  264. package/dist/prespawn-ffmpeg.d.ts +4 -1
  265. package/dist/prespawn-ffmpeg.js +17 -12
  266. package/dist/prestitcher-memory-usage.d.ts +0 -0
  267. package/dist/prestitcher-memory-usage.js +0 -0
  268. package/dist/prores-profile.d.ts +4 -1
  269. package/dist/prores-profile.js +6 -6
  270. package/dist/provide-screenshot.d.ts +0 -0
  271. package/dist/provide-screenshot.js +0 -0
  272. package/dist/puppeteer-evaluate.d.ts +0 -0
  273. package/dist/puppeteer-evaluate.js +0 -0
  274. package/dist/puppeteer-screenshot.d.ts +0 -0
  275. package/dist/puppeteer-screenshot.js +0 -0
  276. package/dist/quality.d.ts +0 -0
  277. package/dist/quality.js +0 -0
  278. package/dist/render-frames.d.ts +1 -1
  279. package/dist/render-frames.js +48 -10
  280. package/dist/render-media.d.ts +13 -1
  281. package/dist/render-media.js +67 -9
  282. package/dist/render-still.d.ts +1 -1
  283. package/dist/render-still.js +10 -3
  284. package/dist/replace-browser.d.ts +6 -0
  285. package/dist/replace-browser.js +46 -0
  286. package/dist/resolve-asset-src.d.ts +0 -0
  287. package/dist/resolve-asset-src.js +0 -0
  288. package/dist/sample-rate.d.ts +0 -0
  289. package/dist/sample-rate.js +0 -0
  290. package/dist/screenshot-dom-element.d.ts +0 -0
  291. package/dist/screenshot-dom-element.js +0 -0
  292. package/dist/screenshot-task.d.ts +0 -0
  293. package/dist/screenshot-task.js +0 -0
  294. package/dist/seek-to-frame.d.ts +0 -0
  295. package/dist/seek-to-frame.js +0 -0
  296. package/dist/serve-handler/index.d.ts +0 -0
  297. package/dist/serve-handler/index.js +0 -0
  298. package/dist/serve-handler/is-path-inside.d.ts +0 -0
  299. package/dist/serve-handler/is-path-inside.js +0 -0
  300. package/dist/serve-handler/range-parser.d.ts +0 -0
  301. package/dist/serve-handler/range-parser.js +0 -0
  302. package/dist/serve-static.d.ts +1 -0
  303. package/dist/serve-static.js +1 -0
  304. package/dist/set-props-and-env.d.ts +0 -0
  305. package/dist/set-props-and-env.js +1 -1
  306. package/dist/stitch-frames-to-video.d.ts +5 -1
  307. package/dist/stitch-frames-to-video.js +58 -32
  308. package/dist/stringify-ffmpeg-filter.d.ts +0 -0
  309. package/dist/stringify-ffmpeg-filter.js +0 -0
  310. package/dist/symbolicate-stacktrace.d.ts +0 -0
  311. package/dist/symbolicate-stacktrace.js +0 -0
  312. package/dist/tmp-dir.d.ts +0 -0
  313. package/dist/tmp-dir.js +0 -0
  314. package/dist/truthy.d.ts +0 -0
  315. package/dist/truthy.js +0 -0
  316. package/dist/types.d.ts +0 -0
  317. package/dist/types.js +0 -0
  318. package/dist/validate-concurrency.d.ts +0 -0
  319. package/dist/validate-concurrency.js +0 -0
  320. package/dist/validate-even-dimensions-with-codec.d.ts +0 -0
  321. package/dist/validate-even-dimensions-with-codec.js +0 -0
  322. package/dist/validate-every-nth-frame.d.ts +2 -1
  323. package/dist/validate-every-nth-frame.js +8 -1
  324. package/dist/validate-ffmpeg-override.d.ts +2 -0
  325. package/dist/{validate-ffmpeg-args-hook.js → validate-ffmpeg-override.js} +6 -3
  326. package/dist/validate-ffmpeg.d.ts +7 -2
  327. package/dist/validate-ffmpeg.js +48 -43
  328. package/dist/validate-frame.d.ts +0 -0
  329. package/dist/validate-frame.js +3 -3
  330. package/dist/validate-number-of-gif-loops.d.ts +2 -0
  331. package/dist/validate-number-of-gif-loops.js +24 -0
  332. package/dist/validate-opengl-renderer.d.ts +0 -0
  333. package/dist/validate-opengl-renderer.js +0 -0
  334. package/dist/validate-output-filename.d.ts +0 -0
  335. package/dist/validate-output-filename.js +0 -0
  336. package/dist/validate-puppeteer-timeout.d.ts +0 -0
  337. package/dist/validate-puppeteer-timeout.js +1 -1
  338. package/dist/validate-scale.d.ts +0 -0
  339. package/dist/validate-scale.js +0 -0
  340. package/dist/validate-videobitrate.d.ts +1 -0
  341. package/dist/validate-videobitrate.js +20 -0
  342. package/dist/wait-for-symbolication-error-to-be-done.d.ts +0 -0
  343. package/dist/wait-for-symbolication-error-to-be-done.js +0 -0
  344. package/dist/warn-about-ffmpeg-version.d.ts +5 -0
  345. package/dist/warn-about-ffmpeg-version.js +37 -0
  346. package/dist/ws/ws-types.d.ts +0 -0
  347. package/dist/ws/ws-types.js +0 -0
  348. package/package.json +7 -7
  349. package/dist/ffmpeg-args-hook.d.ts +0 -1
  350. package/dist/make-assets-download-dir.d.ts +0 -1
  351. package/dist/make-assets-download-dir.js +0 -13
  352. package/dist/validate-ffmpeg-args-hook.d.ts +0 -2
  353. package/vitest.config.ts +0 -8
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 © 2022 [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
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -141,13 +141,6 @@ const downloadAsset = async ({ src, onDownload, downloadMap, }) => {
141
141
  downloadMap.isDownloadingMap[src][downloadDir] = true;
142
142
  const onProgress = onDownload(src);
143
143
  if (src.startsWith('data:')) {
144
- const output = (0, exports.getSanitizedFilenameForAssetUrl)({
145
- contentDisposition: null,
146
- downloadDir,
147
- src,
148
- contentType: null,
149
- });
150
- (0, ensure_output_directory_1.ensureOutputDirectory)(output);
151
144
  const [assetDetails, assetData] = src.substring('data:'.length).split(',');
152
145
  if (!assetDetails.includes(';')) {
153
146
  const errMessage = [
@@ -161,6 +154,13 @@ const downloadAsset = async ({ src, onDownload, downloadMap, }) => {
161
154
  const [mimeType, encoding] = assetDetails.split(';');
162
155
  validateMimeType(mimeType, src);
163
156
  validateBufferEncoding(encoding, src);
157
+ const output = (0, exports.getSanitizedFilenameForAssetUrl)({
158
+ contentDisposition: null,
159
+ downloadDir,
160
+ src,
161
+ contentType: mimeType,
162
+ });
163
+ (0, ensure_output_directory_1.ensureOutputDirectory)(output);
164
164
  const buff = Buffer.from(assetData, encoding);
165
165
  await fs_1.default.promises.writeFile(output, buff);
166
166
  notifyAssetIsDownloaded({ src, downloadMap, downloadDir, to: output });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  import type { FfmpegExecutable } from '../ffmpeg-executable';
2
2
  import type { AudioChannelsAndDurationResultCache, DownloadMap } from './download-map';
3
- export declare const getAudioChannelsAndDuration: (downloadMap: DownloadMap, src: string, ffprobeExecutable: FfmpegExecutable) => Promise<AudioChannelsAndDurationResultCache>;
3
+ export declare const getAudioChannelsAndDuration: (downloadMap: DownloadMap, src: string, ffprobeExecutable: FfmpegExecutable, remotionRoot: string) => Promise<AudioChannelsAndDurationResultCache>;
@@ -5,9 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getAudioChannelsAndDuration = void 0;
7
7
  const execa_1 = __importDefault(require("execa"));
8
+ const ffmpeg_flags_1 = require("../ffmpeg-flags");
8
9
  const p_limit_1 = require("../p-limit");
9
10
  const limit = (0, p_limit_1.pLimit)(1);
10
- async function getAudioChannelsAndDurationUnlimited(downloadMap, src, ffprobeExecutable) {
11
+ async function getAudioChannelsAndDurationUnlimited(downloadMap, src, ffprobeExecutable, remotionRoot) {
11
12
  if (downloadMap.durationOfAssetCache[src]) {
12
13
  return downloadMap.durationOfAssetCache[src];
13
14
  }
@@ -19,7 +20,7 @@ async function getAudioChannelsAndDurationUnlimited(downloadMap, src, ffprobeExe
19
20
  ]
20
21
  .reduce((acc, val) => acc.concat(val), [])
21
22
  .filter(Boolean);
22
- const task = await (0, execa_1.default)(ffprobeExecutable !== null && ffprobeExecutable !== void 0 ? ffprobeExecutable : 'ffprobe', args);
23
+ const task = await (0, execa_1.default)(await (0, ffmpeg_flags_1.getExecutableBinary)(ffprobeExecutable, remotionRoot, 'ffprobe'), args);
23
24
  const channels = task.stdout.match(/channels=([0-9]+)/);
24
25
  const duration = task.stdout.match(/duration=([0-9.]+)/);
25
26
  const result = {
@@ -29,7 +30,7 @@ async function getAudioChannelsAndDurationUnlimited(downloadMap, src, ffprobeExe
29
30
  downloadMap.durationOfAssetCache[src] = result;
30
31
  return result;
31
32
  }
32
- const getAudioChannelsAndDuration = (downloadMap, src, ffprobeExecutable) => {
33
- return limit(() => getAudioChannelsAndDurationUnlimited(downloadMap, src, ffprobeExecutable));
33
+ const getAudioChannelsAndDuration = (downloadMap, src, ffprobeExecutable, remotionRoot) => {
34
+ return limit(() => getAudioChannelsAndDurationUnlimited(downloadMap, src, ffprobeExecutable, remotionRoot));
34
35
  };
35
36
  exports.getAudioChannelsAndDuration = getAudioChannelsAndDuration;
@@ -1,4 +1,4 @@
1
1
  import type { FfmpegExecutable } from '../ffmpeg-executable';
2
2
  import type { DownloadMap, VideoDurationResult } from './download-map';
3
3
  export declare const parseVideoStreamDuration: (stdout: string) => VideoDurationResult;
4
- export declare const getVideoStreamDuration: (downloadMap: DownloadMap, src: string, ffprobeExecutable: FfmpegExecutable) => Promise<VideoDurationResult>;
4
+ export declare const getVideoStreamDuration: (downloadMap: DownloadMap, src: string, ffprobeExecutable: FfmpegExecutable, remotionRoot: string) => Promise<VideoDurationResult>;
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getVideoStreamDuration = exports.parseVideoStreamDuration = void 0;
7
7
  const execa_1 = __importDefault(require("execa"));
8
+ const ffmpeg_flags_1 = require("../ffmpeg-flags");
8
9
  const p_limit_1 = require("../p-limit");
9
10
  const limit = (0, p_limit_1.pLimit)(1);
10
11
  const parseAlternativeDuration = (stdout) => {
@@ -38,7 +39,7 @@ const parseVideoStreamDuration = (stdout) => {
38
39
  return result;
39
40
  };
40
41
  exports.parseVideoStreamDuration = parseVideoStreamDuration;
41
- async function getVideoStreamDurationUnlimited(downloadMap, src, ffprobeExecutable) {
42
+ async function getVideoStreamDurationUnlimited(downloadMap, src, ffprobeExecutable, remotionRoot) {
42
43
  if (downloadMap.videoDurationResultCache[src]) {
43
44
  return downloadMap.videoDurationResultCache[src];
44
45
  }
@@ -50,10 +51,10 @@ async function getVideoStreamDurationUnlimited(downloadMap, src, ffprobeExecutab
50
51
  ]
51
52
  .reduce((acc, val) => acc.concat(val), [])
52
53
  .filter(Boolean);
53
- const task = await (0, execa_1.default)(ffprobeExecutable !== null && ffprobeExecutable !== void 0 ? ffprobeExecutable : 'ffprobe', args);
54
+ const task = await (0, execa_1.default)(await (0, ffmpeg_flags_1.getExecutableBinary)(ffprobeExecutable, remotionRoot, 'ffprobe'), args);
54
55
  return (0, exports.parseVideoStreamDuration)(task.stdout);
55
56
  }
56
- const getVideoStreamDuration = (downloadMap, src, ffprobeExecutable) => {
57
- return limit(() => getVideoStreamDurationUnlimited(downloadMap, src, ffprobeExecutable));
57
+ const getVideoStreamDuration = (downloadMap, src, ffprobeExecutable, remotionRoot) => {
58
+ return limit(() => getVideoStreamDurationUnlimited(downloadMap, src, ffprobeExecutable, remotionRoot));
58
59
  };
59
60
  exports.getVideoStreamDuration = getVideoStreamDuration;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -86,4 +86,5 @@ export declare class BrowserFetcher {
86
86
  */
87
87
  revisionInfo(revision: string): BrowserFetcherRevisionInfo;
88
88
  }
89
+ export declare function _downloadFile(url: string, destinationPath: string, progressCallback: (x: number, y: number) => void): Promise<number>;
89
90
  export {};
@@ -53,17 +53,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
53
53
  };
54
54
  var _BrowserFetcher_instances, _BrowserFetcher_product, _BrowserFetcher_downloadsFolder, _BrowserFetcher_downloadHost, _BrowserFetcher_platform, _BrowserFetcher_getFolderPath;
55
55
  Object.defineProperty(exports, "__esModule", { value: true });
56
- exports.BrowserFetcher = void 0;
56
+ exports._downloadFile = exports.BrowserFetcher = void 0;
57
57
  const childProcess = __importStar(require("child_process"));
58
58
  const fs = __importStar(require("fs"));
59
59
  const http = __importStar(require("http"));
60
60
  const https = __importStar(require("https"));
61
61
  const os = __importStar(require("os"));
62
62
  const path = __importStar(require("path"));
63
- const util = __importStar(require("util"));
63
+ const util_1 = __importDefault(require("util"));
64
64
  const extract_zip_1 = __importDefault(require("extract-zip"));
65
65
  const URL = __importStar(require("url"));
66
- const util_1 = require("util");
66
+ const util_2 = require("util");
67
67
  const assert_1 = require("./assert");
68
68
  const delete_directory_1 = require("../delete-directory");
69
69
  const get_download_destination_1 = require("./get-download-destination");
@@ -106,7 +106,7 @@ function archiveName(product, platform, revision) {
106
106
  case 'win64':
107
107
  // Windows archive name changed at r591479.
108
108
  return parseInt(revision, 10) > 591479
109
- ? 'chrome-win'
109
+ ? 'Thorium_107.0.5271.0\\BIN'
110
110
  : 'chrome-win32';
111
111
  default:
112
112
  throw new Error('unknown browser');
@@ -118,8 +118,10 @@ function archiveName(product, platform, revision) {
118
118
  }
119
119
  }
120
120
  function _downloadURL(product, platform, host, revision) {
121
- const url = util.format(downloadURLs[product][platform], host, revision, archiveName(product, platform, revision));
122
- return url;
121
+ if (platform === 'win64' || platform === 'win32') {
122
+ return 'https://remotionchromium-binaries.s3.eu-central-1.amazonaws.com/thorium-107.zip';
123
+ }
124
+ return util_1.default.format(downloadURLs[product][platform], host, revision, archiveName(product, platform, revision));
123
125
  }
124
126
  function handleArm64() {
125
127
  let exists = fs.existsSync('/usr/bin/chromium-browser');
@@ -136,10 +138,10 @@ function handleArm64() {
136
138
  '\n\n sudo apt install chromium-browser\n');
137
139
  throw new Error();
138
140
  }
139
- const readdirAsync = (0, util_1.promisify)(fs.readdir.bind(fs));
140
- const mkdirAsync = (0, util_1.promisify)(fs.mkdir.bind(fs));
141
- const unlinkAsync = (0, util_1.promisify)(fs.unlink.bind(fs));
142
- const chmodAsync = (0, util_1.promisify)(fs.chmod.bind(fs));
141
+ const readdirAsync = (0, util_2.promisify)(fs.readdir.bind(fs));
142
+ const mkdirAsync = (0, util_2.promisify)(fs.mkdir.bind(fs));
143
+ const unlinkAsync = (0, util_2.promisify)(fs.unlink.bind(fs));
144
+ const chmodAsync = (0, util_2.promisify)(fs.chmod.bind(fs));
143
145
  function existsAsync(filePath) {
144
146
  return new Promise((resolve) => {
145
147
  fs.access(filePath, (err) => {
@@ -325,7 +327,7 @@ class BrowserFetcher {
325
327
  executablePath = path.join(folderPath, archiveName(__classPrivateFieldGet(this, _BrowserFetcher_product, "f"), __classPrivateFieldGet(this, _BrowserFetcher_platform, "f"), revision), 'chrome');
326
328
  }
327
329
  else if (__classPrivateFieldGet(this, _BrowserFetcher_platform, "f") === 'win32' || __classPrivateFieldGet(this, _BrowserFetcher_platform, "f") === 'win64') {
328
- executablePath = path.join(folderPath, archiveName(__classPrivateFieldGet(this, _BrowserFetcher_product, "f"), __classPrivateFieldGet(this, _BrowserFetcher_platform, "f"), revision), 'chrome.exe');
330
+ executablePath = path.join(folderPath, archiveName(__classPrivateFieldGet(this, _BrowserFetcher_product, "f"), __classPrivateFieldGet(this, _BrowserFetcher_platform, "f"), revision), 'thorium.exe');
329
331
  }
330
332
  else {
331
333
  throw new Error('Unsupported platform: ' + __classPrivateFieldGet(this, _BrowserFetcher_platform, "f"));
@@ -386,6 +388,13 @@ function _downloadFile(url, destinationPath, progressCallback) {
386
388
  let downloadedBytes = 0;
387
389
  let totalBytes = 0;
388
390
  let lastProgress = Date.now();
391
+ function onData(chunk) {
392
+ downloadedBytes += chunk.length;
393
+ if (Date.now() - lastProgress > 1000) {
394
+ progressCallback(downloadedBytes, totalBytes);
395
+ lastProgress = Date.now();
396
+ }
397
+ }
389
398
  const request = httpRequest(url, 'GET', (response) => {
390
399
  if (response.statusCode !== 200) {
391
400
  const error = new Error(`Download failed: server returned code ${response.statusCode}. URL: ${url}`);
@@ -395,8 +404,8 @@ function _downloadFile(url, destinationPath, progressCallback) {
395
404
  return;
396
405
  }
397
406
  const file = fs.createWriteStream(destinationPath);
398
- file.on('finish', () => {
399
- return fulfill();
407
+ file.on('close', () => {
408
+ return fulfill(totalBytes);
400
409
  });
401
410
  file.on('error', (error) => {
402
411
  return reject(error);
@@ -409,14 +418,8 @@ function _downloadFile(url, destinationPath, progressCallback) {
409
418
  return reject(error);
410
419
  });
411
420
  return promise;
412
- function onData(chunk) {
413
- downloadedBytes += chunk.length;
414
- if (Date.now() - lastProgress > 1000) {
415
- progressCallback(downloadedBytes, totalBytes);
416
- lastProgress = Date.now();
417
- }
418
- }
419
421
  }
422
+ exports._downloadFile = _downloadFile;
420
423
  function install(archivePath, folderPath) {
421
424
  if (archivePath.endsWith('.zip')) {
422
425
  return (0, extract_zip_1.default)(archivePath, { dir: folderPath });
File without changes
File without changes
@@ -17,17 +17,14 @@
17
17
  import * as childProcess from 'child_process';
18
18
  import { Connection } from './Connection';
19
19
  import type { LaunchOptions } from './LaunchOptions';
20
- import type { Product } from './Product';
21
20
  export declare class BrowserRunner {
22
21
  #private;
23
22
  proc?: childProcess.ChildProcess;
24
23
  connection?: Connection;
25
- constructor({ product, executablePath, processArguments, userDataDir, isTempUserDataDir, }: {
26
- product: Product;
24
+ constructor({ executablePath, processArguments, userDataDir, }: {
27
25
  executablePath: string;
28
26
  processArguments: string[];
29
27
  userDataDir: string;
30
- isTempUserDataDir?: boolean;
31
28
  });
32
29
  start(options: LaunchOptions): void;
33
30
  close(): Promise<void>;
@@ -48,45 +48,37 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
48
48
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
49
49
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
50
50
  };
51
- var _BrowserRunner_product, _BrowserRunner_executablePath, _BrowserRunner_processArguments, _BrowserRunner_userDataDir, _BrowserRunner_isTempUserDataDir, _BrowserRunner_closed, _BrowserRunner_listeners, _BrowserRunner_processClosing;
51
+ var _BrowserRunner_executablePath, _BrowserRunner_processArguments, _BrowserRunner_userDataDir, _BrowserRunner_closed, _BrowserRunner_listeners, _BrowserRunner_processClosing;
52
52
  Object.defineProperty(exports, "__esModule", { value: true });
53
53
  exports.BrowserRunner = void 0;
54
54
  const childProcess = __importStar(require("child_process"));
55
55
  const fs = __importStar(require("fs"));
56
- const path = __importStar(require("path"));
57
56
  const readline = __importStar(require("readline"));
58
- const util_1 = require("util");
59
57
  const delete_directory_1 = require("../delete-directory");
60
58
  const assert_1 = require("./assert");
61
59
  const Connection_1 = require("./Connection");
62
60
  const Errors_1 = require("./Errors");
63
61
  const NodeWebSocketTransport_1 = require("./NodeWebSocketTransport");
64
- const util_2 = require("./util");
65
- const renameAsync = (0, util_1.promisify)(fs.rename);
66
- const unlinkAsync = (0, util_1.promisify)(fs.unlink);
62
+ const util_1 = require("./util");
67
63
  const PROCESS_ERROR_EXPLANATION = `Puppeteer was unable to kill the process which ran the browser binary.
68
64
  This means that, on future Puppeteer launches, Puppeteer might not be able to launch the browser.
69
65
  Please check your open processes and ensure that the browser processes that Puppeteer launched have been killed.
70
66
  If you think this is a bug, please report it on the Puppeteer issue tracker.`;
71
67
  class BrowserRunner {
72
- constructor({ product, executablePath, processArguments, userDataDir, isTempUserDataDir, }) {
73
- _BrowserRunner_product.set(this, void 0);
68
+ constructor({ executablePath, processArguments, userDataDir, }) {
74
69
  _BrowserRunner_executablePath.set(this, void 0);
75
70
  _BrowserRunner_processArguments.set(this, void 0);
76
71
  _BrowserRunner_userDataDir.set(this, void 0);
77
- _BrowserRunner_isTempUserDataDir.set(this, void 0);
78
72
  _BrowserRunner_closed.set(this, true);
79
73
  _BrowserRunner_listeners.set(this, []);
80
74
  _BrowserRunner_processClosing.set(this, void 0);
81
- __classPrivateFieldSet(this, _BrowserRunner_product, product, "f");
82
75
  __classPrivateFieldSet(this, _BrowserRunner_executablePath, executablePath, "f");
83
76
  __classPrivateFieldSet(this, _BrowserRunner_processArguments, processArguments, "f");
84
77
  __classPrivateFieldSet(this, _BrowserRunner_userDataDir, userDataDir, "f");
85
- __classPrivateFieldSet(this, _BrowserRunner_isTempUserDataDir, isTempUserDataDir, "f");
86
78
  }
87
79
  start(options) {
88
80
  var _a, _b;
89
- const { handleSIGINT, handleSIGTERM, handleSIGHUP, dumpio, env, pipe } = options;
81
+ const { dumpio, env, pipe } = options;
90
82
  let stdio;
91
83
  if (pipe) {
92
84
  if (dumpio) {
@@ -121,66 +113,33 @@ class BrowserRunner {
121
113
  this.proc.once('exit', async () => {
122
114
  __classPrivateFieldSet(this, _BrowserRunner_closed, true, "f");
123
115
  // Cleanup as processes exit.
124
- if (__classPrivateFieldGet(this, _BrowserRunner_isTempUserDataDir, "f")) {
125
- try {
116
+ try {
117
+ if (fs.existsSync(__classPrivateFieldGet(this, _BrowserRunner_userDataDir, "f"))) {
126
118
  await (0, delete_directory_1.deleteDirectory)(__classPrivateFieldGet(this, _BrowserRunner_userDataDir, "f"));
127
- fulfill();
128
- }
129
- catch (error) {
130
- reject(error);
131
- }
132
- }
133
- else {
134
- if (__classPrivateFieldGet(this, _BrowserRunner_product, "f") === 'firefox') {
135
- try {
136
- // When an existing user profile has been used remove the user
137
- // preferences file and restore possibly backuped preferences.
138
- await unlinkAsync(path.join(__classPrivateFieldGet(this, _BrowserRunner_userDataDir, "f"), 'user.js'));
139
- const prefsBackupPath = path.join(__classPrivateFieldGet(this, _BrowserRunner_userDataDir, "f"), 'prefs.js.puppeteer');
140
- if (fs.existsSync(prefsBackupPath)) {
141
- const prefsPath = path.join(__classPrivateFieldGet(this, _BrowserRunner_userDataDir, "f"), 'prefs.js');
142
- await unlinkAsync(prefsPath);
143
- await renameAsync(prefsBackupPath, prefsPath);
144
- }
145
- }
146
- catch (error) {
147
- reject(error);
148
- }
149
119
  }
150
120
  fulfill();
151
121
  }
122
+ catch (error) {
123
+ reject(error);
124
+ }
152
125
  });
153
126
  }), "f");
154
- __classPrivateFieldSet(this, _BrowserRunner_listeners, [(0, util_2.addEventListener)(process, 'exit', this.kill.bind(this))], "f");
155
- if (handleSIGINT) {
156
- __classPrivateFieldGet(this, _BrowserRunner_listeners, "f").push((0, util_2.addEventListener)(process, 'SIGINT', () => {
157
- this.kill();
158
- process.exit(130);
159
- }));
160
- }
161
- if (handleSIGTERM) {
162
- __classPrivateFieldGet(this, _BrowserRunner_listeners, "f").push((0, util_2.addEventListener)(process, 'SIGTERM', this.close.bind(this)));
163
- }
164
- if (handleSIGHUP) {
165
- __classPrivateFieldGet(this, _BrowserRunner_listeners, "f").push((0, util_2.addEventListener)(process, 'SIGHUP', this.close.bind(this)));
166
- }
127
+ __classPrivateFieldSet(this, _BrowserRunner_listeners, [(0, util_1.addEventListener)(process, 'exit', this.kill.bind(this))], "f");
128
+ __classPrivateFieldGet(this, _BrowserRunner_listeners, "f").push((0, util_1.addEventListener)(process, 'SIGINT', () => {
129
+ this.kill();
130
+ process.exit(130);
131
+ }));
132
+ __classPrivateFieldGet(this, _BrowserRunner_listeners, "f").push((0, util_1.addEventListener)(process, 'SIGTERM', this.close.bind(this)));
133
+ __classPrivateFieldGet(this, _BrowserRunner_listeners, "f").push((0, util_1.addEventListener)(process, 'SIGHUP', this.close.bind(this)));
167
134
  }
168
135
  close() {
169
136
  if (__classPrivateFieldGet(this, _BrowserRunner_closed, "f")) {
170
137
  return Promise.resolve();
171
138
  }
172
- if (__classPrivateFieldGet(this, _BrowserRunner_isTempUserDataDir, "f")) {
173
- this.kill();
174
- }
175
- else if (this.connection) {
176
- // Attempt to close the browser gracefully
177
- this.connection.send('Browser.close').catch(() => {
178
- this.kill();
179
- });
180
- }
139
+ this.kill();
181
140
  // Cleanup this listener last, as that makes sure the full callback runs. If we
182
141
  // perform this earlier, then the previous function calls would not happen.
183
- (0, util_2.removeEventListeners)(__classPrivateFieldGet(this, _BrowserRunner_listeners, "f"));
142
+ (0, util_1.removeEventListeners)(__classPrivateFieldGet(this, _BrowserRunner_listeners, "f"));
184
143
  return __classPrivateFieldGet(this, _BrowserRunner_processClosing, "f");
185
144
  }
186
145
  kill() {
@@ -217,19 +176,17 @@ class BrowserRunner {
217
176
  }
218
177
  }
219
178
  catch (error) {
220
- throw new Error(`${PROCESS_ERROR_EXPLANATION}\nError cause: ${(0, util_2.isErrorLike)(error) ? error.stack : error}`);
179
+ throw new Error(`${PROCESS_ERROR_EXPLANATION}\nError cause: ${(0, util_1.isErrorLike)(error) ? error.stack : error}`);
221
180
  }
222
181
  }
223
182
  // Attempt to remove temporary profile directory to avoid littering.
224
183
  try {
225
- if (__classPrivateFieldGet(this, _BrowserRunner_isTempUserDataDir, "f")) {
226
- fs.rmSync(__classPrivateFieldGet(this, _BrowserRunner_userDataDir, "f"), { recursive: true, force: true });
227
- }
184
+ fs.rmSync(__classPrivateFieldGet(this, _BrowserRunner_userDataDir, "f"), { recursive: true, force: true });
228
185
  }
229
186
  catch (error) { }
230
187
  // Cleanup this listener last, as that makes sure the full callback runs. If we
231
188
  // perform this earlier, then the previous function calls would not happen.
232
- (0, util_2.removeEventListeners)(__classPrivateFieldGet(this, _BrowserRunner_listeners, "f"));
189
+ (0, util_1.removeEventListeners)(__classPrivateFieldGet(this, _BrowserRunner_listeners, "f"));
233
190
  }
234
191
  async setupConnection(options) {
235
192
  (0, assert_1.assert)(this.proc, 'BrowserRunner not started.');
@@ -241,21 +198,21 @@ class BrowserRunner {
241
198
  }
242
199
  }
243
200
  exports.BrowserRunner = BrowserRunner;
244
- _BrowserRunner_product = new WeakMap(), _BrowserRunner_executablePath = new WeakMap(), _BrowserRunner_processArguments = new WeakMap(), _BrowserRunner_userDataDir = new WeakMap(), _BrowserRunner_isTempUserDataDir = new WeakMap(), _BrowserRunner_closed = new WeakMap(), _BrowserRunner_listeners = new WeakMap(), _BrowserRunner_processClosing = new WeakMap();
201
+ _BrowserRunner_executablePath = new WeakMap(), _BrowserRunner_processArguments = new WeakMap(), _BrowserRunner_userDataDir = new WeakMap(), _BrowserRunner_closed = new WeakMap(), _BrowserRunner_listeners = new WeakMap(), _BrowserRunner_processClosing = new WeakMap();
245
202
  function waitForWSEndpoint(browserProcess, timeout, preferredRevision) {
246
203
  (0, assert_1.assert)(browserProcess.stderr, '`browserProcess` does not have stderr.');
247
204
  const rl = readline.createInterface(browserProcess.stderr);
248
205
  let stderr = '';
249
206
  return new Promise((resolve, reject) => {
250
207
  const listeners = [
251
- (0, util_2.addEventListener)(rl, 'line', onLine),
252
- (0, util_2.addEventListener)(rl, 'close', () => {
208
+ (0, util_1.addEventListener)(rl, 'line', onLine),
209
+ (0, util_1.addEventListener)(rl, 'close', () => {
253
210
  return onClose();
254
211
  }),
255
- (0, util_2.addEventListener)(browserProcess, 'exit', () => {
212
+ (0, util_1.addEventListener)(browserProcess, 'exit', () => {
256
213
  return onClose();
257
214
  }),
258
- (0, util_2.addEventListener)(browserProcess, 'error', (error) => {
215
+ (0, util_1.addEventListener)(browserProcess, 'error', (error) => {
259
216
  return onClose(error);
260
217
  }),
261
218
  ];
@@ -289,7 +246,7 @@ function waitForWSEndpoint(browserProcess, timeout, preferredRevision) {
289
246
  if (timeoutId) {
290
247
  clearTimeout(timeoutId);
291
248
  }
292
- (0, util_2.removeEventListeners)(listeners);
249
+ (0, util_1.removeEventListeners)(listeners);
293
250
  }
294
251
  });
295
252
  }
@@ -298,7 +255,7 @@ function pidExists(pid) {
298
255
  return process.kill(pid, 0);
299
256
  }
300
257
  catch (error) {
301
- if ((0, util_2.isErrnoException)(error)) {
258
+ if ((0, util_1.isErrnoException)(error)) {
302
259
  if (error.code && error.code === 'ESRCH') {
303
260
  return false;
304
261
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes