isomorfeus-puppetmaster 0.5.1 → 0.5.5
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.
- checksums.yaml +4 -4
- data/README.md +12 -17
- data/lib/isomorfeus/puppetmaster/driver/puppeteer.rb +32 -20
- data/lib/isomorfeus/puppetmaster/driver/puppeteer_document.rb +30 -30
- data/lib/isomorfeus/puppetmaster/driver/puppeteer_node.rb +4 -4
- data/lib/isomorfeus/puppetmaster/node.rb +3 -3
- data/lib/isomorfeus/puppetmaster/server.rb +1 -1
- data/lib/isomorfeus/puppetmaster/version.rb +1 -1
- data/lib/isomorfeus/puppetmaster.rb +2 -2
- data/lib/isomorfeus-puppetmaster.rb +5 -2
- data/node_modules/.package-lock.json +56 -45
- data/node_modules/debug/package.json +1 -1
- data/node_modules/debug/src/common.js +14 -1
- data/node_modules/{mkdirp → mkdirp-classic}/LICENSE +2 -2
- data/node_modules/mkdirp-classic/README.md +18 -0
- data/node_modules/{mkdirp → mkdirp-classic}/index.js +2 -3
- data/node_modules/mkdirp-classic/package.json +18 -0
- data/node_modules/node-fetch/lib/index.es.js +25 -3
- data/node_modules/node-fetch/lib/index.js +25 -3
- data/node_modules/node-fetch/lib/index.mjs +25 -3
- data/node_modules/node-fetch/package.json +8 -6
- data/node_modules/progress/lib/node-progress.js +4 -3
- data/node_modules/progress/package.json +1 -1
- data/node_modules/puppeteer-core/CHANGELOG.md +64 -0
- data/node_modules/puppeteer-core/README.md +13 -15
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.js +5 -5
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser.d.ts +20 -2
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser.js +20 -7
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.js +2 -2
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.d.ts +8 -2
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js +26 -8
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Coverage.d.ts +18 -2
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Coverage.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Coverage.js +16 -9
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Coverage.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DOMWorld.d.ts +4 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DOMWorld.js +26 -18
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DeviceDescriptors.js +120 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/DeviceDescriptors.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Dialog.js +2 -2
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Dialog.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Errors.d.ts +10 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Errors.js +9 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Errors.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EvalTypes.d.ts +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EvalTypes.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js +8 -8
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.js +2 -2
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FrameManager.d.ts +21 -9
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FrameManager.js +157 -74
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPRequest.d.ts +5 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPRequest.js +32 -29
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPResponse.js +14 -4
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPResponse.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Input.d.ts +2 -3
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Input.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Input.js +3 -4
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Input.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.d.ts +27 -5
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js +46 -21
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.js +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkManager.d.ts +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkManager.js +7 -5
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.d.ts +5 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.d.ts +51 -6
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.js +157 -50
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Puppeteer.js +5 -5
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Puppeteer.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Target.d.ts +3 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Target.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Target.js +3 -2
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Target.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/TaskQueue.d.ts +21 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/TaskQueue.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/TaskQueue.js +30 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/TaskQueue.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Tracing.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Tracing.js +9 -3
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Tracing.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/assert.d.ts +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/assert.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/assert.js +6 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/assert.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/helper.js +5 -5
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/common/helper.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/global.d.ts +17 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/global.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/global.js +3 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/global.js.map +1 -0
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.js +20 -21
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js +11 -5
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/LaunchOptions.d.ts +6 -2
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Launcher.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Launcher.js +30 -15
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.js +7 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Puppeteer.js +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Puppeteer.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/install.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/install.js +17 -3
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node/install.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node-puppeteer-core.js +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node-puppeteer-core.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node.js +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/node.js.map +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/web.js +1 -1
- data/node_modules/puppeteer-core/lib/cjs/puppeteer/web.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.js +5 -5
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Browser.d.ts +20 -2
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Browser.js +16 -3
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Browser.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.d.ts +8 -2
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.js +23 -5
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Coverage.d.ts +18 -2
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Coverage.js +10 -3
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Coverage.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DOMWorld.d.ts +4 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DOMWorld.js +16 -8
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DeviceDescriptors.js +120 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/DeviceDescriptors.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.d.ts +10 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.js +7 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Errors.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EvalTypes.d.ts +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/EvalTypes.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FrameManager.d.ts +21 -9
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FrameManager.js +152 -69
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPRequest.d.ts +5 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPRequest.js +22 -19
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPResponse.js +14 -4
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/HTTPResponse.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Input.d.ts +2 -3
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Input.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Input.js +2 -3
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Input.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/JSHandle.d.ts +27 -5
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/JSHandle.js +35 -10
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkManager.d.ts +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkManager.js +6 -4
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.d.ts +5 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Page.d.ts +51 -6
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Page.js +136 -29
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Page.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Target.d.ts +3 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Target.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Target.js +3 -2
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Target.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/TaskQueue.d.ts +21 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/TaskQueue.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/TaskQueue.js +26 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/TaskQueue.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Tracing.js +8 -2
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/Tracing.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/assert.d.ts +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/assert.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/assert.js +4 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/assert.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/helper.js +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/common/helper.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/global.d.ts +17 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/global.d.ts.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/global.js +2 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/global.js.map +1 -0
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserFetcher.js +9 -10
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserRunner.js +7 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/LaunchOptions.d.ts +6 -2
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Launcher.js +27 -12
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/Launcher.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.js +7 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/install.d.ts.map +1 -1
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/install.js +17 -3
- data/node_modules/puppeteer-core/lib/esm/puppeteer/node/install.js.map +1 -1
- data/node_modules/puppeteer-core/lib/types.d.ts +3898 -3710
- data/node_modules/puppeteer-core/package.json +35 -41
- data/node_modules/tar-fs/.travis.yml +2 -1
- data/node_modules/tar-fs/README.md +4 -2
- data/node_modules/tar-fs/index.js +11 -8
- data/node_modules/tar-fs/package.json +4 -4
- data/node_modules/tar-fs/test/index.js +1 -1
- data/node_modules/tr46/.npmignore +4 -0
- data/node_modules/tr46/index.js +193 -0
- data/node_modules/tr46/lib/.gitkeep +0 -0
- data/node_modules/tr46/lib/mappingTable.json +1 -0
- data/node_modules/tr46/package.json +31 -0
- data/node_modules/unbzip2-stream/README.md +1 -1
- data/node_modules/unbzip2-stream/dist/unbzip2-stream.min.js +1 -1
- data/node_modules/unbzip2-stream/index.js +3 -2
- data/node_modules/unbzip2-stream/lib/bzip2.js +4 -6
- data/node_modules/unbzip2-stream/package.json +1 -1
- data/node_modules/webidl-conversions/LICENSE.md +12 -0
- data/node_modules/webidl-conversions/README.md +53 -0
- data/node_modules/webidl-conversions/lib/index.js +189 -0
- data/node_modules/webidl-conversions/package.json +23 -0
- data/node_modules/whatwg-url/LICENSE.txt +21 -0
- data/node_modules/whatwg-url/README.md +67 -0
- data/node_modules/whatwg-url/lib/URL-impl.js +200 -0
- data/node_modules/whatwg-url/lib/URL.js +196 -0
- data/node_modules/whatwg-url/lib/public-api.js +11 -0
- data/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
- data/node_modules/whatwg-url/lib/utils.js +20 -0
- data/node_modules/whatwg-url/package.json +32 -0
- data/node_modules/ws/LICENSE +0 -2
- data/node_modules/ws/README.md +49 -52
- data/node_modules/ws/index.js +3 -0
- data/node_modules/ws/lib/buffer-util.js +3 -6
- data/node_modules/ws/lib/constants.js +3 -1
- data/node_modules/ws/lib/event-target.js +172 -90
- data/node_modules/ws/lib/extension.js +8 -28
- data/node_modules/ws/lib/permessage-deflate.js +10 -16
- data/node_modules/ws/lib/receiver.js +143 -38
- data/node_modules/ws/lib/sender.js +29 -12
- data/node_modules/ws/lib/stream.js +20 -5
- data/node_modules/ws/lib/subprotocol.js +62 -0
- data/node_modules/ws/lib/validation.js +28 -8
- data/node_modules/ws/lib/websocket-server.js +129 -62
- data/node_modules/ws/lib/websocket.js +311 -104
- data/node_modules/ws/package.json +10 -5
- data/node_modules/ws/wrapper.mjs +8 -0
- data/package.json +1 -1
- metadata +83 -61
- data/node_modules/.bin/mkdirp +0 -12
- data/node_modules/.bin/mkdirp.cmd +0 -17
- data/node_modules/.bin/mkdirp.ps1 +0 -28
- data/node_modules/minimist/.travis.yml +0 -8
- data/node_modules/minimist/LICENSE +0 -18
- data/node_modules/minimist/example/parse.js +0 -2
- data/node_modules/minimist/index.js +0 -245
- data/node_modules/minimist/package.json +0 -45
- data/node_modules/minimist/readme.markdown +0 -95
- data/node_modules/minimist/test/all_bool.js +0 -32
- data/node_modules/minimist/test/bool.js +0 -178
- data/node_modules/minimist/test/dash.js +0 -31
- data/node_modules/minimist/test/default_bool.js +0 -35
- data/node_modules/minimist/test/dotted.js +0 -22
- data/node_modules/minimist/test/kv_short.js +0 -16
- data/node_modules/minimist/test/long.js +0 -31
- data/node_modules/minimist/test/num.js +0 -36
- data/node_modules/minimist/test/parse.js +0 -197
- data/node_modules/minimist/test/parse_modified.js +0 -9
- data/node_modules/minimist/test/proto.js +0 -44
- data/node_modules/minimist/test/short.js +0 -67
- data/node_modules/minimist/test/stop_early.js +0 -15
- data/node_modules/minimist/test/unknown.js +0 -102
- data/node_modules/minimist/test/whitespace.js +0 -8
- data/node_modules/mkdirp/bin/cmd.js +0 -33
- data/node_modules/mkdirp/bin/usage.txt +0 -12
- data/node_modules/mkdirp/package.json +0 -34
- data/node_modules/mkdirp/readme.markdown +0 -100
- data/node_modules/node-fetch/CHANGELOG.md +0 -272
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a4b1855e0c0b1039666aa3ae0c5b1e1a8b2bb0c8b424dc7bc81bcd446fa88e4
|
|
4
|
+
data.tar.gz: e932a68c21221b7b526496c3e16f7d1eec0f4342ad625228771de054e944d88e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 725d868d6bffc3c3ee9e8e105c26804b96b34db21dab68373e72f5c2f22ca2ea59f7a3d013484fcaf7cc388bd4e5d67f9621c102ac2737e290365aca06e0d948
|
|
7
|
+
data.tar.gz: 89fdfe7e7605221e593056db787d0a2ae01d57c607ac0e4d1d3a3151334ba7bf8e6a2240f631a86bc6d321e8926ddefe1f8dee0bc2894ae9a46a1a15ba001983
|
data/README.md
CHANGED
|
@@ -1,28 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<img src="https://github.com/isomorfeus/isomorfeus-puppetmaster/blob/master/Logo.png?raw=true" align="center" width="234" height="453" />
|
|
3
|
+
<br/>
|
|
4
|
+
Isomorfeus Puppetmaster<br/>
|
|
5
|
+
</h1>
|
|
6
|
+
A framework for acceptance tests or simply running tests in a headless browser.
|
|
7
|
+
Comes with drivers for chromium headless.
|
|
5
8
|
Allows for writing javascript browser tests in pure ruby.
|
|
6
9
|
|
|
7
10
|
### Community and Support
|
|
8
11
|
At the [Isomorfeus Framework Project](http://isomorfeus.com)
|
|
9
12
|
|
|
10
|
-
## Running on:
|
|
11
|
-
- [CircleCI](https://circleci.com): [](https://circleci.com/gh/isomorfeus/isomorfeus-puppetmaster/tree/master)
|
|
12
|
-
- [SemaphoreCI 2.0](https://semaphoreci.com): (not yet available)
|
|
13
|
-
- [TravisCI](https://travis-ci.org): [](https://travis-ci.org/isomorfeus/isomorfeus-puppetmaster)
|
|
14
|
-
|
|
15
13
|
## Installation
|
|
16
14
|
|
|
17
15
|
In Gemfile:
|
|
18
16
|
`gem 'isomorfeus-puppetmaster'`, then `bundle install`
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- [puppeteer 10.2.x](https://github.com/GoogleChrome/puppeteer#readme) - for the chrome driver
|
|
18
|
+
Comes included with:
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
Speednode will pickup the node modules then from the projects root node_modules directory.
|
|
20
|
+
- [puppeteer-core](https://github.com/GoogleChrome/puppeteer#readme) - for the chromium driver
|
|
26
21
|
|
|
27
22
|
## Configuration
|
|
28
23
|
|
|
@@ -63,13 +58,13 @@ There are Browsers which may have windows or tabs, which translate to targets or
|
|
|
63
58
|
In Puppetmaster, which is focusing on headless testing, the main "thing" is **just a document**. Its possible to open many documents at once, but what exactly a document is contained in,
|
|
64
59
|
a window or tab or browser or target or whatever, is not of interest.
|
|
65
60
|
A document consists of nodes. Simply working with just documents and nodes makes testing a lot simpler.
|
|
66
|
-
```
|
|
61
|
+
```
|
|
67
62
|
document
|
|
68
63
|
|____head (is a node)
|
|
69
64
|
| |
|
|
70
65
|
| |___more nodes
|
|
71
66
|
| |___...
|
|
72
|
-
|
|
|
67
|
+
|
|
|
73
68
|
|____body (is a node)
|
|
74
69
|
|
|
|
75
70
|
|___more nodes
|
|
@@ -132,7 +127,7 @@ TODO
|
|
|
132
127
|
#### DOM changes by Javascript, Timing
|
|
133
128
|
|
|
134
129
|
TODO
|
|
135
|
-
|
|
130
|
+
|
|
136
131
|
## Nodes
|
|
137
132
|
|
|
138
133
|
### Finding Nodes ...
|
|
@@ -252,12 +252,22 @@ module Isomorfeus
|
|
|
252
252
|
def launch_line
|
|
253
253
|
string_options = []
|
|
254
254
|
options = @options.dup
|
|
255
|
-
string_options << "ignoreHTTPSErrors: #{options.delete(:ignore_https_errors)}" if options.
|
|
256
|
-
|
|
255
|
+
string_options << "ignoreHTTPSErrors: #{options.delete(:ignore_https_errors)}" if options.key?(:ignore_https_errors)
|
|
256
|
+
if Gem::Platform.local.os == 'linux' && Gem::Platform.local.cpu.start_with?('arm')
|
|
257
|
+
chromium_path = if options.key?(:executable_path)
|
|
258
|
+
options.delete(:executable_path)
|
|
259
|
+
else
|
|
260
|
+
Isomorfeus::Speednode::NodeCommand.which(['chromium'])
|
|
261
|
+
end
|
|
262
|
+
raise "Chromium not found. Please install chromium manually." unless chromium_path
|
|
263
|
+
string_options << "executablePath: '#{chromium_path}'"
|
|
264
|
+
else
|
|
265
|
+
string_options << "executablePath: '#{options.delete(:executable_path)}'" if options.key?(:executable_path)
|
|
266
|
+
end
|
|
257
267
|
options.each do |option, value|
|
|
258
268
|
string_options << "#{option.to_s.camelize(:lower)}: #{value}"
|
|
259
269
|
end
|
|
260
|
-
string_options << "userDataDir: '#{Dir.mktmpdir}'" unless @options.
|
|
270
|
+
string_options << "userDataDir: '#{Dir.mktmpdir}'" unless @options.key?(:user_data_dir)
|
|
261
271
|
string_options << "defaultViewport: { width: #{@width}, height: #{@height} }"
|
|
262
272
|
string_options << "pipe: true"
|
|
263
273
|
# string_options << "args: ['--disable-popup-blocking']"
|
|
@@ -283,16 +293,16 @@ module Isomorfeus
|
|
|
283
293
|
var LastErr = null;
|
|
284
294
|
var LastExecutionFinished = false;
|
|
285
295
|
var LastHandleId = 0;
|
|
286
|
-
|
|
296
|
+
|
|
287
297
|
var AllPageHandles = {};
|
|
288
298
|
var AllElementHandles = {};
|
|
289
|
-
|
|
299
|
+
|
|
290
300
|
var CurrentBrowser = null;
|
|
291
301
|
var ConsoleMessages = {};
|
|
292
|
-
|
|
302
|
+
|
|
293
303
|
var ModalText = null;
|
|
294
304
|
var ModalTextMatched = false;
|
|
295
|
-
|
|
305
|
+
|
|
296
306
|
const EnsureBrowser = async function() {
|
|
297
307
|
var revisions = await BrowserFetcher.localRevisions();
|
|
298
308
|
if (!revisions.includes(default_revision)) {
|
|
@@ -306,48 +316,48 @@ module Isomorfeus
|
|
|
306
316
|
if (LastExecutionFinished === true) {
|
|
307
317
|
var err = LastErr;
|
|
308
318
|
var res = LastResult;
|
|
309
|
-
|
|
319
|
+
|
|
310
320
|
LastErr = null;
|
|
311
321
|
LastRes = null;
|
|
312
322
|
LastExecutionFinished = false;
|
|
313
|
-
|
|
323
|
+
|
|
314
324
|
if (err) { return [null, {name: err.name, message: err.message, stack: err.stack}]; }
|
|
315
325
|
else { return [res, null]; }
|
|
316
|
-
|
|
326
|
+
|
|
317
327
|
} else {
|
|
318
328
|
var new_err = new Error('Last command did not yet finish execution!');
|
|
319
329
|
return [null, {name: new_err.name, message: new_err.message, stack: new_err.stack}];
|
|
320
330
|
}
|
|
321
331
|
};
|
|
322
|
-
|
|
332
|
+
|
|
323
333
|
const DialogAcceptHandler = async (dialog) => {
|
|
324
334
|
var msg = dialog.message()
|
|
325
335
|
ModalTextMatched = (ModalText === msg);
|
|
326
336
|
ModalText = msg;
|
|
327
337
|
await dialog.accept();
|
|
328
338
|
}
|
|
329
|
-
|
|
339
|
+
|
|
330
340
|
const DialogDismissHandler = async (dialog) => {
|
|
331
341
|
var msg = dialog.message()
|
|
332
342
|
ModalTextMatched = (ModalText === msg);
|
|
333
343
|
ModalText = msg;
|
|
334
344
|
await dialog.dismiss();
|
|
335
345
|
}
|
|
336
|
-
|
|
346
|
+
|
|
337
347
|
const RegisterElementHandle = function(element_handle) {
|
|
338
348
|
var entries = Object.entries(AllElementHandles);
|
|
339
|
-
for(var i = 0; i < entries.length; i++) {
|
|
349
|
+
for(var i = 0; i < entries.length; i++) {
|
|
340
350
|
if (entries[i][1] === element_handle) { return entries[i][0]; }
|
|
341
351
|
}
|
|
342
352
|
LastHandleId++;
|
|
343
353
|
var handle_id = LastHandleId;
|
|
344
354
|
AllElementHandles[handle_id] = element_handle;
|
|
345
|
-
return handle_id;
|
|
355
|
+
return handle_id;
|
|
346
356
|
};
|
|
347
|
-
|
|
357
|
+
|
|
348
358
|
const RegisterPage = function(page) {
|
|
349
359
|
var entries = Object.entries(AllPageHandles);
|
|
350
|
-
for(var i = 0; i < entries.length; i++) {
|
|
360
|
+
for(var i = 0; i < entries.length; i++) {
|
|
351
361
|
if (entries[i][1] === page) { return entries[i][0]; }
|
|
352
362
|
}
|
|
353
363
|
LastHandleId++;
|
|
@@ -360,12 +370,14 @@ module Isomorfeus
|
|
|
360
370
|
AllPageHandles[handle_id].on('pageerror', (error) => {
|
|
361
371
|
ConsoleMessages[handle_id].push({level: 'error', location: '', text: error.message});
|
|
362
372
|
});
|
|
363
|
-
return handle_id;
|
|
373
|
+
return handle_id;
|
|
364
374
|
};
|
|
365
|
-
|
|
375
|
+
|
|
366
376
|
(async () => {
|
|
367
377
|
try {
|
|
368
|
-
|
|
378
|
+
if (process.arch !== 'arm') {
|
|
379
|
+
await EnsureBrowser();
|
|
380
|
+
}
|
|
369
381
|
CurrentBrowser = #{launch_line}
|
|
370
382
|
var page = (await CurrentBrowser.pages())[0];
|
|
371
383
|
page.setDefaultTimeout(#{@puppeteer_timeout});
|
|
@@ -4,7 +4,7 @@ module Isomorfeus
|
|
|
4
4
|
module PuppeteerDocument
|
|
5
5
|
def document_accept_alert(document, **options, &block)
|
|
6
6
|
# TODO maybe wrap in mutex
|
|
7
|
-
text = options.
|
|
7
|
+
text = options.key?(:text) ? "`#{options[:text]}`" : 'null'
|
|
8
8
|
@context.exec <<~JAVASCRIPT
|
|
9
9
|
ModalText = #{text};
|
|
10
10
|
AllPageHandles[#{document.handle}].on('dialog', DialogAcceptHandler);
|
|
@@ -19,12 +19,12 @@ module Isomorfeus
|
|
|
19
19
|
ModalText = null;
|
|
20
20
|
AllPageHandles[#{document.handle}].removeListener('dialog', DialogAcceptHandler);
|
|
21
21
|
JAVASCRIPT
|
|
22
|
-
raise Isomorfeus::Puppetmaster::NoModalError if options.
|
|
22
|
+
raise Isomorfeus::Puppetmaster::NoModalError if options.key?(:text) && !matched
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def document_accept_confirm(document, **options, &block)
|
|
26
26
|
# TODO maybe wrap in mutex
|
|
27
|
-
text = options.
|
|
27
|
+
text = options.key?(:text) ? "`#{options[:text]}`" : 'null'
|
|
28
28
|
@context.exec <<~JAVASCRIPT
|
|
29
29
|
ModalText = #{text};
|
|
30
30
|
AllPageHandles[#{document.handle}].on('dialog', DialogAcceptHandler);
|
|
@@ -39,12 +39,12 @@ module Isomorfeus
|
|
|
39
39
|
ModalText = null;
|
|
40
40
|
AllPageHandles[#{document.handle}].removeListener('dialog', DialogAcceptHandler);
|
|
41
41
|
JAVASCRIPT
|
|
42
|
-
raise Isomorfeus::Puppetmaster::NoModalError if options.
|
|
42
|
+
raise Isomorfeus::Puppetmaster::NoModalError if options.key?(:text) && !matched
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def document_accept_leave_page(document, **options, &block)
|
|
46
46
|
# TODO maybe wrap in mutex
|
|
47
|
-
text = options.
|
|
47
|
+
text = options.key?(:text) ? "`#{options[:text]}`" : 'null'
|
|
48
48
|
@context.exec <<~JAVASCRIPT
|
|
49
49
|
ModalText = #{text};
|
|
50
50
|
AllPageHandles[#{document.handle}].on('dialog', DialogAcceptHandler);
|
|
@@ -59,12 +59,12 @@ module Isomorfeus
|
|
|
59
59
|
ModalText = null;
|
|
60
60
|
AllPageHandles[#{document.handle}].removeListener('dialog', DialogAcceptHandler);
|
|
61
61
|
JAVASCRIPT
|
|
62
|
-
raise Isomorfeus::Puppetmaster::NoModalError if options.
|
|
62
|
+
raise Isomorfeus::Puppetmaster::NoModalError if options.key?(:text) && !matched
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
def document_accept_prompt(document, **options, &block)
|
|
66
66
|
# TODO maybe wrap in mutex
|
|
67
|
-
text = options.
|
|
67
|
+
text = options.key?(:text) ? "`#{options[:text]}`" : 'null'
|
|
68
68
|
@context.exec <<~JAVASCRIPT
|
|
69
69
|
ModalText = #{text};
|
|
70
70
|
AllPageHandles[#{document.handle}].on('dialog', DialogAcceptHandler);
|
|
@@ -79,7 +79,7 @@ module Isomorfeus
|
|
|
79
79
|
ModalText = null;
|
|
80
80
|
AllPageHandles[#{document.handle}].removeListener('dialog', DialogAcceptHandler);
|
|
81
81
|
JAVASCRIPT
|
|
82
|
-
raise Isomorfeus::Puppetmaster::NoModalError if options.
|
|
82
|
+
raise Isomorfeus::Puppetmaster::NoModalError if options.key?(:text) && !matched
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
def document_all_text(document)
|
|
@@ -197,7 +197,7 @@ module Isomorfeus
|
|
|
197
197
|
|
|
198
198
|
def document_dismiss_confirm(document, **options, &block)
|
|
199
199
|
# TODO
|
|
200
|
-
text = options.
|
|
200
|
+
text = options.key?(:text) ? "`#{options[:text]}`" : 'null'
|
|
201
201
|
@context.exec <<~JAVASCRIPT
|
|
202
202
|
ModalText = #{text};
|
|
203
203
|
AllPageHandles[#{document.handle}].on('dialog', DialogDismissHandler);
|
|
@@ -212,12 +212,12 @@ module Isomorfeus
|
|
|
212
212
|
ModalText = null;
|
|
213
213
|
AllPageHandles[#{document.handle}].removeListener('dialog', DialogDismissHandler);
|
|
214
214
|
JAVASCRIPT
|
|
215
|
-
raise Isomorfeus::Puppetmaster::ModalNotFound if options.
|
|
215
|
+
raise Isomorfeus::Puppetmaster::ModalNotFound if options.key?(:text) && !matched
|
|
216
216
|
end
|
|
217
217
|
|
|
218
218
|
def document_dismiss_leave_page(document, **options, &block)
|
|
219
219
|
# TODO
|
|
220
|
-
text = options.
|
|
220
|
+
text = options.key?(:text) ? "`#{options[:text]}`" : 'null'
|
|
221
221
|
@context.exec <<~JAVASCRIPT
|
|
222
222
|
ModalText = #{text};
|
|
223
223
|
AllPageHandles[#{document.handle}].on('dialog', DialogDismissHandler);
|
|
@@ -232,12 +232,12 @@ module Isomorfeus
|
|
|
232
232
|
ModalText = null;
|
|
233
233
|
AllPageHandles[#{document.handle}].removeListener('dialog', DialogDismissHandler);
|
|
234
234
|
JAVASCRIPT
|
|
235
|
-
raise Isomorfeus::Puppetmaster::ModalNotFound if options.
|
|
235
|
+
raise Isomorfeus::Puppetmaster::ModalNotFound if options.key?(:text) && !matched
|
|
236
236
|
end
|
|
237
237
|
|
|
238
238
|
def document_dismiss_prompt(document, **options, &block)
|
|
239
239
|
# TODO
|
|
240
|
-
text = options.
|
|
240
|
+
text = options.key?(:text) ? "`#{options[:text]}`" : 'null'
|
|
241
241
|
@context.exec <<~JAVASCRIPT
|
|
242
242
|
ModalText = #{text};
|
|
243
243
|
AllPageHandles[#{document.handle}].on('dialog', DialogDismissHandler);
|
|
@@ -252,7 +252,7 @@ module Isomorfeus
|
|
|
252
252
|
ModalText = null;
|
|
253
253
|
AllPageHandles[#{document.handle}].removeListener('dialog', DialogDismissHandler);
|
|
254
254
|
JAVASCRIPT
|
|
255
|
-
raise Isomorfeus::Puppetmaster::ModalNotFound if options.
|
|
255
|
+
raise Isomorfeus::Puppetmaster::ModalNotFound if options.key?(:text) && !matched
|
|
256
256
|
end
|
|
257
257
|
|
|
258
258
|
def document_dispatch_event(document, name, event_type = nil, **options)
|
|
@@ -649,12 +649,12 @@ module Isomorfeus
|
|
|
649
649
|
# todo
|
|
650
650
|
# https://pptr.dev/#?product=Puppeteer&version=v1.12.2&show=api-pagescreenshotoptions
|
|
651
651
|
final_options = ["encoding: 'base64'"]
|
|
652
|
-
if options.
|
|
652
|
+
if options.key?(:format)
|
|
653
653
|
options[:format] = 'jpeg' if options[:format].to_s.downcase == 'jpg'
|
|
654
654
|
final_options << "type: '#{options.delete(:format).to_s.downcase}'"
|
|
655
655
|
end
|
|
656
|
-
final_options << "quality: #{options.delete(:quality)}" if options.
|
|
657
|
-
final_options << "fullPage: #{options.delete(:full)}" if options.
|
|
656
|
+
final_options << "quality: #{options.delete(:quality)}" if options.key?(:quality)
|
|
657
|
+
final_options << "fullPage: #{options.delete(:full)}" if options.key?(:full)
|
|
658
658
|
options.each do |k,v|
|
|
659
659
|
final_options << "#{k.to_s.camelize(:lower)}: #{v}"
|
|
660
660
|
end
|
|
@@ -715,12 +715,12 @@ module Isomorfeus
|
|
|
715
715
|
# https://pptr.dev/#?product=Puppeteer&version=v1.12.2&show=api-pagepdfoptions
|
|
716
716
|
absolute_path = File.absolute_path(path)
|
|
717
717
|
final_options = ["path: '#{absolute_path}'"]
|
|
718
|
-
final_options << "format: '#{options.delete(:format)}'" if options.
|
|
719
|
-
final_options << "headerTemplate: `#{options.delete(:header_template)}`" if options.
|
|
720
|
-
final_options << "footerTemplate: `#{options.delete(:footer_template)}`" if options.
|
|
721
|
-
final_options << "pageRanges: '#{options.delete(:page_ranges)}'" if options.
|
|
722
|
-
final_options << "width: '#{options.delete(:width)}'" if options.
|
|
723
|
-
final_options << "height: '#{options.delete(:height)}'" if options.
|
|
718
|
+
final_options << "format: '#{options.delete(:format)}'" if options.key?(:format)
|
|
719
|
+
final_options << "headerTemplate: `#{options.delete(:header_template)}`" if options.key?(:header_template)
|
|
720
|
+
final_options << "footerTemplate: `#{options.delete(:footer_template)}`" if options.key?(:footer_template)
|
|
721
|
+
final_options << "pageRanges: '#{options.delete(:page_ranges)}'" if options.key?(:page_ranges)
|
|
722
|
+
final_options << "width: '#{options.delete(:width)}'" if options.key?(:width)
|
|
723
|
+
final_options << "height: '#{options.delete(:height)}'" if options.key?(:height)
|
|
724
724
|
options.each do |k,v|
|
|
725
725
|
final_options << "#{k.to_s.camelize(:lower)}: #{v}"
|
|
726
726
|
end
|
|
@@ -732,12 +732,12 @@ module Isomorfeus
|
|
|
732
732
|
# https://pptr.dev/#?product=Puppeteer&version=v1.12.2&show=api-pagescreenshotoptions
|
|
733
733
|
absolute_path = File.absolute_path(path)
|
|
734
734
|
final_options = ["path: '#{absolute_path}'"]
|
|
735
|
-
if options.
|
|
735
|
+
if options.key?(:format)
|
|
736
736
|
options[:format] = 'jpeg' if options[:format].to_s.downcase == 'jpg'
|
|
737
737
|
final_options << "type: '#{options.delete(:format).to_s.downcase}'"
|
|
738
738
|
end
|
|
739
|
-
final_options << "quality: #{options.delete(:quality)}" if options.
|
|
740
|
-
final_options << "fullPage: #{options.delete(:full)}" if options.
|
|
739
|
+
final_options << "quality: #{options.delete(:quality)}" if options.key?(:quality)
|
|
740
|
+
final_options << "fullPage: #{options.delete(:full)}" if options.key?(:full)
|
|
741
741
|
options.each do |k,v|
|
|
742
742
|
final_options << "#{k.to_s.camelize(:lower)}: #{v}"
|
|
743
743
|
end
|
|
@@ -772,10 +772,10 @@ module Isomorfeus
|
|
|
772
772
|
end
|
|
773
773
|
options[:domain] ||= URI.parse(uri).host
|
|
774
774
|
final_options = []
|
|
775
|
-
final_options << "expires: #{options.delete(:expires).to_i}" if options.
|
|
776
|
-
final_options << "httpOnly: #{options.delete(:http_only)}" if options.
|
|
777
|
-
final_options << "secure: #{options.delete(:secure)}" if options.
|
|
778
|
-
final_options << "sameSite: '#{options.delete(:same_site)}'" if options.
|
|
775
|
+
final_options << "expires: #{options.delete(:expires).to_i}" if options.key?(:expires)
|
|
776
|
+
final_options << "httpOnly: #{options.delete(:http_only)}" if options.key?(:http_only)
|
|
777
|
+
final_options << "secure: #{options.delete(:secure)}" if options.key?(:secure)
|
|
778
|
+
final_options << "sameSite: '#{options.delete(:same_site)}'" if options.key?(:same_site)
|
|
779
779
|
options.each do |k,v|
|
|
780
780
|
final_options << "#{k}: '#{v}'"
|
|
781
781
|
end
|
|
@@ -437,11 +437,11 @@ module Isomorfeus
|
|
|
437
437
|
def node_render_base64(node, **options)
|
|
438
438
|
# https://pptr.dev/#?product=Puppeteer&version=v1.12.2&show=api-pagescreenshotoptions
|
|
439
439
|
final_options = ["encoding: 'base64'"]
|
|
440
|
-
if options.
|
|
440
|
+
if options.key?(:format)
|
|
441
441
|
options[:format] = 'jpeg' if options[:format].to_s.downcase == 'jpg'
|
|
442
442
|
final_options << "type: '#{options.delete(:format).to_s.downcase}'"
|
|
443
443
|
end
|
|
444
|
-
final_options << "quality: #{options.delete(:quality)}" if options.
|
|
444
|
+
final_options << "quality: #{options.delete(:quality)}" if options.key?(:quality)
|
|
445
445
|
box = await "LastResult = await AllElementHandles[#{node.handle}].boundingBox();"
|
|
446
446
|
final_options << "clip: {x: #{box['x']}, y: #{box['y']}, width: #{box['width']}, height: #{box['height']}}"
|
|
447
447
|
options.each { |k,v| final_options << "#{k.to_s.camelize(:lower)}: #{v}" }
|
|
@@ -493,11 +493,11 @@ module Isomorfeus
|
|
|
493
493
|
# https://pptr.dev/#?product=Puppeteer&version=v1.12.2&show=api-pagescreenshotoptions
|
|
494
494
|
absolute_path = File.absolute_path(path)
|
|
495
495
|
final_options = ["path: '#{absolute_path}'"]
|
|
496
|
-
if options.
|
|
496
|
+
if options.key?(:format)
|
|
497
497
|
options[:format] = 'jpeg' if options[:format].to_s.downcase == 'jpg'
|
|
498
498
|
final_options << "type: '#{options.delete(:format).to_s.downcase}'"
|
|
499
499
|
end
|
|
500
|
-
final_options << "quality: #{options.delete(:quality)}" if options.
|
|
500
|
+
final_options << "quality: #{options.delete(:quality)}" if options.key?(:quality)
|
|
501
501
|
box = await "LastResult = await AllElementHandles[#{node.handle}].boundingBox();"
|
|
502
502
|
final_options << "clip: {x: #{box['x']}, y: #{box['y']}, width: #{box['width']}, height: #{box['height']}}"
|
|
503
503
|
options.each { |k,v| final_options << "#{k.to_s.camelize(:lower)}: #{v}" }
|
|
@@ -189,20 +189,20 @@ module Isomorfeus
|
|
|
189
189
|
def has_css?(selector, **options)
|
|
190
190
|
res = find_all(selector)
|
|
191
191
|
return false unless res
|
|
192
|
-
return false if options.
|
|
192
|
+
return false if options.key?(:count) && options[:count] != res.size
|
|
193
193
|
return true
|
|
194
194
|
end
|
|
195
195
|
|
|
196
196
|
def has_text?(text, **options)
|
|
197
197
|
count = visible_text.scan(/#{text}/).size
|
|
198
|
-
return false if options.
|
|
198
|
+
return false if options.key?(:count) && options[:count] != count
|
|
199
199
|
count > 0
|
|
200
200
|
end
|
|
201
201
|
|
|
202
202
|
def has_xpath?(query, **options)
|
|
203
203
|
res = find_all_xpath(query)
|
|
204
204
|
return false unless res
|
|
205
|
-
return false if options.
|
|
205
|
+
return false if options.key?(:count) && options[:count] != res.size
|
|
206
206
|
return true
|
|
207
207
|
end
|
|
208
208
|
|
|
@@ -74,7 +74,7 @@ module Isomorfeus
|
|
|
74
74
|
end
|
|
75
75
|
if response.code == '200'
|
|
76
76
|
result_hash = Oj.load(response.body)
|
|
77
|
-
if result_hash.
|
|
77
|
+
if result_hash.key?('error')
|
|
78
78
|
error = RuntimeError.new(result_hash['error'])
|
|
79
79
|
error.set_backtrace(result_hash['backtrace'])
|
|
80
80
|
raise error
|
|
@@ -19,7 +19,7 @@ module Isomorfeus
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def driver=(drvr)
|
|
22
|
-
raise "#{drvr}: no such driver registered! Available drivers: #{drivers.keys.join(', ')}." unless drivers.
|
|
22
|
+
raise "#{drvr}: no such driver registered! Available drivers: #{drivers.keys.join(', ')}." unless drivers.key?(drvr)
|
|
23
23
|
@driver = drvr
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -52,7 +52,7 @@ module Isomorfeus
|
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def server=(name)
|
|
55
|
-
raise "#{name}: no such server registered! Available drivers: #{servers.keys.join(', ')}." unless servers.
|
|
55
|
+
raise "#{name}: no such server registered! Available drivers: #{servers.keys.join(', ')}." unless servers.key?(name)
|
|
56
56
|
name, options = *name if name.is_a? Array
|
|
57
57
|
@server = if name.respond_to? :call
|
|
58
58
|
name
|
|
@@ -3,6 +3,11 @@ require 'uri'
|
|
|
3
3
|
require 'net/http'
|
|
4
4
|
require 'rack'
|
|
5
5
|
require 'opal'
|
|
6
|
+
require 'parser'
|
|
7
|
+
|
|
8
|
+
# isomorfeus needs kwargs
|
|
9
|
+
Parser::Builders::Default.emit_kwargs = true
|
|
10
|
+
|
|
6
11
|
require 'unparser'
|
|
7
12
|
require 'method_source'
|
|
8
13
|
require 'securerandom'
|
|
@@ -13,8 +18,6 @@ unless ENV["EXECJS_RUNTIME"]
|
|
|
13
18
|
ExecJS.runtime = ExecJS::Runtimes::Speednode
|
|
14
19
|
end
|
|
15
20
|
|
|
16
|
-
# require 'uglifier'
|
|
17
|
-
|
|
18
21
|
require 'isomorfeus/puppetmaster'
|
|
19
22
|
require 'isomorfeus/puppetmaster/self_forwardable'
|
|
20
23
|
require 'isomorfeus/puppetmaster/errors'
|