@remotion/renderer 4.0.0-fastlambda.8 → 4.0.0-forcepublish.7
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/dist/assets/calculate-asset-positions.d.ts +2 -2
- package/dist/assets/convert-assets-to-file-urls.d.ts +5 -4
- package/dist/assets/convert-assets-to-file-urls.js +2 -2
- package/dist/assets/download-and-map-assets-to-file.d.ts +15 -6
- package/dist/assets/download-and-map-assets-to-file.js +108 -44
- package/dist/assets/download-file.d.ts +10 -5
- package/dist/assets/download-file.js +18 -5
- package/dist/assets/download-map.d.ts +64 -0
- package/dist/assets/download-map.js +73 -0
- package/dist/assets/ffmpeg-volume-expression.d.ts +3 -3
- package/dist/assets/ffmpeg-volume-expression.js +16 -14
- package/dist/assets/flatten-volume-array.d.ts +1 -1
- package/dist/assets/get-audio-channels.d.ts +3 -4
- package/dist/assets/get-audio-channels.js +14 -4
- package/dist/assets/get-video-stream-duration.d.ts +4 -0
- package/dist/assets/get-video-stream-duration.js +59 -0
- package/dist/assets/read-file.js +4 -1
- package/dist/assets/types.d.ts +1 -1
- package/dist/browser/Browser.d.ts +60 -0
- package/dist/browser/Browser.js +218 -0
- package/dist/browser/BrowserConnector.d.ts +19 -0
- package/dist/browser/BrowserConnector.js +17 -0
- package/dist/browser/BrowserFetcher.d.ts +89 -0
- package/dist/browser/BrowserFetcher.js +510 -0
- package/dist/browser/BrowserPage.d.ts +74 -0
- package/dist/browser/BrowserPage.js +283 -0
- package/dist/browser/BrowserRunner.d.ts +39 -0
- package/dist/browser/BrowserRunner.js +308 -0
- package/dist/browser/Connection.d.ts +42 -0
- package/dist/browser/Connection.js +242 -0
- package/dist/browser/ConsoleMessage.d.ts +31 -0
- package/dist/browser/ConsoleMessage.js +48 -0
- package/dist/browser/DOMWorld.d.ts +52 -0
- package/dist/browser/DOMWorld.js +272 -0
- package/dist/browser/Errors.d.ts +25 -0
- package/dist/browser/Errors.js +35 -0
- package/dist/browser/EvalTypes.d.ts +27 -0
- package/dist/browser/EvalTypes.js +17 -0
- package/dist/browser/EventEmitter.d.ts +23 -0
- package/dist/browser/EventEmitter.js +53 -0
- package/dist/browser/ExecutionContext.d.ts +34 -0
- package/dist/browser/ExecutionContext.js +174 -0
- package/dist/browser/FrameManager.d.ts +93 -0
- package/dist/browser/FrameManager.js +496 -0
- package/dist/browser/HTTPRequest.d.ts +28 -0
- package/dist/browser/HTTPRequest.js +37 -0
- package/dist/browser/HTTPResponse.d.ts +21 -0
- package/dist/browser/HTTPResponse.js +41 -0
- package/dist/browser/JSHandle.d.ts +35 -0
- package/dist/browser/JSHandle.js +90 -0
- package/dist/browser/LaunchOptions.d.ts +37 -0
- package/dist/browser/LaunchOptions.js +17 -0
- package/dist/browser/Launcher.d.ts +9 -0
- package/dist/browser/Launcher.js +504 -0
- package/dist/browser/LifecycleWatcher.d.ts +29 -0
- package/dist/browser/LifecycleWatcher.js +180 -0
- package/dist/browser/NetworkEventManager.d.ts +33 -0
- package/dist/browser/NetworkEventManager.js +81 -0
- package/dist/browser/NetworkManager.d.ts +34 -0
- package/dist/browser/NetworkManager.js +231 -0
- package/dist/browser/NodeWebSocketTransport.d.ts +17 -0
- package/dist/browser/NodeWebSocketTransport.js +87 -0
- package/dist/browser/Product.d.ts +16 -0
- package/dist/browser/Product.js +17 -0
- package/dist/browser/PuppeteerNode.d.ts +40 -0
- package/dist/browser/PuppeteerNode.js +81 -0
- package/dist/browser/PuppeteerViewport.d.ts +5 -0
- package/dist/browser/PuppeteerViewport.js +2 -0
- package/dist/browser/ScreenshotOptions.d.ts +14 -0
- package/dist/browser/ScreenshotOptions.js +2 -0
- package/dist/browser/Target.d.ts +61 -0
- package/dist/browser/Target.js +146 -0
- package/dist/browser/TaskQueue.d.ts +20 -0
- package/dist/browser/TaskQueue.js +47 -0
- package/dist/browser/TimeoutSettings.d.ts +24 -0
- package/dist/browser/TimeoutSettings.js +62 -0
- package/dist/browser/assert.d.ts +1 -0
- package/dist/browser/assert.js +9 -0
- package/dist/browser/create-browser-fetcher.d.ts +17 -0
- package/dist/browser/create-browser-fetcher.js +119 -0
- package/dist/browser/devtools-commands.d.ts +270 -0
- package/dist/browser/devtools-commands.js +2 -0
- package/dist/browser/devtools-types.d.ts +1122 -0
- package/dist/browser/devtools-types.js +2 -0
- package/dist/browser/get-download-destination.d.ts +1 -0
- package/dist/browser/get-download-destination.js +38 -0
- package/dist/browser/mitt/index.d.ts +22 -0
- package/dist/browser/mitt/index.js +49 -0
- package/dist/browser/node.d.ts +2 -0
- package/dist/browser/node.js +9 -0
- package/dist/browser/revisions.d.ts +21 -0
- package/dist/browser/revisions.js +22 -0
- package/dist/browser/util.d.ts +47 -0
- package/dist/browser/util.js +169 -0
- package/dist/browser-executable.d.ts +1 -0
- package/dist/browser-executable.js +2 -0
- package/dist/browser-log.d.ts +1 -1
- package/dist/browser.d.ts +2 -0
- package/dist/browser.js +4 -0
- package/dist/calculate-ffmpeg-filters.d.ts +1 -1
- package/dist/calculate-ffmpeg-filters.js +2 -2
- package/dist/calculate-sar-dar-pixels.d.ts +9 -0
- package/dist/calculate-sar-dar-pixels.js +19 -0
- package/dist/can-use-parallel-encoding.d.ts +1 -1
- package/dist/can-use-parallel-encoding.js +2 -2
- package/dist/codec-supports-media.d.ts +7 -0
- package/dist/codec-supports-media.js +49 -0
- package/dist/codec.d.ts +4 -0
- package/dist/codec.js +16 -0
- package/dist/combine-videos.d.ts +4 -2
- package/dist/combine-videos.js +19 -5
- package/dist/compress-assets.d.ts +7 -0
- package/dist/compress-assets.js +25 -0
- package/dist/convert-number-of-gif-loops-to-ffmpeg.d.ts +1 -0
- package/dist/convert-number-of-gif-loops-to-ffmpeg.js +17 -0
- package/dist/convert-to-pcm.d.ts +1 -1
- package/dist/create-ffmpeg-complex-filter.d.ts +3 -5
- package/dist/create-ffmpeg-complex-filter.js +2 -11
- package/dist/create-ffmpeg-merge-filter.js +3 -3
- package/dist/create-silent-audio.d.ts +1 -1
- package/dist/crf.d.ts +5 -0
- package/dist/crf.js +64 -0
- package/dist/cycle-browser-tabs.d.ts +3 -2
- package/dist/cycle-browser-tabs.js +9 -2
- package/dist/delay-render-embedded-stack.d.ts +1 -1
- package/dist/ensure-frames-in-order.d.ts +1 -1
- package/dist/ensure-frames-in-order.js +3 -2
- package/dist/ensure-presentation-timestamp.d.ts +2 -0
- package/dist/ensure-presentation-timestamp.js +69 -0
- package/dist/error-handling/handle-javascript-exception.d.ts +2 -2
- package/dist/error-handling/handle-javascript-exception.js +3 -4
- package/dist/error-handling/symbolicate-error.d.ts +1 -1
- package/dist/error-handling/symbolicateable-error.d.ts +1 -1
- package/dist/extract-frame-from-video.d.ts +16 -0
- package/dist/extract-frame-from-video.js +254 -0
- package/dist/ffmpeg-executable.d.ts +1 -0
- package/dist/ffmpeg-executable.js +2 -0
- package/dist/ffmpeg-filter-file.d.ts +2 -1
- package/dist/ffmpeg-filter-file.js +4 -6
- package/dist/frame-range.d.ts +2 -0
- package/dist/frame-range.js +49 -0
- package/dist/frame-to-ffmpeg-timestamp.d.ts +1 -0
- package/dist/frame-to-ffmpeg-timestamp.js +8 -0
- package/dist/get-audio-codec-name.d.ts +1 -1
- package/dist/get-audio-codec-name.js +2 -2
- package/dist/get-browser-instance.d.ts +4 -3
- package/dist/get-browser-instance.js +2 -2
- package/dist/get-codec-name.d.ts +1 -1
- package/dist/get-codec-name.js +5 -2
- package/dist/get-compositions.d.ts +15 -5
- package/dist/get-compositions.js +35 -11
- package/dist/get-duration-from-frame-range.d.ts +1 -2
- package/dist/get-duration-from-frame-range.js +13 -9
- package/dist/get-extension-from-codec.d.ts +2 -2
- package/dist/get-extension-from-codec.js +5 -0
- package/dist/get-extension-of-filename.d.ts +1 -1
- package/dist/get-extension-of-filename.js +3 -0
- package/dist/get-frame-padded-index.d.ts +14 -0
- package/dist/get-frame-padded-index.js +33 -0
- package/dist/get-frame-to-render.d.ts +1 -1
- package/dist/get-local-browser-executable.d.ts +2 -1
- package/dist/get-local-browser-executable.js +7 -5
- package/dist/get-port.js +30 -37
- package/dist/get-prores-profile-name.d.ts +2 -1
- package/dist/get-video-info.d.ts +3 -0
- package/dist/get-video-info.js +49 -0
- package/dist/get-video-threads-flag.d.ts +1 -0
- package/dist/get-video-threads-flag.js +18 -0
- package/dist/guess-extension-for-media.d.ts +1 -0
- package/dist/guess-extension-for-media.js +27 -0
- package/dist/image-format.d.ts +6 -1
- package/dist/image-format.js +25 -1
- package/dist/index.d.ts +95 -20
- package/dist/index.js +93 -6
- package/dist/is-audio-codec.d.ts +2 -0
- package/dist/is-audio-codec.js +7 -0
- package/dist/is-beyond-last-frame.d.ts +3 -0
- package/dist/is-beyond-last-frame.js +12 -0
- package/dist/last-frame-from-video-cache.d.ts +17 -0
- package/dist/last-frame-from-video-cache.js +55 -0
- package/dist/log-level.d.ts +4 -0
- package/dist/log-level.js +15 -0
- package/dist/make-cancel-signal.d.ts +7 -0
- package/dist/make-cancel-signal.js +25 -0
- package/dist/merge-audio-track.d.ts +3 -1
- package/dist/merge-audio-track.js +14 -8
- package/dist/mime-db.d.ts +6 -0
- package/dist/mime-db.js +8636 -0
- package/dist/mime-types.d.ts +2 -0
- package/dist/mime-types.js +89 -0
- package/dist/offthread-video-server.d.ts +17 -0
- package/dist/offthread-video-server.js +86 -0
- package/dist/open-browser.d.ts +10 -8
- package/dist/open-browser.js +37 -32
- package/dist/overwrite.d.ts +1 -0
- package/dist/overwrite.js +4 -0
- package/dist/perf.d.ts +5 -0
- package/dist/perf.js +35 -0
- package/dist/pixel-format.d.ts +5 -0
- package/dist/pixel-format.js +26 -0
- package/dist/prepare-server.d.ts +14 -2
- package/dist/prepare-server.js +38 -5
- package/dist/preprocess-audio-track.d.ts +5 -2
- package/dist/preprocess-audio-track.js +3 -3
- package/dist/prespawn-ffmpeg.d.ts +7 -1
- package/dist/prespawn-ffmpeg.js +20 -16
- package/dist/prestitcher-memory-usage.d.ts +12 -0
- package/dist/prestitcher-memory-usage.js +30 -0
- package/dist/prores-profile.d.ts +5 -0
- package/dist/prores-profile.js +23 -0
- package/dist/provide-screenshot.d.ts +5 -4
- package/dist/provide-screenshot.js +1 -2
- package/dist/puppeteer-evaluate.d.ts +1 -1
- package/dist/puppeteer-evaluate.js +3 -4
- package/dist/puppeteer-screenshot.d.ts +4 -2
- package/dist/puppeteer-screenshot.js +7 -5
- package/dist/quality.d.ts +1 -0
- package/dist/quality.js +21 -0
- package/dist/render-frames.d.ts +24 -8
- package/dist/render-frames.js +137 -63
- package/dist/render-media.d.ts +36 -9
- package/dist/render-media.js +191 -70
- package/dist/render-still.d.ts +25 -7
- package/dist/render-still.js +75 -24
- package/dist/screenshot-dom-element.d.ts +7 -7
- package/dist/screenshot-dom-element.js +3 -6
- package/dist/screenshot-task.d.ts +4 -2
- package/dist/screenshot-task.js +36 -23
- package/dist/seek-to-frame.d.ts +2 -2
- package/dist/seek-to-frame.js +2 -2
- package/dist/serve-handler/index.d.ts +4 -0
- package/dist/serve-handler/index.js +204 -0
- package/dist/serve-handler/is-path-inside.d.ts +1 -0
- package/dist/serve-handler/is-path-inside.js +27 -0
- package/dist/serve-handler/range-parser.d.ts +13 -0
- package/dist/serve-handler/range-parser.js +57 -0
- package/dist/serve-static.d.ts +11 -3
- package/dist/serve-static.js +37 -7
- package/dist/set-props-and-env.d.ts +6 -2
- package/dist/set-props-and-env.js +48 -12
- package/dist/stitch-frames-to-video.d.ts +17 -5
- package/dist/stitch-frames-to-video.js +129 -45
- package/dist/stringify-ffmpeg-filter.d.ts +2 -2
- package/dist/stringify-ffmpeg-filter.js +12 -7
- package/dist/symbolicate-stacktrace.d.ts +1 -1
- package/dist/symbolicate-stacktrace.js +3 -3
- package/dist/tmp-dir.js +5 -1
- package/dist/truthy.d.ts +3 -0
- package/dist/truthy.js +7 -0
- package/dist/types.d.ts +1 -1
- package/dist/validate-concurrency.d.ts +1 -0
- package/dist/validate-concurrency.js +24 -0
- package/dist/validate-even-dimensions-with-codec.d.ts +1 -1
- package/dist/validate-even-dimensions-with-codec.js +2 -2
- package/dist/validate-every-nth-frame.d.ts +1 -0
- package/dist/validate-every-nth-frame.js +21 -0
- package/dist/validate-ffmpeg.js +2 -3
- package/dist/validate-frame.d.ts +1 -0
- package/dist/validate-frame.js +24 -0
- package/dist/validate-opengl-renderer.d.ts +5 -0
- package/dist/validate-opengl-renderer.js +15 -0
- package/dist/validate-output-filename.d.ts +1 -1
- package/dist/validate-output-filename.js +5 -0
- package/dist/wait-for-symbolication-error-to-be-done.d.ts +3 -0
- package/dist/wait-for-symbolication-error-to-be-done.js +34 -0
- package/dist/ws/ws-types.d.ts +14 -0
- package/dist/ws/ws-types.js +10 -0
- package/package.json +13 -16
- package/tsconfig.json +2 -2
- package/types/ws/index.d.ts +509 -0
- package/vitest.config.ts +8 -0
- package/dist/assets/calculate-asset-positions.d.ts.map +0 -1
- package/dist/assets/calculate-asset-positions.js.map +0 -1
- package/dist/assets/calculate-atempo.d.ts.map +0 -1
- package/dist/assets/calculate-atempo.js.map +0 -1
- package/dist/assets/convert-assets-to-file-urls.d.ts.map +0 -1
- package/dist/assets/convert-assets-to-file-urls.js.map +0 -1
- package/dist/assets/download-and-map-assets-to-file.d.ts.map +0 -1
- package/dist/assets/download-and-map-assets-to-file.js.map +0 -1
- package/dist/assets/download-file.d.ts.map +0 -1
- package/dist/assets/download-file.js.map +0 -1
- package/dist/assets/ffmpeg-volume-expression.d.ts.map +0 -1
- package/dist/assets/ffmpeg-volume-expression.js.map +0 -1
- package/dist/assets/flatten-volume-array.d.ts.map +0 -1
- package/dist/assets/flatten-volume-array.js.map +0 -1
- package/dist/assets/get-audio-channels.d.ts.map +0 -1
- package/dist/assets/get-audio-channels.js.map +0 -1
- package/dist/assets/read-file.d.ts.map +0 -1
- package/dist/assets/read-file.js.map +0 -1
- package/dist/assets/round-volume-to-avoid-stack-overflow.d.ts.map +0 -1
- package/dist/assets/round-volume-to-avoid-stack-overflow.js.map +0 -1
- package/dist/assets/sanitize-filename.d.ts.map +0 -1
- package/dist/assets/sanitize-filename.js.map +0 -1
- package/dist/assets/sanitize-filepath.d.ts.map +0 -1
- package/dist/assets/sanitize-filepath.js.map +0 -1
- package/dist/assets/truncate-utf8-bytes.d.ts.map +0 -1
- package/dist/assets/truncate-utf8-bytes.js.map +0 -1
- package/dist/assets/types.d.ts.map +0 -1
- package/dist/assets/types.js.map +0 -1
- package/dist/browser-log.d.ts.map +0 -1
- package/dist/browser-log.js.map +0 -1
- package/dist/calculate-ffmpeg-filters.d.ts.map +0 -1
- package/dist/calculate-ffmpeg-filters.js.map +0 -1
- package/dist/can-use-parallel-encoding.d.ts.map +0 -1
- package/dist/can-use-parallel-encoding.js.map +0 -1
- package/dist/chunk.d.ts.map +0 -1
- package/dist/chunk.js.map +0 -1
- package/dist/combine-videos.d.ts.map +0 -1
- package/dist/combine-videos.js.map +0 -1
- package/dist/convert-to-pcm.d.ts.map +0 -1
- package/dist/convert-to-pcm.js.map +0 -1
- package/dist/create-ffmpeg-complex-filter.d.ts.map +0 -1
- package/dist/create-ffmpeg-complex-filter.js.map +0 -1
- package/dist/create-ffmpeg-merge-filter.d.ts.map +0 -1
- package/dist/create-ffmpeg-merge-filter.js.map +0 -1
- package/dist/create-silent-audio.d.ts.map +0 -1
- package/dist/create-silent-audio.js.map +0 -1
- package/dist/cycle-browser-tabs.d.ts.map +0 -1
- package/dist/cycle-browser-tabs.js.map +0 -1
- package/dist/delay-render-embedded-stack.d.ts.map +0 -1
- package/dist/delay-render-embedded-stack.js.map +0 -1
- package/dist/delete-directory.d.ts.map +0 -1
- package/dist/delete-directory.js.map +0 -1
- package/dist/ensure-frames-in-order.d.ts.map +0 -1
- package/dist/ensure-frames-in-order.js.map +0 -1
- package/dist/ensure-output-directory.d.ts.map +0 -1
- package/dist/ensure-output-directory.js.map +0 -1
- package/dist/error-handling/handle-javascript-exception.d.ts.map +0 -1
- package/dist/error-handling/handle-javascript-exception.js.map +0 -1
- package/dist/error-handling/symbolicate-error.d.ts.map +0 -1
- package/dist/error-handling/symbolicate-error.js.map +0 -1
- package/dist/error-handling/symbolicateable-error.d.ts.map +0 -1
- package/dist/error-handling/symbolicateable-error.js.map +0 -1
- package/dist/ffmpeg-filter-file.d.ts.map +0 -1
- package/dist/ffmpeg-filter-file.js.map +0 -1
- package/dist/ffmpeg-flags.d.ts.map +0 -1
- package/dist/ffmpeg-flags.js.map +0 -1
- package/dist/get-audio-codec-name.d.ts.map +0 -1
- package/dist/get-audio-codec-name.js.map +0 -1
- package/dist/get-browser-instance.d.ts.map +0 -1
- package/dist/get-browser-instance.js.map +0 -1
- package/dist/get-codec-name.d.ts.map +0 -1
- package/dist/get-codec-name.js.map +0 -1
- package/dist/get-compositions.d.ts.map +0 -1
- package/dist/get-compositions.js.map +0 -1
- package/dist/get-concurrency.d.ts.map +0 -1
- package/dist/get-concurrency.js.map +0 -1
- package/dist/get-duration-from-frame-range.d.ts.map +0 -1
- package/dist/get-duration-from-frame-range.js.map +0 -1
- package/dist/get-extension-from-codec.d.ts.map +0 -1
- package/dist/get-extension-from-codec.js.map +0 -1
- package/dist/get-frame-to-render.d.ts.map +0 -1
- package/dist/get-frame-to-render.js.map +0 -1
- package/dist/get-local-browser-executable.d.ts.map +0 -1
- package/dist/get-local-browser-executable.js.map +0 -1
- package/dist/get-port.d.ts.map +0 -1
- package/dist/get-port.js.map +0 -1
- package/dist/get-prores-profile-name.d.ts.map +0 -1
- package/dist/get-prores-profile-name.js.map +0 -1
- package/dist/image-format.d.ts.map +0 -1
- package/dist/image-format.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/is-serve-url.d.ts.map +0 -1
- package/dist/is-serve-url.js.map +0 -1
- package/dist/legacy-webpack-config.d.ts.map +0 -1
- package/dist/legacy-webpack-config.js.map +0 -1
- package/dist/make-assets-download-dir.d.ts +0 -1
- package/dist/make-assets-download-dir.d.ts.map +0 -1
- package/dist/make-assets-download-dir.js +0 -8
- package/dist/make-assets-download-dir.js.map +0 -1
- package/dist/merge-audio-track.d.ts.map +0 -1
- package/dist/merge-audio-track.js.map +0 -1
- package/dist/normalize-serve-url.d.ts.map +0 -1
- package/dist/normalize-serve-url.js.map +0 -1
- package/dist/open-browser.d.ts.map +0 -1
- package/dist/open-browser.js.map +0 -1
- package/dist/p-limit.d.ts.map +0 -1
- package/dist/p-limit.js.map +0 -1
- package/dist/parse-browser-error-stack.d.ts.map +0 -1
- package/dist/parse-browser-error-stack.js.map +0 -1
- package/dist/parse-ffmpeg-progress.d.ts.map +0 -1
- package/dist/parse-ffmpeg-progress.js.map +0 -1
- package/dist/pool.d.ts.map +0 -1
- package/dist/pool.js.map +0 -1
- package/dist/prepare-server.d.ts.map +0 -1
- package/dist/prepare-server.js.map +0 -1
- package/dist/preprocess-audio-track.d.ts.map +0 -1
- package/dist/preprocess-audio-track.js.map +0 -1
- package/dist/prespawn-ffmpeg.d.ts.map +0 -1
- package/dist/prespawn-ffmpeg.js.map +0 -1
- package/dist/provide-screenshot.d.ts.map +0 -1
- package/dist/provide-screenshot.js.map +0 -1
- package/dist/puppeteer-evaluate.d.ts.map +0 -1
- package/dist/puppeteer-evaluate.js.map +0 -1
- package/dist/puppeteer-screenshot.d.ts.map +0 -1
- package/dist/puppeteer-screenshot.js.map +0 -1
- package/dist/render-frames.d.ts.map +0 -1
- package/dist/render-frames.js.map +0 -1
- package/dist/render-media.d.ts.map +0 -1
- package/dist/render-media.js.map +0 -1
- package/dist/render-still.d.ts.map +0 -1
- package/dist/render-still.js.map +0 -1
- package/dist/resolve-asset-src.d.ts.map +0 -1
- package/dist/resolve-asset-src.js.map +0 -1
- package/dist/sample-rate.d.ts.map +0 -1
- package/dist/sample-rate.js.map +0 -1
- package/dist/screenshot-dom-element.d.ts.map +0 -1
- package/dist/screenshot-dom-element.js.map +0 -1
- package/dist/screenshot-task.d.ts.map +0 -1
- package/dist/screenshot-task.js.map +0 -1
- package/dist/seek-to-frame.d.ts.map +0 -1
- package/dist/seek-to-frame.js.map +0 -1
- package/dist/serve-static.d.ts.map +0 -1
- package/dist/serve-static.js.map +0 -1
- package/dist/set-props-and-env.d.ts.map +0 -1
- package/dist/set-props-and-env.js.map +0 -1
- package/dist/stitch-frames-to-video.d.ts.map +0 -1
- package/dist/stitch-frames-to-video.js.map +0 -1
- package/dist/stringify-ffmpeg-filter.d.ts.map +0 -1
- package/dist/stringify-ffmpeg-filter.js.map +0 -1
- package/dist/symbolicate-stacktrace.d.ts.map +0 -1
- package/dist/symbolicate-stacktrace.js.map +0 -1
- package/dist/tmp-dir.d.ts.map +0 -1
- package/dist/tmp-dir.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/validate-even-dimensions-with-codec.d.ts.map +0 -1
- package/dist/validate-even-dimensions-with-codec.js.map +0 -1
- package/dist/validate-ffmpeg.d.ts.map +0 -1
- package/dist/validate-ffmpeg.js.map +0 -1
- package/dist/validate-puppeteer-timeout.d.ts.map +0 -1
- package/dist/validate-puppeteer-timeout.js.map +0 -1
- package/dist/validate-scale.d.ts.map +0 -1
- package/dist/validate-scale.js.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2018 Google Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ProtocolError = exports.TimeoutError = void 0;
|
|
19
|
+
class CustomError extends Error {
|
|
20
|
+
constructor(message) {
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = this.constructor.name;
|
|
23
|
+
Error.captureStackTrace(this, this.constructor);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
class TimeoutError extends CustomError {
|
|
27
|
+
}
|
|
28
|
+
exports.TimeoutError = TimeoutError;
|
|
29
|
+
class ProtocolError extends CustomError {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
this.originalMessage = '';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.ProtocolError = ProtocolError;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020 Google Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { JSHandle } from './JSHandle';
|
|
17
|
+
export declare type EvaluateFn<T = any, U = any, V = any> = string | ((arg1: T, ...args: U[]) => V);
|
|
18
|
+
export declare type UnwrapPromiseLike<T> = T extends PromiseLike<infer U> ? U : T;
|
|
19
|
+
export declare type EvaluateFnReturnType<T extends EvaluateFn> = T extends (...args: any[]) => infer R ? R : any;
|
|
20
|
+
export declare type EvaluateHandleFn = string | ((...args: any[]) => any);
|
|
21
|
+
declare type Serializable = number | string | boolean | null | bigint | JSONArray | JSONObject;
|
|
22
|
+
declare type JSONArray = readonly Serializable[];
|
|
23
|
+
interface JSONObject {
|
|
24
|
+
[key: string]: Serializable;
|
|
25
|
+
}
|
|
26
|
+
export declare type SerializableOrJSHandle = Serializable | JSHandle;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2020 Google Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { EventType, Handler } from './mitt';
|
|
2
|
+
export interface CommonEventEmitter {
|
|
3
|
+
on(event: EventType, handler: Handler): CommonEventEmitter;
|
|
4
|
+
off(event: EventType, handler: Handler): CommonEventEmitter;
|
|
5
|
+
addListener(event: EventType, handler: Handler): CommonEventEmitter;
|
|
6
|
+
emit(event: EventType, eventData?: unknown): boolean;
|
|
7
|
+
once(event: EventType, handler: Handler): CommonEventEmitter;
|
|
8
|
+
listenerCount(event: string): number;
|
|
9
|
+
removeAllListeners(event?: EventType): CommonEventEmitter;
|
|
10
|
+
}
|
|
11
|
+
export declare class EventEmitter implements CommonEventEmitter {
|
|
12
|
+
private emitter;
|
|
13
|
+
private eventsMap;
|
|
14
|
+
constructor();
|
|
15
|
+
on(event: EventType, handler: Handler): EventEmitter;
|
|
16
|
+
off(event: EventType, handler: Handler): EventEmitter;
|
|
17
|
+
addListener(event: EventType, handler: Handler): EventEmitter;
|
|
18
|
+
emit(event: EventType, eventData?: unknown): boolean;
|
|
19
|
+
once(event: EventType, handler: Handler): EventEmitter;
|
|
20
|
+
listenerCount(event: EventType): number;
|
|
21
|
+
removeAllListeners(event?: EventType): EventEmitter;
|
|
22
|
+
private eventListenersCount;
|
|
23
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EventEmitter = void 0;
|
|
7
|
+
const mitt_1 = __importDefault(require("./mitt"));
|
|
8
|
+
class EventEmitter {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.eventsMap = new Map();
|
|
11
|
+
this.emitter = (0, mitt_1.default)(this.eventsMap);
|
|
12
|
+
}
|
|
13
|
+
on(event, handler) {
|
|
14
|
+
this.emitter.on(event, handler);
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
off(event, handler) {
|
|
18
|
+
this.emitter.off(event, handler);
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
addListener(event, handler) {
|
|
22
|
+
this.on(event, handler);
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
emit(event, eventData) {
|
|
26
|
+
this.emitter.emit(event, eventData);
|
|
27
|
+
return this.eventListenersCount(event) > 0;
|
|
28
|
+
}
|
|
29
|
+
once(event, handler) {
|
|
30
|
+
const onceHandler = (eventData) => {
|
|
31
|
+
handler(eventData);
|
|
32
|
+
this.off(event, onceHandler);
|
|
33
|
+
};
|
|
34
|
+
return this.on(event, onceHandler);
|
|
35
|
+
}
|
|
36
|
+
listenerCount(event) {
|
|
37
|
+
return this.eventListenersCount(event);
|
|
38
|
+
}
|
|
39
|
+
removeAllListeners(event) {
|
|
40
|
+
if (event) {
|
|
41
|
+
this.eventsMap.delete(event);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
this.eventsMap.clear();
|
|
45
|
+
}
|
|
46
|
+
return this;
|
|
47
|
+
}
|
|
48
|
+
eventListenersCount(event) {
|
|
49
|
+
var _a;
|
|
50
|
+
return ((_a = this.eventsMap.get(event)) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.EventEmitter = EventEmitter;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2017 Google Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { CDPSession } from './Connection';
|
|
17
|
+
import type { ExecutionContextDescription } from './devtools-types';
|
|
18
|
+
import type { DOMWorld } from './DOMWorld';
|
|
19
|
+
import type { EvaluateHandleFn, SerializableOrJSHandle } from './EvalTypes';
|
|
20
|
+
import type { Frame } from './FrameManager';
|
|
21
|
+
import type { ElementHandle } from './JSHandle';
|
|
22
|
+
import { JSHandle } from './JSHandle';
|
|
23
|
+
export declare const EVALUATION_SCRIPT_URL = "pptr://__puppeteer_evaluation_script__";
|
|
24
|
+
export declare class ExecutionContext {
|
|
25
|
+
#private;
|
|
26
|
+
_client: CDPSession;
|
|
27
|
+
_world: DOMWorld;
|
|
28
|
+
_contextId: number;
|
|
29
|
+
_contextName: string;
|
|
30
|
+
constructor(client: CDPSession, contextPayload: ExecutionContextDescription, world: DOMWorld);
|
|
31
|
+
frame(): Frame | null;
|
|
32
|
+
evaluate<ReturnType>(pageFunction: Function | string, ...args: unknown[]): Promise<ReturnType>;
|
|
33
|
+
evaluateHandle<HandleType extends JSHandle | ElementHandle = JSHandle>(pageFunction: EvaluateHandleFn, ...args: SerializableOrJSHandle[]): Promise<HandleType>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable no-new-func */
|
|
3
|
+
/* eslint-disable no-new */
|
|
4
|
+
/**
|
|
5
|
+
* Copyright 2017 Google Inc. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
20
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
21
|
+
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");
|
|
22
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
23
|
+
};
|
|
24
|
+
var _ExecutionContext_instances, _ExecutionContext_evaluate;
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ExecutionContext = exports.EVALUATION_SCRIPT_URL = void 0;
|
|
27
|
+
const JSHandle_1 = require("./JSHandle");
|
|
28
|
+
const util_1 = require("./util");
|
|
29
|
+
exports.EVALUATION_SCRIPT_URL = 'pptr://__puppeteer_evaluation_script__';
|
|
30
|
+
const SOURCE_URL_REGEX = /^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/m;
|
|
31
|
+
class ExecutionContext {
|
|
32
|
+
constructor(client, contextPayload, world) {
|
|
33
|
+
_ExecutionContext_instances.add(this);
|
|
34
|
+
this._client = client;
|
|
35
|
+
this._world = world;
|
|
36
|
+
this._contextId = contextPayload.id;
|
|
37
|
+
this._contextName = contextPayload.name;
|
|
38
|
+
}
|
|
39
|
+
frame() {
|
|
40
|
+
return this._world ? this._world.frame() : null;
|
|
41
|
+
}
|
|
42
|
+
evaluate(pageFunction, ...args) {
|
|
43
|
+
return __classPrivateFieldGet(this, _ExecutionContext_instances, "m", _ExecutionContext_evaluate).call(this, true, pageFunction, ...args);
|
|
44
|
+
}
|
|
45
|
+
evaluateHandle(pageFunction, ...args) {
|
|
46
|
+
return __classPrivateFieldGet(this, _ExecutionContext_instances, "m", _ExecutionContext_evaluate).call(this, false, pageFunction, ...args);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.ExecutionContext = ExecutionContext;
|
|
50
|
+
_ExecutionContext_instances = new WeakSet(), _ExecutionContext_evaluate = async function _ExecutionContext_evaluate(returnByValue, pageFunction, ...args) {
|
|
51
|
+
const suffix = `//# sourceURL=${exports.EVALUATION_SCRIPT_URL}`;
|
|
52
|
+
if ((0, util_1.isString)(pageFunction)) {
|
|
53
|
+
const contextId = this._contextId;
|
|
54
|
+
const expression = pageFunction;
|
|
55
|
+
const expressionWithSourceUrl = SOURCE_URL_REGEX.test(expression)
|
|
56
|
+
? expression
|
|
57
|
+
: expression + '\n' + suffix;
|
|
58
|
+
const { exceptionDetails: _details, result: _remoteObject } = await this._client
|
|
59
|
+
.send('Runtime.evaluate', {
|
|
60
|
+
expression: expressionWithSourceUrl,
|
|
61
|
+
contextId,
|
|
62
|
+
returnByValue,
|
|
63
|
+
awaitPromise: true,
|
|
64
|
+
userGesture: true,
|
|
65
|
+
})
|
|
66
|
+
.catch(rewriteError);
|
|
67
|
+
if (_details) {
|
|
68
|
+
throw new Error('Evaluation failed: ' + (0, util_1.getExceptionMessage)(_details));
|
|
69
|
+
}
|
|
70
|
+
return returnByValue
|
|
71
|
+
? (0, util_1.valueFromRemoteObject)(_remoteObject)
|
|
72
|
+
: (0, JSHandle_1._createJSHandle)(this, _remoteObject);
|
|
73
|
+
}
|
|
74
|
+
if (typeof pageFunction !== 'function') {
|
|
75
|
+
throw new Error(`Expected to get |string| or |function| as the first argument, but got "${pageFunction}" instead.`);
|
|
76
|
+
}
|
|
77
|
+
let functionText = pageFunction.toString();
|
|
78
|
+
try {
|
|
79
|
+
new Function('(' + functionText + ')');
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
// This means we might have a function shorthand. Try another
|
|
83
|
+
// time prefixing 'function '.
|
|
84
|
+
if (functionText.startsWith('async ')) {
|
|
85
|
+
functionText =
|
|
86
|
+
'async function ' + functionText.substring('async '.length);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
functionText = 'function ' + functionText;
|
|
90
|
+
}
|
|
91
|
+
try {
|
|
92
|
+
new Function('(' + functionText + ')');
|
|
93
|
+
}
|
|
94
|
+
catch (_error) {
|
|
95
|
+
// We tried hard to serialize, but there's a weird beast here.
|
|
96
|
+
throw new Error('Passed function is not well-serializable!');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
let callFunctionOnPromise;
|
|
100
|
+
try {
|
|
101
|
+
callFunctionOnPromise = this._client.send('Runtime.callFunctionOn', {
|
|
102
|
+
functionDeclaration: functionText + '\n' + suffix + '\n',
|
|
103
|
+
executionContextId: this._contextId,
|
|
104
|
+
arguments: args.map(convertArgument.bind(this)),
|
|
105
|
+
returnByValue,
|
|
106
|
+
awaitPromise: true,
|
|
107
|
+
userGesture: true,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
if (error instanceof TypeError &&
|
|
112
|
+
error.message.startsWith('Converting circular structure to JSON')) {
|
|
113
|
+
error.message += ' Recursive objects are not allowed.';
|
|
114
|
+
}
|
|
115
|
+
throw error;
|
|
116
|
+
}
|
|
117
|
+
const { exceptionDetails, result: remoteObject } = await callFunctionOnPromise.catch(rewriteError);
|
|
118
|
+
if (exceptionDetails) {
|
|
119
|
+
throw new Error('Evaluation failed: ' + (0, util_1.getExceptionMessage)(exceptionDetails));
|
|
120
|
+
}
|
|
121
|
+
return returnByValue
|
|
122
|
+
? (0, util_1.valueFromRemoteObject)(remoteObject)
|
|
123
|
+
: (0, JSHandle_1._createJSHandle)(this, remoteObject);
|
|
124
|
+
function convertArgument(arg) {
|
|
125
|
+
if (typeof arg === 'bigint') {
|
|
126
|
+
// eslint-disable-line valid-typeof
|
|
127
|
+
return { unserializableValue: `${arg.toString()}n` };
|
|
128
|
+
}
|
|
129
|
+
if (Object.is(arg, -0)) {
|
|
130
|
+
return { unserializableValue: '-0' };
|
|
131
|
+
}
|
|
132
|
+
if (Object.is(arg, Infinity)) {
|
|
133
|
+
return { unserializableValue: 'Infinity' };
|
|
134
|
+
}
|
|
135
|
+
if (Object.is(arg, -Infinity)) {
|
|
136
|
+
return { unserializableValue: '-Infinity' };
|
|
137
|
+
}
|
|
138
|
+
if (Object.is(arg, NaN)) {
|
|
139
|
+
return { unserializableValue: 'NaN' };
|
|
140
|
+
}
|
|
141
|
+
const objectHandle = arg && arg instanceof JSHandle_1.JSHandle ? arg : null;
|
|
142
|
+
if (objectHandle) {
|
|
143
|
+
if (objectHandle._context !== this) {
|
|
144
|
+
throw new Error('JSHandles can be evaluated only in the context they were created!');
|
|
145
|
+
}
|
|
146
|
+
if (objectHandle._disposed) {
|
|
147
|
+
throw new Error('JSHandle is disposed!');
|
|
148
|
+
}
|
|
149
|
+
if (objectHandle._remoteObject.unserializableValue) {
|
|
150
|
+
return {
|
|
151
|
+
unserializableValue: objectHandle._remoteObject.unserializableValue,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
if (!objectHandle._remoteObject.objectId) {
|
|
155
|
+
return { value: objectHandle._remoteObject.value };
|
|
156
|
+
}
|
|
157
|
+
return { objectId: objectHandle._remoteObject.objectId };
|
|
158
|
+
}
|
|
159
|
+
return { value: arg };
|
|
160
|
+
}
|
|
161
|
+
function rewriteError(error) {
|
|
162
|
+
if (error.message.includes('Object reference chain is too long')) {
|
|
163
|
+
return { result: { type: 'undefined' } };
|
|
164
|
+
}
|
|
165
|
+
if (error.message.includes("Object couldn't be returned by value")) {
|
|
166
|
+
return { result: { type: 'undefined' } };
|
|
167
|
+
}
|
|
168
|
+
if (error.message.endsWith('Cannot find context with specified id') ||
|
|
169
|
+
error.message.endsWith('Inspected target navigated or closed')) {
|
|
170
|
+
throw new Error('Execution context was destroyed, most likely because of a navigation.');
|
|
171
|
+
}
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2017 Google Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { Browser } from './Browser';
|
|
17
|
+
import type { Page } from './BrowserPage';
|
|
18
|
+
import type { CDPSession } from './Connection';
|
|
19
|
+
import type { Frame as TFrame } from './devtools-types';
|
|
20
|
+
import { DOMWorld } from './DOMWorld';
|
|
21
|
+
import type { EvaluateFn, EvaluateFnReturnType, EvaluateHandleFn, SerializableOrJSHandle, UnwrapPromiseLike } from './EvalTypes';
|
|
22
|
+
import { EventEmitter } from './EventEmitter';
|
|
23
|
+
import { ExecutionContext } from './ExecutionContext';
|
|
24
|
+
import type { HTTPResponse } from './HTTPResponse';
|
|
25
|
+
import type { JSHandle } from './JSHandle';
|
|
26
|
+
import type { PuppeteerLifeCycleEvent } from './LifecycleWatcher';
|
|
27
|
+
import { NetworkManager } from './NetworkManager';
|
|
28
|
+
import type { TimeoutSettings } from './TimeoutSettings';
|
|
29
|
+
export declare const FrameManagerEmittedEvents: {
|
|
30
|
+
FrameNavigated: symbol;
|
|
31
|
+
FrameDetached: symbol;
|
|
32
|
+
FrameSwapped: symbol;
|
|
33
|
+
LifecycleEvent: symbol;
|
|
34
|
+
FrameNavigatedWithinDocument: symbol;
|
|
35
|
+
ExecutionContextCreated: symbol;
|
|
36
|
+
ExecutionContextDestroyed: symbol;
|
|
37
|
+
};
|
|
38
|
+
export declare class FrameManager extends EventEmitter {
|
|
39
|
+
#private;
|
|
40
|
+
get _timeoutSettings(): TimeoutSettings;
|
|
41
|
+
get _client(): CDPSession;
|
|
42
|
+
constructor(client: CDPSession, page: Page, timeoutSettings: TimeoutSettings);
|
|
43
|
+
private setupEventListeners;
|
|
44
|
+
initialize(client?: CDPSession): Promise<void>;
|
|
45
|
+
networkManager(): NetworkManager;
|
|
46
|
+
navigateFrame(frame: Frame, url: string, options?: {
|
|
47
|
+
referer?: string;
|
|
48
|
+
timeout?: number;
|
|
49
|
+
waitUntil?: PuppeteerLifeCycleEvent;
|
|
50
|
+
}): Promise<HTTPResponse | null>;
|
|
51
|
+
page(): Page;
|
|
52
|
+
mainFrame(): Frame;
|
|
53
|
+
frames(): Frame[];
|
|
54
|
+
frame(frameId: string): Frame | null;
|
|
55
|
+
_ensureIsolatedWorld(session: CDPSession, name: string): Promise<void>;
|
|
56
|
+
executionContextById(contextId: number, session?: CDPSession): ExecutionContext;
|
|
57
|
+
}
|
|
58
|
+
export declare class Frame {
|
|
59
|
+
#private;
|
|
60
|
+
_frameManager: FrameManager;
|
|
61
|
+
_id: string;
|
|
62
|
+
_loaderId: string;
|
|
63
|
+
_name?: string;
|
|
64
|
+
_hasStartedLoading: boolean;
|
|
65
|
+
_lifecycleEvents: Set<string>;
|
|
66
|
+
_mainWorld: DOMWorld;
|
|
67
|
+
_secondaryWorld: DOMWorld;
|
|
68
|
+
_childFrames: Set<Frame>;
|
|
69
|
+
constructor(frameManager: FrameManager, parentFrame: Frame | null, frameId: string, client: CDPSession);
|
|
70
|
+
_updateClient(client: CDPSession): void;
|
|
71
|
+
isOOPFrame(): boolean;
|
|
72
|
+
goto(url: string, options?: {
|
|
73
|
+
referer?: string;
|
|
74
|
+
timeout?: number;
|
|
75
|
+
waitUntil?: PuppeteerLifeCycleEvent;
|
|
76
|
+
}): Promise<HTTPResponse | null>;
|
|
77
|
+
_client(): CDPSession;
|
|
78
|
+
/**
|
|
79
|
+
* @returns a promise that resolves to the frame's default execution context.
|
|
80
|
+
*/
|
|
81
|
+
executionContext(): Promise<ExecutionContext>;
|
|
82
|
+
evaluateHandle<HandlerType extends JSHandle = JSHandle>(pageFunction: EvaluateHandleFn, ...args: SerializableOrJSHandle[]): Promise<HandlerType>;
|
|
83
|
+
evaluate<T extends EvaluateFn>(pageFunction: T, ...args: SerializableOrJSHandle[]): Promise<UnwrapPromiseLike<EvaluateFnReturnType<T>>>;
|
|
84
|
+
url(): string;
|
|
85
|
+
childFrames(): Frame[];
|
|
86
|
+
waitForFunction(browser: Browser, pageFunction: Function | string, ...args: SerializableOrJSHandle[]): Promise<JSHandle>;
|
|
87
|
+
_navigated(framePayload: TFrame): void;
|
|
88
|
+
_navigatedWithinDocument(url: string): void;
|
|
89
|
+
_onLifecycleEvent(loaderId: string, name: string): void;
|
|
90
|
+
_onLoadingStopped(): void;
|
|
91
|
+
_onLoadingStarted(): void;
|
|
92
|
+
_detach(): void;
|
|
93
|
+
}
|