@remotion/renderer 4.0.0-prefetch.10 → 4.0.0-prefetch.12
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.
- package/LICENSE.md +7 -7
- package/dist/assets/calculate-asset-positions.d.ts +0 -0
- package/dist/assets/calculate-asset-positions.js +0 -0
- package/dist/assets/calculate-atempo.d.ts +0 -0
- package/dist/assets/calculate-atempo.js +0 -0
- package/dist/assets/convert-assets-to-file-urls.d.ts +0 -0
- package/dist/assets/convert-assets-to-file-urls.js +0 -0
- package/dist/assets/download-and-map-assets-to-file.d.ts +0 -0
- package/dist/assets/download-and-map-assets-to-file.js +0 -0
- package/dist/assets/download-file.d.ts +0 -0
- package/dist/assets/download-file.js +0 -0
- package/dist/assets/download-map.d.ts +0 -0
- package/dist/assets/download-map.js +0 -0
- package/dist/assets/ffmpeg-volume-expression.d.ts +0 -0
- package/dist/assets/ffmpeg-volume-expression.js +0 -0
- package/dist/assets/flatten-volume-array.d.ts +0 -0
- package/dist/assets/flatten-volume-array.js +0 -0
- package/dist/assets/get-audio-channels.d.ts +0 -0
- package/dist/assets/get-audio-channels.js +0 -0
- package/dist/assets/get-video-stream-duration.d.ts +0 -0
- package/dist/assets/get-video-stream-duration.js +0 -0
- package/dist/assets/read-file.d.ts +0 -0
- package/dist/assets/read-file.js +0 -0
- package/dist/assets/round-volume-to-avoid-stack-overflow.d.ts +0 -0
- package/dist/assets/round-volume-to-avoid-stack-overflow.js +0 -0
- package/dist/assets/sanitize-filename.d.ts +0 -0
- package/dist/assets/sanitize-filename.js +0 -0
- package/dist/assets/sanitize-filepath.d.ts +0 -0
- package/dist/assets/sanitize-filepath.js +0 -0
- package/dist/assets/truncate-utf8-bytes.d.ts +0 -0
- package/dist/assets/truncate-utf8-bytes.js +0 -0
- package/dist/assets/types.d.ts +0 -0
- package/dist/assets/types.js +0 -0
- package/dist/browser/Browser.d.ts +0 -0
- package/dist/browser/Browser.js +0 -0
- package/dist/browser/BrowserConnector.d.ts +0 -0
- package/dist/browser/BrowserConnector.js +0 -0
- package/dist/browser/BrowserFetcher.d.ts +0 -0
- package/dist/browser/BrowserFetcher.js +12 -10
- package/dist/browser/BrowserPage.d.ts +0 -0
- package/dist/browser/BrowserPage.js +0 -0
- package/dist/browser/BrowserRunner.d.ts +1 -4
- package/dist/browser/BrowserRunner.js +28 -71
- package/dist/browser/Connection.d.ts +0 -0
- package/dist/browser/Connection.js +0 -0
- package/dist/browser/ConsoleMessage.d.ts +0 -0
- package/dist/browser/ConsoleMessage.js +0 -0
- package/dist/browser/DOMWorld.d.ts +0 -0
- package/dist/browser/DOMWorld.js +0 -0
- package/dist/browser/Errors.d.ts +0 -0
- package/dist/browser/Errors.js +0 -0
- package/dist/browser/EvalTypes.d.ts +0 -0
- package/dist/browser/EvalTypes.js +0 -0
- package/dist/browser/EventEmitter.d.ts +0 -0
- package/dist/browser/EventEmitter.js +0 -0
- package/dist/browser/ExecutionContext.d.ts +0 -0
- package/dist/browser/ExecutionContext.js +0 -0
- package/dist/browser/FrameManager.d.ts +0 -0
- package/dist/browser/FrameManager.js +0 -0
- package/dist/browser/HTTPRequest.d.ts +0 -0
- package/dist/browser/HTTPRequest.js +0 -0
- package/dist/browser/HTTPResponse.d.ts +0 -0
- package/dist/browser/HTTPResponse.js +0 -0
- package/dist/browser/JSHandle.d.ts +0 -0
- package/dist/browser/JSHandle.js +0 -0
- package/dist/browser/LaunchOptions.d.ts +0 -4
- package/dist/browser/LaunchOptions.js +0 -0
- package/dist/browser/Launcher.d.ts +1 -1
- package/dist/browser/Launcher.js +5 -363
- package/dist/browser/LifecycleWatcher.d.ts +0 -0
- package/dist/browser/LifecycleWatcher.js +0 -0
- package/dist/browser/NetworkEventManager.d.ts +0 -0
- package/dist/browser/NetworkEventManager.js +0 -0
- package/dist/browser/NetworkManager.d.ts +0 -0
- package/dist/browser/NetworkManager.js +0 -0
- package/dist/browser/NodeWebSocketTransport.d.ts +0 -0
- package/dist/browser/NodeWebSocketTransport.js +0 -0
- package/dist/browser/Product.d.ts +0 -0
- package/dist/browser/Product.js +0 -0
- package/dist/browser/PuppeteerNode.d.ts +0 -0
- package/dist/browser/PuppeteerNode.js +1 -4
- package/dist/browser/PuppeteerViewport.d.ts +0 -0
- package/dist/browser/PuppeteerViewport.js +0 -0
- package/dist/browser/ScreenshotOptions.d.ts +0 -0
- package/dist/browser/ScreenshotOptions.js +0 -0
- package/dist/browser/Target.d.ts +0 -0
- package/dist/browser/Target.js +0 -0
- package/dist/browser/TaskQueue.d.ts +0 -0
- package/dist/browser/TaskQueue.js +0 -0
- package/dist/browser/TimeoutSettings.d.ts +0 -0
- package/dist/browser/TimeoutSettings.js +0 -0
- package/dist/browser/assert.d.ts +0 -0
- package/dist/browser/assert.js +0 -0
- package/dist/browser/create-browser-fetcher.d.ts +0 -0
- package/dist/browser/create-browser-fetcher.js +2 -44
- package/dist/browser/devtools-commands.d.ts +0 -0
- package/dist/browser/devtools-commands.js +0 -0
- package/dist/browser/devtools-types.d.ts +0 -0
- package/dist/browser/devtools-types.js +0 -0
- package/dist/browser/get-download-destination.d.ts +0 -0
- package/dist/browser/get-download-destination.js +0 -0
- package/dist/browser/mitt/index.d.ts +0 -0
- package/dist/browser/mitt/index.js +0 -0
- package/dist/browser/node.d.ts +0 -0
- package/dist/browser/node.js +0 -0
- package/dist/browser/revisions.d.ts +0 -1
- package/dist/browser/revisions.js +0 -1
- package/dist/browser/util.d.ts +0 -0
- package/dist/browser/util.js +0 -0
- package/dist/browser-executable.d.ts +0 -0
- package/dist/browser-executable.js +0 -0
- package/dist/browser-log.d.ts +0 -0
- package/dist/browser-log.js +0 -0
- package/dist/browser.d.ts +0 -0
- package/dist/browser.js +0 -0
- package/dist/calculate-ffmpeg-filters.d.ts +0 -0
- package/dist/calculate-ffmpeg-filters.js +0 -0
- package/dist/calculate-sar-dar-pixels.d.ts +0 -0
- package/dist/calculate-sar-dar-pixels.js +0 -0
- package/dist/can-use-parallel-encoding.d.ts +0 -0
- package/dist/can-use-parallel-encoding.js +0 -0
- package/dist/check-apple-silicon.d.ts +1 -0
- package/dist/check-apple-silicon.js +55 -0
- package/dist/chunk.d.ts +0 -0
- package/dist/chunk.js +0 -0
- package/dist/codec-supports-media.d.ts +0 -0
- package/dist/codec-supports-media.js +0 -0
- package/dist/codec.d.ts +0 -0
- package/dist/codec.js +0 -0
- package/dist/combine-videos.d.ts +0 -0
- package/dist/combine-videos.js +1 -1
- package/dist/compress-assets.d.ts +0 -0
- package/dist/compress-assets.js +0 -0
- package/dist/convert-number-of-gif-loops-to-ffmpeg.d.ts +0 -0
- package/dist/convert-number-of-gif-loops-to-ffmpeg.js +0 -0
- package/dist/convert-to-pcm.d.ts +0 -0
- package/dist/convert-to-pcm.js +0 -0
- package/dist/convert-to-positive-frame-index.d.ts +4 -0
- package/dist/convert-to-positive-frame-index.js +8 -0
- package/dist/create-ffmpeg-complex-filter.d.ts +0 -0
- package/dist/create-ffmpeg-complex-filter.js +0 -0
- package/dist/create-ffmpeg-merge-filter.d.ts +0 -0
- package/dist/create-ffmpeg-merge-filter.js +0 -0
- package/dist/create-silent-audio.d.ts +0 -0
- package/dist/create-silent-audio.js +0 -0
- package/dist/crf.d.ts +5 -1
- package/dist/crf.js +33 -6
- package/dist/cycle-browser-tabs.d.ts +0 -0
- package/dist/cycle-browser-tabs.js +0 -0
- package/dist/delay-render-embedded-stack.d.ts +0 -0
- package/dist/delay-render-embedded-stack.js +0 -0
- package/dist/delete-directory.d.ts +0 -0
- package/dist/delete-directory.js +0 -0
- package/dist/ensure-frames-in-order.d.ts +0 -0
- package/dist/ensure-frames-in-order.js +0 -0
- package/dist/ensure-output-directory.d.ts +0 -0
- package/dist/ensure-output-directory.js +0 -0
- package/dist/ensure-presentation-timestamp.d.ts +0 -0
- package/dist/ensure-presentation-timestamp.js +0 -0
- package/dist/error-handling/handle-javascript-exception.d.ts +0 -0
- package/dist/error-handling/handle-javascript-exception.js +0 -0
- package/dist/error-handling/symbolicate-error.d.ts +0 -0
- package/dist/error-handling/symbolicate-error.js +0 -0
- package/dist/error-handling/symbolicateable-error.d.ts +0 -0
- package/dist/error-handling/symbolicateable-error.js +0 -0
- package/dist/extract-frame-from-video.d.ts +0 -0
- package/dist/extract-frame-from-video.js +0 -0
- package/dist/ffmpeg-executable.d.ts +0 -0
- package/dist/ffmpeg-executable.js +0 -0
- package/dist/ffmpeg-filter-file.d.ts +0 -0
- package/dist/ffmpeg-filter-file.js +0 -0
- package/dist/ffmpeg-flags.d.ts +5 -2
- package/dist/ffmpeg-flags.js +37 -7
- package/dist/ffmpeg-override.d.ts +4 -0
- package/dist/ffmpeg-override.js +2 -0
- package/dist/frame-range.d.ts +0 -0
- package/dist/frame-range.js +0 -0
- package/dist/frame-to-ffmpeg-timestamp.d.ts +0 -0
- package/dist/frame-to-ffmpeg-timestamp.js +0 -0
- package/dist/get-audio-codec-name.d.ts +0 -0
- package/dist/get-audio-codec-name.js +0 -0
- package/dist/get-browser-instance.d.ts +0 -0
- package/dist/get-browser-instance.js +0 -0
- package/dist/get-codec-name.d.ts +0 -0
- package/dist/get-codec-name.js +0 -0
- package/dist/get-compositions.d.ts +0 -0
- package/dist/get-compositions.js +6 -4
- package/dist/get-concurrency.d.ts +0 -0
- package/dist/get-concurrency.js +0 -0
- package/dist/get-duration-from-frame-range.d.ts +0 -0
- package/dist/get-duration-from-frame-range.js +0 -0
- package/dist/get-extension-from-codec.d.ts +1 -1
- package/dist/get-extension-from-codec.js +0 -0
- package/dist/get-extension-of-filename.d.ts +0 -0
- package/dist/get-extension-of-filename.js +0 -0
- package/dist/get-frame-padded-index.d.ts +0 -0
- package/dist/get-frame-padded-index.js +0 -0
- package/dist/get-frame-to-render.d.ts +0 -0
- package/dist/get-frame-to-render.js +0 -0
- package/dist/get-local-browser-executable.d.ts +0 -0
- package/dist/get-local-browser-executable.js +1 -3
- package/dist/get-port.d.ts +0 -0
- package/dist/get-port.js +0 -0
- package/dist/get-prores-profile-name.d.ts +0 -0
- package/dist/get-prores-profile-name.js +0 -0
- package/dist/get-video-info.d.ts +0 -0
- package/dist/get-video-info.js +0 -0
- package/dist/get-video-threads-flag.d.ts +0 -0
- package/dist/get-video-threads-flag.js +0 -0
- package/dist/guess-extension-for-media.d.ts +1 -1
- package/dist/guess-extension-for-media.js +0 -0
- package/dist/image-format.d.ts +0 -0
- package/dist/image-format.js +0 -0
- package/dist/index.d.ts +26 -18
- package/dist/index.js +12 -7
- package/dist/is-audio-codec.d.ts +0 -0
- package/dist/is-audio-codec.js +0 -0
- package/dist/is-beyond-last-frame.d.ts +0 -0
- package/dist/is-beyond-last-frame.js +0 -0
- package/dist/is-serve-url.d.ts +0 -0
- package/dist/is-serve-url.js +0 -0
- package/dist/last-frame-from-video-cache.d.ts +0 -0
- package/dist/last-frame-from-video-cache.js +0 -0
- package/dist/legacy-webpack-config.d.ts +0 -0
- package/dist/legacy-webpack-config.js +0 -0
- package/dist/log-level.d.ts +0 -0
- package/dist/log-level.js +0 -0
- package/dist/make-cancel-signal.d.ts +0 -0
- package/dist/make-cancel-signal.js +0 -0
- package/dist/merge-audio-track.d.ts +0 -0
- package/dist/merge-audio-track.js +0 -0
- package/dist/mime-db.d.ts +0 -0
- package/dist/mime-db.js +0 -0
- package/dist/mime-types.d.ts +0 -0
- package/dist/mime-types.js +0 -0
- package/dist/normalize-serve-url.d.ts +0 -0
- package/dist/normalize-serve-url.js +0 -0
- package/dist/offthread-video-server.d.ts +0 -0
- package/dist/offthread-video-server.js +0 -0
- package/dist/open-browser.d.ts +0 -0
- package/dist/open-browser.js +1 -11
- package/dist/overwrite.d.ts +0 -0
- package/dist/overwrite.js +0 -0
- package/dist/p-limit.d.ts +0 -0
- package/dist/p-limit.js +0 -0
- package/dist/parse-browser-error-stack.d.ts +0 -0
- package/dist/parse-browser-error-stack.js +0 -0
- package/dist/parse-ffmpeg-progress.d.ts +0 -0
- package/dist/parse-ffmpeg-progress.js +0 -0
- package/dist/perf.d.ts +0 -0
- package/dist/perf.js +0 -0
- package/dist/pixel-format.d.ts +0 -0
- package/dist/pixel-format.js +0 -0
- package/dist/pool.d.ts +0 -0
- package/dist/pool.js +0 -0
- package/dist/prepare-server.d.ts +0 -0
- package/dist/prepare-server.js +0 -0
- package/dist/preprocess-audio-track.d.ts +0 -0
- package/dist/preprocess-audio-track.js +0 -0
- package/dist/prespawn-ffmpeg.d.ts +3 -0
- package/dist/prespawn-ffmpeg.js +15 -11
- package/dist/prestitcher-memory-usage.d.ts +0 -0
- package/dist/prestitcher-memory-usage.js +0 -0
- package/dist/prores-profile.d.ts +4 -1
- package/dist/prores-profile.js +6 -6
- package/dist/provide-screenshot.d.ts +0 -0
- package/dist/provide-screenshot.js +0 -0
- package/dist/puppeteer-evaluate.d.ts +0 -0
- package/dist/puppeteer-evaluate.js +0 -0
- package/dist/puppeteer-screenshot.d.ts +0 -0
- package/dist/puppeteer-screenshot.js +0 -0
- package/dist/quality.d.ts +0 -0
- package/dist/quality.js +0 -0
- package/dist/render-frames.d.ts +10 -3
- package/dist/render-frames.js +21 -8
- package/dist/render-media.d.ts +23 -3
- package/dist/render-media.js +72 -9
- package/dist/render-still.d.ts +1 -1
- package/dist/render-still.js +8 -3
- package/dist/resolve-asset-src.d.ts +0 -0
- package/dist/resolve-asset-src.js +0 -0
- package/dist/sample-rate.d.ts +0 -0
- package/dist/sample-rate.js +0 -0
- package/dist/screenshot-dom-element.d.ts +0 -0
- package/dist/screenshot-dom-element.js +0 -0
- package/dist/screenshot-task.d.ts +0 -0
- package/dist/screenshot-task.js +0 -0
- package/dist/seek-to-frame.d.ts +0 -0
- package/dist/seek-to-frame.js +0 -0
- package/dist/serve-handler/index.d.ts +0 -0
- package/dist/serve-handler/index.js +0 -0
- package/dist/serve-handler/is-path-inside.d.ts +0 -0
- package/dist/serve-handler/is-path-inside.js +0 -0
- package/dist/serve-handler/range-parser.d.ts +0 -0
- package/dist/serve-handler/range-parser.js +0 -0
- package/dist/serve-static.d.ts +0 -0
- package/dist/serve-static.js +0 -0
- package/dist/set-props-and-env.d.ts +0 -0
- package/dist/set-props-and-env.js +1 -1
- package/dist/stitch-frames-to-video.d.ts +4 -0
- package/dist/stitch-frames-to-video.js +36 -16
- package/dist/stringify-ffmpeg-filter.d.ts +0 -0
- package/dist/stringify-ffmpeg-filter.js +0 -0
- package/dist/symbolicate-stacktrace.d.ts +0 -0
- package/dist/symbolicate-stacktrace.js +0 -0
- package/dist/tmp-dir.d.ts +0 -0
- package/dist/tmp-dir.js +0 -0
- package/dist/truthy.d.ts +0 -0
- package/dist/truthy.js +0 -0
- package/dist/types.d.ts +0 -0
- package/dist/types.js +0 -0
- package/dist/validate-concurrency.d.ts +0 -0
- package/dist/validate-concurrency.js +0 -0
- package/dist/validate-even-dimensions-with-codec.d.ts +0 -0
- package/dist/validate-even-dimensions-with-codec.js +0 -0
- package/dist/validate-every-nth-frame.d.ts +0 -0
- package/dist/validate-every-nth-frame.js +0 -0
- package/dist/validate-ffmpeg-override.d.ts +2 -0
- package/dist/validate-ffmpeg-override.js +12 -0
- package/dist/validate-ffmpeg.d.ts +4 -1
- package/dist/validate-ffmpeg.js +23 -7
- package/dist/validate-frame.d.ts +0 -0
- package/dist/validate-frame.js +3 -3
- package/dist/validate-opengl-renderer.d.ts +0 -0
- package/dist/validate-opengl-renderer.js +0 -0
- package/dist/validate-output-filename.d.ts +0 -0
- package/dist/validate-output-filename.js +0 -0
- package/dist/validate-puppeteer-timeout.d.ts +0 -0
- package/dist/validate-puppeteer-timeout.js +1 -1
- package/dist/validate-scale.d.ts +0 -0
- package/dist/validate-scale.js +0 -0
- package/dist/validate-videobitrate.d.ts +1 -0
- package/dist/validate-videobitrate.js +20 -0
- package/dist/wait-for-symbolication-error-to-be-done.d.ts +0 -0
- package/dist/wait-for-symbolication-error-to-be-done.js +0 -0
- package/dist/warn-about-ffmpeg-version.d.ts +5 -0
- package/dist/warn-about-ffmpeg-version.js +37 -0
- package/dist/ws/ws-types.d.ts +0 -0
- package/dist/ws/ws-types.js +0 -0
- package/package.json +6 -6
- 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
|
|
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 [
|
|
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
|
|
18
|
-
- a non-profit or not-for-profit
|
|
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
|
|
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
|
|
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
|
|
|
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
|
package/dist/assets/read-file.js
CHANGED
|
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
|
package/dist/assets/types.d.ts
CHANGED
|
File without changes
|
package/dist/assets/types.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/browser/Browser.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -60,10 +60,10 @@ 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
|
|
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
|
|
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
|
-
? '
|
|
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
|
-
|
|
122
|
-
|
|
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,
|
|
140
|
-
const mkdirAsync = (0,
|
|
141
|
-
const unlinkAsync = (0,
|
|
142
|
-
const chmodAsync = (0,
|
|
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), '
|
|
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"));
|
|
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({
|
|
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
|
|
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
|
|
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({
|
|
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 {
|
|
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
|
-
|
|
125
|
-
|
|
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,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
-
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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,
|
|
252
|
-
(0,
|
|
208
|
+
(0, util_1.addEventListener)(rl, 'line', onLine),
|
|
209
|
+
(0, util_1.addEventListener)(rl, 'close', () => {
|
|
253
210
|
return onClose();
|
|
254
211
|
}),
|
|
255
|
-
(0,
|
|
212
|
+
(0, util_1.addEventListener)(browserProcess, 'exit', () => {
|
|
256
213
|
return onClose();
|
|
257
214
|
}),
|
|
258
|
-
(0,
|
|
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,
|
|
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,
|
|
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
|
package/dist/browser/DOMWorld.js
CHANGED
|
File without changes
|
package/dist/browser/Errors.d.ts
CHANGED
|
File without changes
|
package/dist/browser/Errors.js
CHANGED
|
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
|
package/dist/browser/JSHandle.js
CHANGED
|
File without changes
|
|
@@ -24,14 +24,10 @@ export interface BrowserLaunchArgumentOptions {
|
|
|
24
24
|
}
|
|
25
25
|
export interface LaunchOptions {
|
|
26
26
|
executablePath?: string;
|
|
27
|
-
handleSIGINT?: boolean;
|
|
28
|
-
handleSIGTERM?: boolean;
|
|
29
|
-
handleSIGHUP?: boolean;
|
|
30
27
|
timeout?: number;
|
|
31
28
|
dumpio?: boolean;
|
|
32
29
|
env?: Record<string, string | undefined>;
|
|
33
30
|
pipe?: boolean;
|
|
34
31
|
product?: Product;
|
|
35
|
-
extraPrefsFirefox?: Record<string, unknown>;
|
|
36
32
|
}
|
|
37
33
|
export declare type PuppeteerNodeLaunchOptions = BrowserLaunchArgumentOptions & LaunchOptions & BrowserConnectOptions;
|
|
File without changes
|
|
@@ -6,4 +6,4 @@ export interface ProductLauncher {
|
|
|
6
6
|
executablePath: (path?: any) => string;
|
|
7
7
|
product: Product;
|
|
8
8
|
}
|
|
9
|
-
export default function Launcher(preferredRevision: string
|
|
9
|
+
export default function Launcher(preferredRevision: string): ProductLauncher;
|