diff --git a/src/Puppeteer.Browser.Context.purs b/src/Puppeteer.Browser.Context.purs index c2e9053..01f3eff 100644 --- a/src/Puppeteer.Browser.Context.purs +++ b/src/Puppeteer.Browser.Context.purs @@ -53,7 +53,7 @@ foreign import _clearPermissionOverrides :: BrowserContext -> Effect (Promise Un foreign import _close :: BrowserContext -> Effect (Promise Unit) incognito :: Create -> Browser -> Aff BrowserContext -incognito c b = Promise.toAffE $ _incognito (prepareCreate c) b +incognito c b = FFI.promiseToAff $ _incognito (prepareCreate c) b incognito_ :: Browser -> Aff BrowserContext incognito_ = incognito { proxyBypassList: Nothing, proxyServer: Nothing } @@ -62,10 +62,10 @@ default :: Browser -> BrowserContext default = _default overridePermissions :: String -> Set Permission -> BrowserContext -> Aff Unit -overridePermissions origin perms ctx = Promise.toAffE $ _overridePermissions origin (Set.toUnfoldable perms) ctx +overridePermissions origin perms ctx = FFI.promiseToAff $ _overridePermissions origin (Set.toUnfoldable perms) ctx clearPermissionOverrides :: BrowserContext -> Aff Unit -clearPermissionOverrides = Promise.toAffE <<< _clearPermissionOverrides +clearPermissionOverrides = FFI.promiseToAff <<< _clearPermissionOverrides close :: BrowserContext -> Aff Unit -close = Promise.toAffE <<< _close +close = FFI.promiseToAff <<< _close diff --git a/src/Puppeteer.Browser.purs b/src/Puppeteer.Browser.purs index 8f4be3e..e4309f2 100644 --- a/src/Puppeteer.Browser.purs +++ b/src/Puppeteer.Browser.purs @@ -117,4 +117,4 @@ get :: forall b. BrowserAccess b => b -> Effect Browser get = _get <<< unsafeToForeign close :: Browser -> Aff Unit -close = Promise.toAffE <<< _close +close = FFI.promiseToAff <<< _close diff --git a/src/Puppeteer.CDPSession.Command.purs b/src/Puppeteer.CDPSession.Command.purs index c5a6ee2..363e2b4 100644 --- a/src/Puppeteer.CDPSession.Command.purs +++ b/src/Puppeteer.CDPSession.Command.purs @@ -8,1710 +8,1711 @@ import Effect (Effect) import Effect.Aff (Aff) import Foreign (Foreign) import Puppeteer.Base (CDPSession) +import Puppeteer.FFI as FFI foreign import send :: Foreign -> String -> CDPSession -> Effect (Promise Foreign) foreign import send0 :: String -> CDPSession -> Effect (Promise Foreign) consoleClearMessages :: CDPSession -> Aff Unit -consoleClearMessages = void <<< Promise.toAffE <<< send0 "Console.clearMessages" +consoleClearMessages = void <<< FFI.promiseToAff <<< send0 "Console.clearMessages" consoleDisable :: CDPSession -> Aff Unit -consoleDisable = void <<< Promise.toAffE <<< send0 "Console.disable" +consoleDisable = void <<< FFI.promiseToAff <<< send0 "Console.disable" consoleEnable :: CDPSession -> Aff Unit -consoleEnable = void <<< Promise.toAffE <<< send0 "Console.enable" +consoleEnable = void <<< FFI.promiseToAff <<< send0 "Console.enable" debuggerContinueToLocation :: Foreign -> CDPSession -> Aff Unit -debuggerContinueToLocation p = void <<< Promise.toAffE <<< send p "Debugger.continueToLocation" +debuggerContinueToLocation p = void <<< FFI.promiseToAff <<< send p "Debugger.continueToLocation" debuggerDisable :: CDPSession -> Aff Unit -debuggerDisable = void <<< Promise.toAffE <<< send0 "Debugger.disable" +debuggerDisable = void <<< FFI.promiseToAff <<< send0 "Debugger.disable" debuggerEnable :: Foreign -> CDPSession -> Aff Foreign -debuggerEnable p = Promise.toAffE <<< send p "Debugger.enable" +debuggerEnable p = FFI.promiseToAff <<< send p "Debugger.enable" debuggerEvaluateOnCallFrame :: Foreign -> CDPSession -> Aff Foreign -debuggerEvaluateOnCallFrame p = Promise.toAffE <<< send p "Debugger.evaluateOnCallFrame" +debuggerEvaluateOnCallFrame p = FFI.promiseToAff <<< send p "Debugger.evaluateOnCallFrame" debuggerGetPossibleBreakpoints :: Foreign -> CDPSession -> Aff Foreign -debuggerGetPossibleBreakpoints p = Promise.toAffE <<< send p "Debugger.getPossibleBreakpoints" +debuggerGetPossibleBreakpoints p = FFI.promiseToAff <<< send p "Debugger.getPossibleBreakpoints" debuggerGetScriptSource :: Foreign -> CDPSession -> Aff Foreign -debuggerGetScriptSource p = Promise.toAffE <<< send p "Debugger.getScriptSource" +debuggerGetScriptSource p = FFI.promiseToAff <<< send p "Debugger.getScriptSource" debuggerDisassembleWasmModule :: Foreign -> CDPSession -> Aff Foreign -debuggerDisassembleWasmModule p = Promise.toAffE <<< send p "Debugger.disassembleWasmModule" +debuggerDisassembleWasmModule p = FFI.promiseToAff <<< send p "Debugger.disassembleWasmModule" debuggerNextWasmDisassemblyChunk :: Foreign -> CDPSession -> Aff Foreign -debuggerNextWasmDisassemblyChunk p = Promise.toAffE <<< send p "Debugger.nextWasmDisassemblyChunk" +debuggerNextWasmDisassemblyChunk p = FFI.promiseToAff <<< send p "Debugger.nextWasmDisassemblyChunk" debuggerGetWasmBytecode :: Foreign -> CDPSession -> Aff Foreign -debuggerGetWasmBytecode p = Promise.toAffE <<< send p "Debugger.getWasmBytecode" +debuggerGetWasmBytecode p = FFI.promiseToAff <<< send p "Debugger.getWasmBytecode" debuggerGetStackTrace :: Foreign -> CDPSession -> Aff Foreign -debuggerGetStackTrace p = Promise.toAffE <<< send p "Debugger.getStackTrace" +debuggerGetStackTrace p = FFI.promiseToAff <<< send p "Debugger.getStackTrace" debuggerPause :: CDPSession -> Aff Unit -debuggerPause = void <<< Promise.toAffE <<< send0 "Debugger.pause" +debuggerPause = void <<< FFI.promiseToAff <<< send0 "Debugger.pause" debuggerPauseOnAsyncCall :: Foreign -> CDPSession -> Aff Unit -debuggerPauseOnAsyncCall p = void <<< Promise.toAffE <<< send p "Debugger.pauseOnAsyncCall" +debuggerPauseOnAsyncCall p = void <<< FFI.promiseToAff <<< send p "Debugger.pauseOnAsyncCall" debuggerRemoveBreakpoint :: Foreign -> CDPSession -> Aff Unit -debuggerRemoveBreakpoint p = void <<< Promise.toAffE <<< send p "Debugger.removeBreakpoint" +debuggerRemoveBreakpoint p = void <<< FFI.promiseToAff <<< send p "Debugger.removeBreakpoint" debuggerRestartFrame :: Foreign -> CDPSession -> Aff Foreign -debuggerRestartFrame p = Promise.toAffE <<< send p "Debugger.restartFrame" +debuggerRestartFrame p = FFI.promiseToAff <<< send p "Debugger.restartFrame" debuggerResume :: Foreign -> CDPSession -> Aff Unit -debuggerResume p = void <<< Promise.toAffE <<< send p "Debugger.resume" +debuggerResume p = void <<< FFI.promiseToAff <<< send p "Debugger.resume" debuggerSearchInContent :: Foreign -> CDPSession -> Aff Foreign -debuggerSearchInContent p = Promise.toAffE <<< send p "Debugger.searchInContent" +debuggerSearchInContent p = FFI.promiseToAff <<< send p "Debugger.searchInContent" debuggerSetAsyncCallStackDepth :: Foreign -> CDPSession -> Aff Unit -debuggerSetAsyncCallStackDepth p = void <<< Promise.toAffE <<< send p "Debugger.setAsyncCallStackDepth" +debuggerSetAsyncCallStackDepth p = void <<< FFI.promiseToAff <<< send p "Debugger.setAsyncCallStackDepth" debuggerSetBlackboxPatterns :: Foreign -> CDPSession -> Aff Unit -debuggerSetBlackboxPatterns p = void <<< Promise.toAffE <<< send p "Debugger.setBlackboxPatterns" +debuggerSetBlackboxPatterns p = void <<< FFI.promiseToAff <<< send p "Debugger.setBlackboxPatterns" debuggerSetBlackboxedRanges :: Foreign -> CDPSession -> Aff Unit -debuggerSetBlackboxedRanges p = void <<< Promise.toAffE <<< send p "Debugger.setBlackboxedRanges" +debuggerSetBlackboxedRanges p = void <<< FFI.promiseToAff <<< send p "Debugger.setBlackboxedRanges" debuggerSetBreakpoint :: Foreign -> CDPSession -> Aff Foreign -debuggerSetBreakpoint p = Promise.toAffE <<< send p "Debugger.setBreakpoint" +debuggerSetBreakpoint p = FFI.promiseToAff <<< send p "Debugger.setBreakpoint" debuggerSetInstrumentationBreakpoint :: Foreign -> CDPSession -> Aff Foreign -debuggerSetInstrumentationBreakpoint p = Promise.toAffE <<< send p "Debugger.setInstrumentationBreakpoint" +debuggerSetInstrumentationBreakpoint p = FFI.promiseToAff <<< send p "Debugger.setInstrumentationBreakpoint" debuggerSetBreakpointByUrl :: Foreign -> CDPSession -> Aff Foreign -debuggerSetBreakpointByUrl p = Promise.toAffE <<< send p "Debugger.setBreakpointByUrl" +debuggerSetBreakpointByUrl p = FFI.promiseToAff <<< send p "Debugger.setBreakpointByUrl" debuggerSetBreakpointOnFunctionCall :: Foreign -> CDPSession -> Aff Foreign -debuggerSetBreakpointOnFunctionCall p = Promise.toAffE <<< send p "Debugger.setBreakpointOnFunctionCall" +debuggerSetBreakpointOnFunctionCall p = FFI.promiseToAff <<< send p "Debugger.setBreakpointOnFunctionCall" debuggerSetBreakpointsActive :: Foreign -> CDPSession -> Aff Unit -debuggerSetBreakpointsActive p = void <<< Promise.toAffE <<< send p "Debugger.setBreakpointsActive" +debuggerSetBreakpointsActive p = void <<< FFI.promiseToAff <<< send p "Debugger.setBreakpointsActive" debuggerSetPauseOnExceptions :: Foreign -> CDPSession -> Aff Unit -debuggerSetPauseOnExceptions p = void <<< Promise.toAffE <<< send p "Debugger.setPauseOnExceptions" +debuggerSetPauseOnExceptions p = void <<< FFI.promiseToAff <<< send p "Debugger.setPauseOnExceptions" debuggerSetReturnValue :: Foreign -> CDPSession -> Aff Unit -debuggerSetReturnValue p = void <<< Promise.toAffE <<< send p "Debugger.setReturnValue" +debuggerSetReturnValue p = void <<< FFI.promiseToAff <<< send p "Debugger.setReturnValue" debuggerSetScriptSource :: Foreign -> CDPSession -> Aff Foreign -debuggerSetScriptSource p = Promise.toAffE <<< send p "Debugger.setScriptSource" +debuggerSetScriptSource p = FFI.promiseToAff <<< send p "Debugger.setScriptSource" debuggerSetSkipAllPauses :: Foreign -> CDPSession -> Aff Unit -debuggerSetSkipAllPauses p = void <<< Promise.toAffE <<< send p "Debugger.setSkipAllPauses" +debuggerSetSkipAllPauses p = void <<< FFI.promiseToAff <<< send p "Debugger.setSkipAllPauses" debuggerSetVariableValue :: Foreign -> CDPSession -> Aff Unit -debuggerSetVariableValue p = void <<< Promise.toAffE <<< send p "Debugger.setVariableValue" +debuggerSetVariableValue p = void <<< FFI.promiseToAff <<< send p "Debugger.setVariableValue" debuggerStepInto :: Foreign -> CDPSession -> Aff Unit -debuggerStepInto p = void <<< Promise.toAffE <<< send p "Debugger.stepInto" +debuggerStepInto p = void <<< FFI.promiseToAff <<< send p "Debugger.stepInto" debuggerStepOut :: CDPSession -> Aff Unit -debuggerStepOut = void <<< Promise.toAffE <<< send0 "Debugger.stepOut" +debuggerStepOut = void <<< FFI.promiseToAff <<< send0 "Debugger.stepOut" debuggerStepOver :: Foreign -> CDPSession -> Aff Unit -debuggerStepOver p = void <<< Promise.toAffE <<< send p "Debugger.stepOver" +debuggerStepOver p = void <<< FFI.promiseToAff <<< send p "Debugger.stepOver" heapProfilerAddInspectedHeapObject :: Foreign -> CDPSession -> Aff Unit -heapProfilerAddInspectedHeapObject p = void <<< Promise.toAffE <<< send p "HeapProfiler.addInspectedHeapObject" +heapProfilerAddInspectedHeapObject p = void <<< FFI.promiseToAff <<< send p "HeapProfiler.addInspectedHeapObject" heapProfilerCollectGarbage :: CDPSession -> Aff Unit -heapProfilerCollectGarbage = void <<< Promise.toAffE <<< send0 "HeapProfiler.collectGarbage" +heapProfilerCollectGarbage = void <<< FFI.promiseToAff <<< send0 "HeapProfiler.collectGarbage" heapProfilerDisable :: CDPSession -> Aff Unit -heapProfilerDisable = void <<< Promise.toAffE <<< send0 "HeapProfiler.disable" +heapProfilerDisable = void <<< FFI.promiseToAff <<< send0 "HeapProfiler.disable" heapProfilerEnable :: CDPSession -> Aff Unit -heapProfilerEnable = void <<< Promise.toAffE <<< send0 "HeapProfiler.enable" +heapProfilerEnable = void <<< FFI.promiseToAff <<< send0 "HeapProfiler.enable" heapProfilerGetHeapObjectId :: Foreign -> CDPSession -> Aff Foreign -heapProfilerGetHeapObjectId p = Promise.toAffE <<< send p "HeapProfiler.getHeapObjectId" +heapProfilerGetHeapObjectId p = FFI.promiseToAff <<< send p "HeapProfiler.getHeapObjectId" heapProfilerGetObjectByHeapObjectId :: Foreign -> CDPSession -> Aff Foreign -heapProfilerGetObjectByHeapObjectId p = Promise.toAffE <<< send p "HeapProfiler.getObjectByHeapObjectId" +heapProfilerGetObjectByHeapObjectId p = FFI.promiseToAff <<< send p "HeapProfiler.getObjectByHeapObjectId" heapProfilerGetSamplingProfile :: Foreign -> CDPSession -> Aff Foreign -heapProfilerGetSamplingProfile p = Promise.toAffE <<< send p "HeapProfiler.getSamplingProfile" +heapProfilerGetSamplingProfile p = FFI.promiseToAff <<< send p "HeapProfiler.getSamplingProfile" heapProfilerStartSampling :: Foreign -> CDPSession -> Aff Unit -heapProfilerStartSampling p = void <<< Promise.toAffE <<< send p "HeapProfiler.startSampling" +heapProfilerStartSampling p = void <<< FFI.promiseToAff <<< send p "HeapProfiler.startSampling" heapProfilerStartTrackingHeapObjects :: Foreign -> CDPSession -> Aff Unit -heapProfilerStartTrackingHeapObjects p = void <<< Promise.toAffE <<< send p "HeapProfiler.startTrackingHeapObjects" +heapProfilerStartTrackingHeapObjects p = void <<< FFI.promiseToAff <<< send p "HeapProfiler.startTrackingHeapObjects" heapProfilerStopSampling :: Foreign -> CDPSession -> Aff Foreign -heapProfilerStopSampling p = Promise.toAffE <<< send p "HeapProfiler.stopSampling" +heapProfilerStopSampling p = FFI.promiseToAff <<< send p "HeapProfiler.stopSampling" heapProfilerStopTrackingHeapObjects :: Foreign -> CDPSession -> Aff Unit -heapProfilerStopTrackingHeapObjects p = void <<< Promise.toAffE <<< send p "HeapProfiler.stopTrackingHeapObjects" +heapProfilerStopTrackingHeapObjects p = void <<< FFI.promiseToAff <<< send p "HeapProfiler.stopTrackingHeapObjects" heapProfilerTakeHeapSnapshot :: Foreign -> CDPSession -> Aff Unit -heapProfilerTakeHeapSnapshot p = void <<< Promise.toAffE <<< send p "HeapProfiler.takeHeapSnapshot" +heapProfilerTakeHeapSnapshot p = void <<< FFI.promiseToAff <<< send p "HeapProfiler.takeHeapSnapshot" profilerDisable :: CDPSession -> Aff Unit -profilerDisable = void <<< Promise.toAffE <<< send0 "Profiler.disable" +profilerDisable = void <<< FFI.promiseToAff <<< send0 "Profiler.disable" profilerEnable :: CDPSession -> Aff Unit -profilerEnable = void <<< Promise.toAffE <<< send0 "Profiler.enable" +profilerEnable = void <<< FFI.promiseToAff <<< send0 "Profiler.enable" profilerGetBestEffortCoverage :: Foreign -> CDPSession -> Aff Foreign -profilerGetBestEffortCoverage p = Promise.toAffE <<< send p "Profiler.getBestEffortCoverage" +profilerGetBestEffortCoverage p = FFI.promiseToAff <<< send p "Profiler.getBestEffortCoverage" profilerSetSamplingInterval :: Foreign -> CDPSession -> Aff Unit -profilerSetSamplingInterval p = void <<< Promise.toAffE <<< send p "Profiler.setSamplingInterval" +profilerSetSamplingInterval p = void <<< FFI.promiseToAff <<< send p "Profiler.setSamplingInterval" profilerStart :: CDPSession -> Aff Unit -profilerStart = void <<< Promise.toAffE <<< send0 "Profiler.start" +profilerStart = void <<< FFI.promiseToAff <<< send0 "Profiler.start" profilerStartPreciseCoverage :: Foreign -> CDPSession -> Aff Foreign -profilerStartPreciseCoverage p = Promise.toAffE <<< send p "Profiler.startPreciseCoverage" +profilerStartPreciseCoverage p = FFI.promiseToAff <<< send p "Profiler.startPreciseCoverage" profilerStop :: Foreign -> CDPSession -> Aff Foreign -profilerStop p = Promise.toAffE <<< send p "Profiler.stop" +profilerStop p = FFI.promiseToAff <<< send p "Profiler.stop" profilerStopPreciseCoverage :: CDPSession -> Aff Unit -profilerStopPreciseCoverage = void <<< Promise.toAffE <<< send0 "Profiler.stopPreciseCoverage" +profilerStopPreciseCoverage = void <<< FFI.promiseToAff <<< send0 "Profiler.stopPreciseCoverage" profilerTakePreciseCoverage :: Foreign -> CDPSession -> Aff Foreign -profilerTakePreciseCoverage p = Promise.toAffE <<< send p "Profiler.takePreciseCoverage" +profilerTakePreciseCoverage p = FFI.promiseToAff <<< send p "Profiler.takePreciseCoverage" runtimeAwaitPromise :: Foreign -> CDPSession -> Aff Foreign -runtimeAwaitPromise p = Promise.toAffE <<< send p "Runtime.awaitPromise" +runtimeAwaitPromise p = FFI.promiseToAff <<< send p "Runtime.awaitPromise" runtimeCallFunctionOn :: Foreign -> CDPSession -> Aff Foreign -runtimeCallFunctionOn p = Promise.toAffE <<< send p "Runtime.callFunctionOn" +runtimeCallFunctionOn p = FFI.promiseToAff <<< send p "Runtime.callFunctionOn" runtimeCompileScript :: Foreign -> CDPSession -> Aff Foreign -runtimeCompileScript p = Promise.toAffE <<< send p "Runtime.compileScript" +runtimeCompileScript p = FFI.promiseToAff <<< send p "Runtime.compileScript" runtimeDisable :: CDPSession -> Aff Unit -runtimeDisable = void <<< Promise.toAffE <<< send0 "Runtime.disable" +runtimeDisable = void <<< FFI.promiseToAff <<< send0 "Runtime.disable" runtimeDiscardConsoleEntries :: CDPSession -> Aff Unit -runtimeDiscardConsoleEntries = void <<< Promise.toAffE <<< send0 "Runtime.discardConsoleEntries" +runtimeDiscardConsoleEntries = void <<< FFI.promiseToAff <<< send0 "Runtime.discardConsoleEntries" runtimeEnable :: CDPSession -> Aff Unit -runtimeEnable = void <<< Promise.toAffE <<< send0 "Runtime.enable" +runtimeEnable = void <<< FFI.promiseToAff <<< send0 "Runtime.enable" runtimeEvaluate :: Foreign -> CDPSession -> Aff Foreign -runtimeEvaluate p = Promise.toAffE <<< send p "Runtime.evaluate" +runtimeEvaluate p = FFI.promiseToAff <<< send p "Runtime.evaluate" runtimeGetIsolateId :: Foreign -> CDPSession -> Aff Foreign -runtimeGetIsolateId p = Promise.toAffE <<< send p "Runtime.getIsolateId" +runtimeGetIsolateId p = FFI.promiseToAff <<< send p "Runtime.getIsolateId" runtimeGetHeapUsage :: Foreign -> CDPSession -> Aff Foreign -runtimeGetHeapUsage p = Promise.toAffE <<< send p "Runtime.getHeapUsage" +runtimeGetHeapUsage p = FFI.promiseToAff <<< send p "Runtime.getHeapUsage" runtimeGetProperties :: Foreign -> CDPSession -> Aff Foreign -runtimeGetProperties p = Promise.toAffE <<< send p "Runtime.getProperties" +runtimeGetProperties p = FFI.promiseToAff <<< send p "Runtime.getProperties" runtimeGlobalLexicalScopeNames :: Foreign -> CDPSession -> Aff Foreign -runtimeGlobalLexicalScopeNames p = Promise.toAffE <<< send p "Runtime.globalLexicalScopeNames" +runtimeGlobalLexicalScopeNames p = FFI.promiseToAff <<< send p "Runtime.globalLexicalScopeNames" runtimeQueryObjects :: Foreign -> CDPSession -> Aff Foreign -runtimeQueryObjects p = Promise.toAffE <<< send p "Runtime.queryObjects" +runtimeQueryObjects p = FFI.promiseToAff <<< send p "Runtime.queryObjects" runtimeReleaseObject :: Foreign -> CDPSession -> Aff Unit -runtimeReleaseObject p = void <<< Promise.toAffE <<< send p "Runtime.releaseObject" +runtimeReleaseObject p = void <<< FFI.promiseToAff <<< send p "Runtime.releaseObject" runtimeReleaseObjectGroup :: Foreign -> CDPSession -> Aff Unit -runtimeReleaseObjectGroup p = void <<< Promise.toAffE <<< send p "Runtime.releaseObjectGroup" +runtimeReleaseObjectGroup p = void <<< FFI.promiseToAff <<< send p "Runtime.releaseObjectGroup" runtimeRunIfWaitingForDebugger :: CDPSession -> Aff Unit -runtimeRunIfWaitingForDebugger = void <<< Promise.toAffE <<< send0 "Runtime.runIfWaitingForDebugger" +runtimeRunIfWaitingForDebugger = void <<< FFI.promiseToAff <<< send0 "Runtime.runIfWaitingForDebugger" runtimeRunScript :: Foreign -> CDPSession -> Aff Foreign -runtimeRunScript p = Promise.toAffE <<< send p "Runtime.runScript" +runtimeRunScript p = FFI.promiseToAff <<< send p "Runtime.runScript" runtimeSetAsyncCallStackDepth :: Foreign -> CDPSession -> Aff Unit -runtimeSetAsyncCallStackDepth p = void <<< Promise.toAffE <<< send p "Runtime.setAsyncCallStackDepth" +runtimeSetAsyncCallStackDepth p = void <<< FFI.promiseToAff <<< send p "Runtime.setAsyncCallStackDepth" runtimeSetCustomObjectFormatterEnabled :: Foreign -> CDPSession -> Aff Unit -runtimeSetCustomObjectFormatterEnabled p = void <<< Promise.toAffE <<< send p "Runtime.setCustomObjectFormatterEnabled" +runtimeSetCustomObjectFormatterEnabled p = void <<< FFI.promiseToAff <<< send p "Runtime.setCustomObjectFormatterEnabled" runtimeSetMaxCallStackSizeToCapture :: Foreign -> CDPSession -> Aff Unit -runtimeSetMaxCallStackSizeToCapture p = void <<< Promise.toAffE <<< send p "Runtime.setMaxCallStackSizeToCapture" +runtimeSetMaxCallStackSizeToCapture p = void <<< FFI.promiseToAff <<< send p "Runtime.setMaxCallStackSizeToCapture" runtimeTerminateExecution :: CDPSession -> Aff Unit -runtimeTerminateExecution = void <<< Promise.toAffE <<< send0 "Runtime.terminateExecution" +runtimeTerminateExecution = void <<< FFI.promiseToAff <<< send0 "Runtime.terminateExecution" runtimeAddBinding :: Foreign -> CDPSession -> Aff Unit -runtimeAddBinding p = void <<< Promise.toAffE <<< send p "Runtime.addBinding" +runtimeAddBinding p = void <<< FFI.promiseToAff <<< send p "Runtime.addBinding" runtimeRemoveBinding :: Foreign -> CDPSession -> Aff Unit -runtimeRemoveBinding p = void <<< Promise.toAffE <<< send p "Runtime.removeBinding" +runtimeRemoveBinding p = void <<< FFI.promiseToAff <<< send p "Runtime.removeBinding" runtimeGetExceptionDetails :: Foreign -> CDPSession -> Aff Foreign -runtimeGetExceptionDetails p = Promise.toAffE <<< send p "Runtime.getExceptionDetails" +runtimeGetExceptionDetails p = FFI.promiseToAff <<< send p "Runtime.getExceptionDetails" schemaGetDomains :: Foreign -> CDPSession -> Aff Foreign -schemaGetDomains p = Promise.toAffE <<< send p "Schema.getDomains" +schemaGetDomains p = FFI.promiseToAff <<< send p "Schema.getDomains" accessibilityDisable :: CDPSession -> Aff Unit -accessibilityDisable = void <<< Promise.toAffE <<< send0 "Accessibility.disable" +accessibilityDisable = void <<< FFI.promiseToAff <<< send0 "Accessibility.disable" accessibilityEnable :: CDPSession -> Aff Unit -accessibilityEnable = void <<< Promise.toAffE <<< send0 "Accessibility.enable" +accessibilityEnable = void <<< FFI.promiseToAff <<< send0 "Accessibility.enable" accessibilityGetPartialAXTree :: Foreign -> CDPSession -> Aff Foreign -accessibilityGetPartialAXTree p = Promise.toAffE <<< send p "Accessibility.getPartialAXTree" +accessibilityGetPartialAXTree p = FFI.promiseToAff <<< send p "Accessibility.getPartialAXTree" accessibilityGetFullAXTree :: Foreign -> CDPSession -> Aff Foreign -accessibilityGetFullAXTree p = Promise.toAffE <<< send p "Accessibility.getFullAXTree" +accessibilityGetFullAXTree p = FFI.promiseToAff <<< send p "Accessibility.getFullAXTree" accessibilityGetRootAXNode :: Foreign -> CDPSession -> Aff Foreign -accessibilityGetRootAXNode p = Promise.toAffE <<< send p "Accessibility.getRootAXNode" +accessibilityGetRootAXNode p = FFI.promiseToAff <<< send p "Accessibility.getRootAXNode" accessibilityGetAXNodeAndAncestors :: Foreign -> CDPSession -> Aff Foreign -accessibilityGetAXNodeAndAncestors p = Promise.toAffE <<< send p "Accessibility.getAXNodeAndAncestors" +accessibilityGetAXNodeAndAncestors p = FFI.promiseToAff <<< send p "Accessibility.getAXNodeAndAncestors" accessibilityGetChildAXNodes :: Foreign -> CDPSession -> Aff Foreign -accessibilityGetChildAXNodes p = Promise.toAffE <<< send p "Accessibility.getChildAXNodes" +accessibilityGetChildAXNodes p = FFI.promiseToAff <<< send p "Accessibility.getChildAXNodes" accessibilityQueryAXTree :: Foreign -> CDPSession -> Aff Foreign -accessibilityQueryAXTree p = Promise.toAffE <<< send p "Accessibility.queryAXTree" +accessibilityQueryAXTree p = FFI.promiseToAff <<< send p "Accessibility.queryAXTree" animationDisable :: CDPSession -> Aff Unit -animationDisable = void <<< Promise.toAffE <<< send0 "Animation.disable" +animationDisable = void <<< FFI.promiseToAff <<< send0 "Animation.disable" animationEnable :: CDPSession -> Aff Unit -animationEnable = void <<< Promise.toAffE <<< send0 "Animation.enable" +animationEnable = void <<< FFI.promiseToAff <<< send0 "Animation.enable" animationGetCurrentTime :: Foreign -> CDPSession -> Aff Foreign -animationGetCurrentTime p = Promise.toAffE <<< send p "Animation.getCurrentTime" +animationGetCurrentTime p = FFI.promiseToAff <<< send p "Animation.getCurrentTime" animationGetPlaybackRate :: Foreign -> CDPSession -> Aff Foreign -animationGetPlaybackRate p = Promise.toAffE <<< send p "Animation.getPlaybackRate" +animationGetPlaybackRate p = FFI.promiseToAff <<< send p "Animation.getPlaybackRate" animationReleaseAnimations :: Foreign -> CDPSession -> Aff Unit -animationReleaseAnimations p = void <<< Promise.toAffE <<< send p "Animation.releaseAnimations" +animationReleaseAnimations p = void <<< FFI.promiseToAff <<< send p "Animation.releaseAnimations" animationResolveAnimation :: Foreign -> CDPSession -> Aff Foreign -animationResolveAnimation p = Promise.toAffE <<< send p "Animation.resolveAnimation" +animationResolveAnimation p = FFI.promiseToAff <<< send p "Animation.resolveAnimation" animationSeekAnimations :: Foreign -> CDPSession -> Aff Unit -animationSeekAnimations p = void <<< Promise.toAffE <<< send p "Animation.seekAnimations" +animationSeekAnimations p = void <<< FFI.promiseToAff <<< send p "Animation.seekAnimations" animationSetPaused :: Foreign -> CDPSession -> Aff Unit -animationSetPaused p = void <<< Promise.toAffE <<< send p "Animation.setPaused" +animationSetPaused p = void <<< FFI.promiseToAff <<< send p "Animation.setPaused" animationSetPlaybackRate :: Foreign -> CDPSession -> Aff Unit -animationSetPlaybackRate p = void <<< Promise.toAffE <<< send p "Animation.setPlaybackRate" +animationSetPlaybackRate p = void <<< FFI.promiseToAff <<< send p "Animation.setPlaybackRate" animationSetTiming :: Foreign -> CDPSession -> Aff Unit -animationSetTiming p = void <<< Promise.toAffE <<< send p "Animation.setTiming" +animationSetTiming p = void <<< FFI.promiseToAff <<< send p "Animation.setTiming" auditsGetEncodedResponse :: Foreign -> CDPSession -> Aff Foreign -auditsGetEncodedResponse p = Promise.toAffE <<< send p "Audits.getEncodedResponse" +auditsGetEncodedResponse p = FFI.promiseToAff <<< send p "Audits.getEncodedResponse" auditsDisable :: CDPSession -> Aff Unit -auditsDisable = void <<< Promise.toAffE <<< send0 "Audits.disable" +auditsDisable = void <<< FFI.promiseToAff <<< send0 "Audits.disable" auditsEnable :: CDPSession -> Aff Unit -auditsEnable = void <<< Promise.toAffE <<< send0 "Audits.enable" +auditsEnable = void <<< FFI.promiseToAff <<< send0 "Audits.enable" auditsCheckContrast :: Foreign -> CDPSession -> Aff Unit -auditsCheckContrast p = void <<< Promise.toAffE <<< send p "Audits.checkContrast" +auditsCheckContrast p = void <<< FFI.promiseToAff <<< send p "Audits.checkContrast" auditsCheckFormsIssues :: Foreign -> CDPSession -> Aff Foreign -auditsCheckFormsIssues p = Promise.toAffE <<< send p "Audits.checkFormsIssues" +auditsCheckFormsIssues p = FFI.promiseToAff <<< send p "Audits.checkFormsIssues" autofillTrigger :: Foreign -> CDPSession -> Aff Unit -autofillTrigger p = void <<< Promise.toAffE <<< send p "Autofill.trigger" +autofillTrigger p = void <<< FFI.promiseToAff <<< send p "Autofill.trigger" autofillSetAddresses :: Foreign -> CDPSession -> Aff Unit -autofillSetAddresses p = void <<< Promise.toAffE <<< send p "Autofill.setAddresses" +autofillSetAddresses p = void <<< FFI.promiseToAff <<< send p "Autofill.setAddresses" backgroundServiceStartObserving :: Foreign -> CDPSession -> Aff Unit -backgroundServiceStartObserving p = void <<< Promise.toAffE <<< send p "BackgroundService.startObserving" +backgroundServiceStartObserving p = void <<< FFI.promiseToAff <<< send p "BackgroundService.startObserving" backgroundServiceStopObserving :: Foreign -> CDPSession -> Aff Unit -backgroundServiceStopObserving p = void <<< Promise.toAffE <<< send p "BackgroundService.stopObserving" +backgroundServiceStopObserving p = void <<< FFI.promiseToAff <<< send p "BackgroundService.stopObserving" backgroundServiceSetRecording :: Foreign -> CDPSession -> Aff Unit -backgroundServiceSetRecording p = void <<< Promise.toAffE <<< send p "BackgroundService.setRecording" +backgroundServiceSetRecording p = void <<< FFI.promiseToAff <<< send p "BackgroundService.setRecording" backgroundServiceClearEvents :: Foreign -> CDPSession -> Aff Unit -backgroundServiceClearEvents p = void <<< Promise.toAffE <<< send p "BackgroundService.clearEvents" +backgroundServiceClearEvents p = void <<< FFI.promiseToAff <<< send p "BackgroundService.clearEvents" browserSetPermission :: Foreign -> CDPSession -> Aff Unit -browserSetPermission p = void <<< Promise.toAffE <<< send p "Browser.setPermission" +browserSetPermission p = void <<< FFI.promiseToAff <<< send p "Browser.setPermission" browserGrantPermissions :: Foreign -> CDPSession -> Aff Unit -browserGrantPermissions p = void <<< Promise.toAffE <<< send p "Browser.grantPermissions" +browserGrantPermissions p = void <<< FFI.promiseToAff <<< send p "Browser.grantPermissions" browserResetPermissions :: Foreign -> CDPSession -> Aff Unit -browserResetPermissions p = void <<< Promise.toAffE <<< send p "Browser.resetPermissions" +browserResetPermissions p = void <<< FFI.promiseToAff <<< send p "Browser.resetPermissions" browserSetDownloadBehavior :: Foreign -> CDPSession -> Aff Unit -browserSetDownloadBehavior p = void <<< Promise.toAffE <<< send p "Browser.setDownloadBehavior" +browserSetDownloadBehavior p = void <<< FFI.promiseToAff <<< send p "Browser.setDownloadBehavior" browserCancelDownload :: Foreign -> CDPSession -> Aff Unit -browserCancelDownload p = void <<< Promise.toAffE <<< send p "Browser.cancelDownload" +browserCancelDownload p = void <<< FFI.promiseToAff <<< send p "Browser.cancelDownload" browserClose :: CDPSession -> Aff Unit -browserClose = void <<< Promise.toAffE <<< send0 "Browser.close" +browserClose = void <<< FFI.promiseToAff <<< send0 "Browser.close" browserCrash :: CDPSession -> Aff Unit -browserCrash = void <<< Promise.toAffE <<< send0 "Browser.crash" +browserCrash = void <<< FFI.promiseToAff <<< send0 "Browser.crash" browserCrashGpuProcess :: CDPSession -> Aff Unit -browserCrashGpuProcess = void <<< Promise.toAffE <<< send0 "Browser.crashGpuProcess" +browserCrashGpuProcess = void <<< FFI.promiseToAff <<< send0 "Browser.crashGpuProcess" browserGetVersion :: Foreign -> CDPSession -> Aff Foreign -browserGetVersion p = Promise.toAffE <<< send p "Browser.getVersion" +browserGetVersion p = FFI.promiseToAff <<< send p "Browser.getVersion" browserGetBrowserCommandLine :: Foreign -> CDPSession -> Aff Foreign -browserGetBrowserCommandLine p = Promise.toAffE <<< send p "Browser.getBrowserCommandLine" +browserGetBrowserCommandLine p = FFI.promiseToAff <<< send p "Browser.getBrowserCommandLine" browserGetHistograms :: Foreign -> CDPSession -> Aff Foreign -browserGetHistograms p = Promise.toAffE <<< send p "Browser.getHistograms" +browserGetHistograms p = FFI.promiseToAff <<< send p "Browser.getHistograms" browserGetHistogram :: Foreign -> CDPSession -> Aff Foreign -browserGetHistogram p = Promise.toAffE <<< send p "Browser.getHistogram" +browserGetHistogram p = FFI.promiseToAff <<< send p "Browser.getHistogram" browserGetWindowBounds :: Foreign -> CDPSession -> Aff Foreign -browserGetWindowBounds p = Promise.toAffE <<< send p "Browser.getWindowBounds" +browserGetWindowBounds p = FFI.promiseToAff <<< send p "Browser.getWindowBounds" browserGetWindowForTarget :: Foreign -> CDPSession -> Aff Foreign -browserGetWindowForTarget p = Promise.toAffE <<< send p "Browser.getWindowForTarget" +browserGetWindowForTarget p = FFI.promiseToAff <<< send p "Browser.getWindowForTarget" browserSetWindowBounds :: Foreign -> CDPSession -> Aff Unit -browserSetWindowBounds p = void <<< Promise.toAffE <<< send p "Browser.setWindowBounds" +browserSetWindowBounds p = void <<< FFI.promiseToAff <<< send p "Browser.setWindowBounds" browserSetDockTile :: Foreign -> CDPSession -> Aff Unit -browserSetDockTile p = void <<< Promise.toAffE <<< send p "Browser.setDockTile" +browserSetDockTile p = void <<< FFI.promiseToAff <<< send p "Browser.setDockTile" browserExecuteBrowserCommand :: Foreign -> CDPSession -> Aff Unit -browserExecuteBrowserCommand p = void <<< Promise.toAffE <<< send p "Browser.executeBrowserCommand" +browserExecuteBrowserCommand p = void <<< FFI.promiseToAff <<< send p "Browser.executeBrowserCommand" browserAddPrivacySandboxEnrollmentOverride :: Foreign -> CDPSession -> Aff Unit -browserAddPrivacySandboxEnrollmentOverride p = void <<< Promise.toAffE <<< send p "Browser.addPrivacySandboxEnrollmentOverride" +browserAddPrivacySandboxEnrollmentOverride p = void <<< FFI.promiseToAff <<< send p "Browser.addPrivacySandboxEnrollmentOverride" cSSAddRule :: Foreign -> CDPSession -> Aff Foreign -cSSAddRule p = Promise.toAffE <<< send p "CSS.addRule" +cSSAddRule p = FFI.promiseToAff <<< send p "CSS.addRule" cSSCollectClassNames :: Foreign -> CDPSession -> Aff Foreign -cSSCollectClassNames p = Promise.toAffE <<< send p "CSS.collectClassNames" +cSSCollectClassNames p = FFI.promiseToAff <<< send p "CSS.collectClassNames" cSSCreateStyleSheet :: Foreign -> CDPSession -> Aff Foreign -cSSCreateStyleSheet p = Promise.toAffE <<< send p "CSS.createStyleSheet" +cSSCreateStyleSheet p = FFI.promiseToAff <<< send p "CSS.createStyleSheet" cSSDisable :: CDPSession -> Aff Unit -cSSDisable = void <<< Promise.toAffE <<< send0 "CSS.disable" +cSSDisable = void <<< FFI.promiseToAff <<< send0 "CSS.disable" cSSEnable :: CDPSession -> Aff Unit -cSSEnable = void <<< Promise.toAffE <<< send0 "CSS.enable" +cSSEnable = void <<< FFI.promiseToAff <<< send0 "CSS.enable" cSSForcePseudoState :: Foreign -> CDPSession -> Aff Unit -cSSForcePseudoState p = void <<< Promise.toAffE <<< send p "CSS.forcePseudoState" +cSSForcePseudoState p = void <<< FFI.promiseToAff <<< send p "CSS.forcePseudoState" cSSGetBackgroundColors :: Foreign -> CDPSession -> Aff Foreign -cSSGetBackgroundColors p = Promise.toAffE <<< send p "CSS.getBackgroundColors" +cSSGetBackgroundColors p = FFI.promiseToAff <<< send p "CSS.getBackgroundColors" cSSGetComputedStyleForNode :: Foreign -> CDPSession -> Aff Foreign -cSSGetComputedStyleForNode p = Promise.toAffE <<< send p "CSS.getComputedStyleForNode" +cSSGetComputedStyleForNode p = FFI.promiseToAff <<< send p "CSS.getComputedStyleForNode" cSSGetInlineStylesForNode :: Foreign -> CDPSession -> Aff Foreign -cSSGetInlineStylesForNode p = Promise.toAffE <<< send p "CSS.getInlineStylesForNode" +cSSGetInlineStylesForNode p = FFI.promiseToAff <<< send p "CSS.getInlineStylesForNode" cSSGetMatchedStylesForNode :: Foreign -> CDPSession -> Aff Foreign -cSSGetMatchedStylesForNode p = Promise.toAffE <<< send p "CSS.getMatchedStylesForNode" +cSSGetMatchedStylesForNode p = FFI.promiseToAff <<< send p "CSS.getMatchedStylesForNode" cSSGetMediaQueries :: Foreign -> CDPSession -> Aff Foreign -cSSGetMediaQueries p = Promise.toAffE <<< send p "CSS.getMediaQueries" +cSSGetMediaQueries p = FFI.promiseToAff <<< send p "CSS.getMediaQueries" cSSGetPlatformFontsForNode :: Foreign -> CDPSession -> Aff Foreign -cSSGetPlatformFontsForNode p = Promise.toAffE <<< send p "CSS.getPlatformFontsForNode" +cSSGetPlatformFontsForNode p = FFI.promiseToAff <<< send p "CSS.getPlatformFontsForNode" cSSGetStyleSheetText :: Foreign -> CDPSession -> Aff Foreign -cSSGetStyleSheetText p = Promise.toAffE <<< send p "CSS.getStyleSheetText" +cSSGetStyleSheetText p = FFI.promiseToAff <<< send p "CSS.getStyleSheetText" cSSGetLayersForNode :: Foreign -> CDPSession -> Aff Foreign -cSSGetLayersForNode p = Promise.toAffE <<< send p "CSS.getLayersForNode" +cSSGetLayersForNode p = FFI.promiseToAff <<< send p "CSS.getLayersForNode" cSSTrackComputedStyleUpdates :: Foreign -> CDPSession -> Aff Unit -cSSTrackComputedStyleUpdates p = void <<< Promise.toAffE <<< send p "CSS.trackComputedStyleUpdates" +cSSTrackComputedStyleUpdates p = void <<< FFI.promiseToAff <<< send p "CSS.trackComputedStyleUpdates" cSSTakeComputedStyleUpdates :: Foreign -> CDPSession -> Aff Foreign -cSSTakeComputedStyleUpdates p = Promise.toAffE <<< send p "CSS.takeComputedStyleUpdates" +cSSTakeComputedStyleUpdates p = FFI.promiseToAff <<< send p "CSS.takeComputedStyleUpdates" cSSSetEffectivePropertyValueForNode :: Foreign -> CDPSession -> Aff Unit -cSSSetEffectivePropertyValueForNode p = void <<< Promise.toAffE <<< send p "CSS.setEffectivePropertyValueForNode" +cSSSetEffectivePropertyValueForNode p = void <<< FFI.promiseToAff <<< send p "CSS.setEffectivePropertyValueForNode" cSSSetKeyframeKey :: Foreign -> CDPSession -> Aff Foreign -cSSSetKeyframeKey p = Promise.toAffE <<< send p "CSS.setKeyframeKey" +cSSSetKeyframeKey p = FFI.promiseToAff <<< send p "CSS.setKeyframeKey" cSSSetMediaText :: Foreign -> CDPSession -> Aff Foreign -cSSSetMediaText p = Promise.toAffE <<< send p "CSS.setMediaText" +cSSSetMediaText p = FFI.promiseToAff <<< send p "CSS.setMediaText" cSSSetContainerQueryText :: Foreign -> CDPSession -> Aff Foreign -cSSSetContainerQueryText p = Promise.toAffE <<< send p "CSS.setContainerQueryText" +cSSSetContainerQueryText p = FFI.promiseToAff <<< send p "CSS.setContainerQueryText" cSSSetSupportsText :: Foreign -> CDPSession -> Aff Foreign -cSSSetSupportsText p = Promise.toAffE <<< send p "CSS.setSupportsText" +cSSSetSupportsText p = FFI.promiseToAff <<< send p "CSS.setSupportsText" cSSSetScopeText :: Foreign -> CDPSession -> Aff Foreign -cSSSetScopeText p = Promise.toAffE <<< send p "CSS.setScopeText" +cSSSetScopeText p = FFI.promiseToAff <<< send p "CSS.setScopeText" cSSSetRuleSelector :: Foreign -> CDPSession -> Aff Foreign -cSSSetRuleSelector p = Promise.toAffE <<< send p "CSS.setRuleSelector" +cSSSetRuleSelector p = FFI.promiseToAff <<< send p "CSS.setRuleSelector" cSSSetStyleSheetText :: Foreign -> CDPSession -> Aff Foreign -cSSSetStyleSheetText p = Promise.toAffE <<< send p "CSS.setStyleSheetText" +cSSSetStyleSheetText p = FFI.promiseToAff <<< send p "CSS.setStyleSheetText" cSSSetStyleTexts :: Foreign -> CDPSession -> Aff Foreign -cSSSetStyleTexts p = Promise.toAffE <<< send p "CSS.setStyleTexts" +cSSSetStyleTexts p = FFI.promiseToAff <<< send p "CSS.setStyleTexts" cSSStartRuleUsageTracking :: CDPSession -> Aff Unit -cSSStartRuleUsageTracking = void <<< Promise.toAffE <<< send0 "CSS.startRuleUsageTracking" +cSSStartRuleUsageTracking = void <<< FFI.promiseToAff <<< send0 "CSS.startRuleUsageTracking" cSSStopRuleUsageTracking :: Foreign -> CDPSession -> Aff Foreign -cSSStopRuleUsageTracking p = Promise.toAffE <<< send p "CSS.stopRuleUsageTracking" +cSSStopRuleUsageTracking p = FFI.promiseToAff <<< send p "CSS.stopRuleUsageTracking" cSSTakeCoverageDelta :: Foreign -> CDPSession -> Aff Foreign -cSSTakeCoverageDelta p = Promise.toAffE <<< send p "CSS.takeCoverageDelta" +cSSTakeCoverageDelta p = FFI.promiseToAff <<< send p "CSS.takeCoverageDelta" cSSSetLocalFontsEnabled :: Foreign -> CDPSession -> Aff Unit -cSSSetLocalFontsEnabled p = void <<< Promise.toAffE <<< send p "CSS.setLocalFontsEnabled" +cSSSetLocalFontsEnabled p = void <<< FFI.promiseToAff <<< send p "CSS.setLocalFontsEnabled" cacheStorageDeleteCache :: Foreign -> CDPSession -> Aff Unit -cacheStorageDeleteCache p = void <<< Promise.toAffE <<< send p "CacheStorage.deleteCache" +cacheStorageDeleteCache p = void <<< FFI.promiseToAff <<< send p "CacheStorage.deleteCache" cacheStorageDeleteEntry :: Foreign -> CDPSession -> Aff Unit -cacheStorageDeleteEntry p = void <<< Promise.toAffE <<< send p "CacheStorage.deleteEntry" +cacheStorageDeleteEntry p = void <<< FFI.promiseToAff <<< send p "CacheStorage.deleteEntry" cacheStorageRequestCacheNames :: Foreign -> CDPSession -> Aff Foreign -cacheStorageRequestCacheNames p = Promise.toAffE <<< send p "CacheStorage.requestCacheNames" +cacheStorageRequestCacheNames p = FFI.promiseToAff <<< send p "CacheStorage.requestCacheNames" cacheStorageRequestCachedResponse :: Foreign -> CDPSession -> Aff Foreign -cacheStorageRequestCachedResponse p = Promise.toAffE <<< send p "CacheStorage.requestCachedResponse" +cacheStorageRequestCachedResponse p = FFI.promiseToAff <<< send p "CacheStorage.requestCachedResponse" cacheStorageRequestEntries :: Foreign -> CDPSession -> Aff Foreign -cacheStorageRequestEntries p = Promise.toAffE <<< send p "CacheStorage.requestEntries" +cacheStorageRequestEntries p = FFI.promiseToAff <<< send p "CacheStorage.requestEntries" castEnable :: Foreign -> CDPSession -> Aff Unit -castEnable p = void <<< Promise.toAffE <<< send p "Cast.enable" +castEnable p = void <<< FFI.promiseToAff <<< send p "Cast.enable" castDisable :: CDPSession -> Aff Unit -castDisable = void <<< Promise.toAffE <<< send0 "Cast.disable" +castDisable = void <<< FFI.promiseToAff <<< send0 "Cast.disable" castSetSinkToUse :: Foreign -> CDPSession -> Aff Unit -castSetSinkToUse p = void <<< Promise.toAffE <<< send p "Cast.setSinkToUse" +castSetSinkToUse p = void <<< FFI.promiseToAff <<< send p "Cast.setSinkToUse" castStartDesktopMirroring :: Foreign -> CDPSession -> Aff Unit -castStartDesktopMirroring p = void <<< Promise.toAffE <<< send p "Cast.startDesktopMirroring" +castStartDesktopMirroring p = void <<< FFI.promiseToAff <<< send p "Cast.startDesktopMirroring" castStartTabMirroring :: Foreign -> CDPSession -> Aff Unit -castStartTabMirroring p = void <<< Promise.toAffE <<< send p "Cast.startTabMirroring" +castStartTabMirroring p = void <<< FFI.promiseToAff <<< send p "Cast.startTabMirroring" castStopCasting :: Foreign -> CDPSession -> Aff Unit -castStopCasting p = void <<< Promise.toAffE <<< send p "Cast.stopCasting" +castStopCasting p = void <<< FFI.promiseToAff <<< send p "Cast.stopCasting" domCollectClassNamesFromSubtree :: Foreign -> CDPSession -> Aff Foreign -domCollectClassNamesFromSubtree p = Promise.toAffE <<< send p "DOM.collectClassNamesFromSubtree" +domCollectClassNamesFromSubtree p = FFI.promiseToAff <<< send p "DOM.collectClassNamesFromSubtree" domCopyTo :: Foreign -> CDPSession -> Aff Foreign -domCopyTo p = Promise.toAffE <<< send p "DOM.copyTo" +domCopyTo p = FFI.promiseToAff <<< send p "DOM.copyTo" domDescribeNode :: Foreign -> CDPSession -> Aff Foreign -domDescribeNode p = Promise.toAffE <<< send p "DOM.describeNode" +domDescribeNode p = FFI.promiseToAff <<< send p "DOM.describeNode" domScrollIntoViewIfNeeded :: Foreign -> CDPSession -> Aff Unit -domScrollIntoViewIfNeeded p = void <<< Promise.toAffE <<< send p "DOM.scrollIntoViewIfNeeded" +domScrollIntoViewIfNeeded p = void <<< FFI.promiseToAff <<< send p "DOM.scrollIntoViewIfNeeded" domDisable :: CDPSession -> Aff Unit -domDisable = void <<< Promise.toAffE <<< send0 "DOM.disable" +domDisable = void <<< FFI.promiseToAff <<< send0 "DOM.disable" domDiscardSearchResults :: Foreign -> CDPSession -> Aff Unit -domDiscardSearchResults p = void <<< Promise.toAffE <<< send p "DOM.discardSearchResults" +domDiscardSearchResults p = void <<< FFI.promiseToAff <<< send p "DOM.discardSearchResults" domEnable :: Foreign -> CDPSession -> Aff Unit -domEnable p = void <<< Promise.toAffE <<< send p "DOM.enable" +domEnable p = void <<< FFI.promiseToAff <<< send p "DOM.enable" domFocus :: Foreign -> CDPSession -> Aff Unit -domFocus p = void <<< Promise.toAffE <<< send p "DOM.focus" +domFocus p = void <<< FFI.promiseToAff <<< send p "DOM.focus" domGetAttributes :: Foreign -> CDPSession -> Aff Foreign -domGetAttributes p = Promise.toAffE <<< send p "DOM.getAttributes" +domGetAttributes p = FFI.promiseToAff <<< send p "DOM.getAttributes" domGetBoxModel :: Foreign -> CDPSession -> Aff Foreign -domGetBoxModel p = Promise.toAffE <<< send p "DOM.getBoxModel" +domGetBoxModel p = FFI.promiseToAff <<< send p "DOM.getBoxModel" domGetContentQuads :: Foreign -> CDPSession -> Aff Foreign -domGetContentQuads p = Promise.toAffE <<< send p "DOM.getContentQuads" +domGetContentQuads p = FFI.promiseToAff <<< send p "DOM.getContentQuads" domGetDocument :: Foreign -> CDPSession -> Aff Foreign -domGetDocument p = Promise.toAffE <<< send p "DOM.getDocument" +domGetDocument p = FFI.promiseToAff <<< send p "DOM.getDocument" domGetFlattenedDocument :: Foreign -> CDPSession -> Aff Foreign -domGetFlattenedDocument p = Promise.toAffE <<< send p "DOM.getFlattenedDocument" +domGetFlattenedDocument p = FFI.promiseToAff <<< send p "DOM.getFlattenedDocument" domGetNodesForSubtreeByStyle :: Foreign -> CDPSession -> Aff Foreign -domGetNodesForSubtreeByStyle p = Promise.toAffE <<< send p "DOM.getNodesForSubtreeByStyle" +domGetNodesForSubtreeByStyle p = FFI.promiseToAff <<< send p "DOM.getNodesForSubtreeByStyle" domGetNodeForLocation :: Foreign -> CDPSession -> Aff Foreign -domGetNodeForLocation p = Promise.toAffE <<< send p "DOM.getNodeForLocation" +domGetNodeForLocation p = FFI.promiseToAff <<< send p "DOM.getNodeForLocation" domGetOuterHTML :: Foreign -> CDPSession -> Aff Foreign -domGetOuterHTML p = Promise.toAffE <<< send p "DOM.getOuterHTML" +domGetOuterHTML p = FFI.promiseToAff <<< send p "DOM.getOuterHTML" domGetRelayoutBoundary :: Foreign -> CDPSession -> Aff Foreign -domGetRelayoutBoundary p = Promise.toAffE <<< send p "DOM.getRelayoutBoundary" +domGetRelayoutBoundary p = FFI.promiseToAff <<< send p "DOM.getRelayoutBoundary" domGetSearchResults :: Foreign -> CDPSession -> Aff Foreign -domGetSearchResults p = Promise.toAffE <<< send p "DOM.getSearchResults" +domGetSearchResults p = FFI.promiseToAff <<< send p "DOM.getSearchResults" domHideHighlight :: CDPSession -> Aff Unit -domHideHighlight = void <<< Promise.toAffE <<< send0 "DOM.hideHighlight" +domHideHighlight = void <<< FFI.promiseToAff <<< send0 "DOM.hideHighlight" domHighlightNode :: CDPSession -> Aff Unit -domHighlightNode = void <<< Promise.toAffE <<< send0 "DOM.highlightNode" +domHighlightNode = void <<< FFI.promiseToAff <<< send0 "DOM.highlightNode" domHighlightRect :: CDPSession -> Aff Unit -domHighlightRect = void <<< Promise.toAffE <<< send0 "DOM.highlightRect" +domHighlightRect = void <<< FFI.promiseToAff <<< send0 "DOM.highlightRect" domMarkUndoableState :: CDPSession -> Aff Unit -domMarkUndoableState = void <<< Promise.toAffE <<< send0 "DOM.markUndoableState" +domMarkUndoableState = void <<< FFI.promiseToAff <<< send0 "DOM.markUndoableState" domMoveTo :: Foreign -> CDPSession -> Aff Foreign -domMoveTo p = Promise.toAffE <<< send p "DOM.moveTo" +domMoveTo p = FFI.promiseToAff <<< send p "DOM.moveTo" domPerformSearch :: Foreign -> CDPSession -> Aff Foreign -domPerformSearch p = Promise.toAffE <<< send p "DOM.performSearch" +domPerformSearch p = FFI.promiseToAff <<< send p "DOM.performSearch" domPushNodeByPathToFrontend :: Foreign -> CDPSession -> Aff Foreign -domPushNodeByPathToFrontend p = Promise.toAffE <<< send p "DOM.pushNodeByPathToFrontend" +domPushNodeByPathToFrontend p = FFI.promiseToAff <<< send p "DOM.pushNodeByPathToFrontend" domPushNodesByBackendIdsToFrontend :: Foreign -> CDPSession -> Aff Foreign -domPushNodesByBackendIdsToFrontend p = Promise.toAffE <<< send p "DOM.pushNodesByBackendIdsToFrontend" +domPushNodesByBackendIdsToFrontend p = FFI.promiseToAff <<< send p "DOM.pushNodesByBackendIdsToFrontend" domQuerySelector :: Foreign -> CDPSession -> Aff Foreign -domQuerySelector p = Promise.toAffE <<< send p "DOM.querySelector" +domQuerySelector p = FFI.promiseToAff <<< send p "DOM.querySelector" domQuerySelectorAll :: Foreign -> CDPSession -> Aff Foreign -domQuerySelectorAll p = Promise.toAffE <<< send p "DOM.querySelectorAll" +domQuerySelectorAll p = FFI.promiseToAff <<< send p "DOM.querySelectorAll" domGetTopLayerElements :: Foreign -> CDPSession -> Aff Foreign -domGetTopLayerElements p = Promise.toAffE <<< send p "DOM.getTopLayerElements" +domGetTopLayerElements p = FFI.promiseToAff <<< send p "DOM.getTopLayerElements" domRedo :: CDPSession -> Aff Unit -domRedo = void <<< Promise.toAffE <<< send0 "DOM.redo" +domRedo = void <<< FFI.promiseToAff <<< send0 "DOM.redo" domRemoveAttribute :: Foreign -> CDPSession -> Aff Unit -domRemoveAttribute p = void <<< Promise.toAffE <<< send p "DOM.removeAttribute" +domRemoveAttribute p = void <<< FFI.promiseToAff <<< send p "DOM.removeAttribute" domRemoveNode :: Foreign -> CDPSession -> Aff Unit -domRemoveNode p = void <<< Promise.toAffE <<< send p "DOM.removeNode" +domRemoveNode p = void <<< FFI.promiseToAff <<< send p "DOM.removeNode" domRequestChildNodes :: Foreign -> CDPSession -> Aff Unit -domRequestChildNodes p = void <<< Promise.toAffE <<< send p "DOM.requestChildNodes" +domRequestChildNodes p = void <<< FFI.promiseToAff <<< send p "DOM.requestChildNodes" domRequestNode :: Foreign -> CDPSession -> Aff Foreign -domRequestNode p = Promise.toAffE <<< send p "DOM.requestNode" +domRequestNode p = FFI.promiseToAff <<< send p "DOM.requestNode" domResolveNode :: Foreign -> CDPSession -> Aff Foreign -domResolveNode p = Promise.toAffE <<< send p "DOM.resolveNode" +domResolveNode p = FFI.promiseToAff <<< send p "DOM.resolveNode" domSetAttributeValue :: Foreign -> CDPSession -> Aff Unit -domSetAttributeValue p = void <<< Promise.toAffE <<< send p "DOM.setAttributeValue" +domSetAttributeValue p = void <<< FFI.promiseToAff <<< send p "DOM.setAttributeValue" domSetAttributesAsText :: Foreign -> CDPSession -> Aff Unit -domSetAttributesAsText p = void <<< Promise.toAffE <<< send p "DOM.setAttributesAsText" +domSetAttributesAsText p = void <<< FFI.promiseToAff <<< send p "DOM.setAttributesAsText" domSetFileInputFiles :: Foreign -> CDPSession -> Aff Unit -domSetFileInputFiles p = void <<< Promise.toAffE <<< send p "DOM.setFileInputFiles" +domSetFileInputFiles p = void <<< FFI.promiseToAff <<< send p "DOM.setFileInputFiles" domSetNodeStackTracesEnabled :: Foreign -> CDPSession -> Aff Unit -domSetNodeStackTracesEnabled p = void <<< Promise.toAffE <<< send p "DOM.setNodeStackTracesEnabled" +domSetNodeStackTracesEnabled p = void <<< FFI.promiseToAff <<< send p "DOM.setNodeStackTracesEnabled" domGetNodeStackTraces :: Foreign -> CDPSession -> Aff Foreign -domGetNodeStackTraces p = Promise.toAffE <<< send p "DOM.getNodeStackTraces" +domGetNodeStackTraces p = FFI.promiseToAff <<< send p "DOM.getNodeStackTraces" domGetFileInfo :: Foreign -> CDPSession -> Aff Foreign -domGetFileInfo p = Promise.toAffE <<< send p "DOM.getFileInfo" +domGetFileInfo p = FFI.promiseToAff <<< send p "DOM.getFileInfo" domSetInspectedNode :: Foreign -> CDPSession -> Aff Unit -domSetInspectedNode p = void <<< Promise.toAffE <<< send p "DOM.setInspectedNode" +domSetInspectedNode p = void <<< FFI.promiseToAff <<< send p "DOM.setInspectedNode" domSetNodeName :: Foreign -> CDPSession -> Aff Foreign -domSetNodeName p = Promise.toAffE <<< send p "DOM.setNodeName" +domSetNodeName p = FFI.promiseToAff <<< send p "DOM.setNodeName" domSetNodeValue :: Foreign -> CDPSession -> Aff Unit -domSetNodeValue p = void <<< Promise.toAffE <<< send p "DOM.setNodeValue" +domSetNodeValue p = void <<< FFI.promiseToAff <<< send p "DOM.setNodeValue" domSetOuterHTML :: Foreign -> CDPSession -> Aff Unit -domSetOuterHTML p = void <<< Promise.toAffE <<< send p "DOM.setOuterHTML" +domSetOuterHTML p = void <<< FFI.promiseToAff <<< send p "DOM.setOuterHTML" domUndo :: CDPSession -> Aff Unit -domUndo = void <<< Promise.toAffE <<< send0 "DOM.undo" +domUndo = void <<< FFI.promiseToAff <<< send0 "DOM.undo" domGetFrameOwner :: Foreign -> CDPSession -> Aff Foreign -domGetFrameOwner p = Promise.toAffE <<< send p "DOM.getFrameOwner" +domGetFrameOwner p = FFI.promiseToAff <<< send p "DOM.getFrameOwner" domGetContainerForNode :: Foreign -> CDPSession -> Aff Foreign -domGetContainerForNode p = Promise.toAffE <<< send p "DOM.getContainerForNode" +domGetContainerForNode p = FFI.promiseToAff <<< send p "DOM.getContainerForNode" domGetQueryingDescendantsForContainer :: Foreign -> CDPSession -> Aff Foreign -domGetQueryingDescendantsForContainer p = Promise.toAffE <<< send p "DOM.getQueryingDescendantsForContainer" +domGetQueryingDescendantsForContainer p = FFI.promiseToAff <<< send p "DOM.getQueryingDescendantsForContainer" domDebuggerGetEventListeners :: Foreign -> CDPSession -> Aff Foreign -domDebuggerGetEventListeners p = Promise.toAffE <<< send p "DOMDebugger.getEventListeners" +domDebuggerGetEventListeners p = FFI.promiseToAff <<< send p "DOMDebugger.getEventListeners" domDebuggerRemoveDOMBreakpoint :: Foreign -> CDPSession -> Aff Unit -domDebuggerRemoveDOMBreakpoint p = void <<< Promise.toAffE <<< send p "DOMDebugger.removeDOMBreakpoint" +domDebuggerRemoveDOMBreakpoint p = void <<< FFI.promiseToAff <<< send p "DOMDebugger.removeDOMBreakpoint" domDebuggerRemoveEventListenerBreakpoint :: Foreign -> CDPSession -> Aff Unit -domDebuggerRemoveEventListenerBreakpoint p = void <<< Promise.toAffE <<< send p "DOMDebugger.removeEventListenerBreakpoint" +domDebuggerRemoveEventListenerBreakpoint p = void <<< FFI.promiseToAff <<< send p "DOMDebugger.removeEventListenerBreakpoint" domDebuggerRemoveInstrumentationBreakpoint :: Foreign -> CDPSession -> Aff Unit -domDebuggerRemoveInstrumentationBreakpoint p = void <<< Promise.toAffE <<< send p "DOMDebugger.removeInstrumentationBreakpoint" +domDebuggerRemoveInstrumentationBreakpoint p = void <<< FFI.promiseToAff <<< send p "DOMDebugger.removeInstrumentationBreakpoint" domDebuggerRemoveXHRBreakpoint :: Foreign -> CDPSession -> Aff Unit -domDebuggerRemoveXHRBreakpoint p = void <<< Promise.toAffE <<< send p "DOMDebugger.removeXHRBreakpoint" +domDebuggerRemoveXHRBreakpoint p = void <<< FFI.promiseToAff <<< send p "DOMDebugger.removeXHRBreakpoint" domDebuggerSetBreakOnCSPViolation :: Foreign -> CDPSession -> Aff Unit -domDebuggerSetBreakOnCSPViolation p = void <<< Promise.toAffE <<< send p "DOMDebugger.setBreakOnCSPViolation" +domDebuggerSetBreakOnCSPViolation p = void <<< FFI.promiseToAff <<< send p "DOMDebugger.setBreakOnCSPViolation" domDebuggerSetDOMBreakpoint :: Foreign -> CDPSession -> Aff Unit -domDebuggerSetDOMBreakpoint p = void <<< Promise.toAffE <<< send p "DOMDebugger.setDOMBreakpoint" +domDebuggerSetDOMBreakpoint p = void <<< FFI.promiseToAff <<< send p "DOMDebugger.setDOMBreakpoint" domDebuggerSetEventListenerBreakpoint :: Foreign -> CDPSession -> Aff Unit -domDebuggerSetEventListenerBreakpoint p = void <<< Promise.toAffE <<< send p "DOMDebugger.setEventListenerBreakpoint" +domDebuggerSetEventListenerBreakpoint p = void <<< FFI.promiseToAff <<< send p "DOMDebugger.setEventListenerBreakpoint" domDebuggerSetInstrumentationBreakpoint :: Foreign -> CDPSession -> Aff Unit -domDebuggerSetInstrumentationBreakpoint p = void <<< Promise.toAffE <<< send p "DOMDebugger.setInstrumentationBreakpoint" +domDebuggerSetInstrumentationBreakpoint p = void <<< FFI.promiseToAff <<< send p "DOMDebugger.setInstrumentationBreakpoint" domDebuggerSetXHRBreakpoint :: Foreign -> CDPSession -> Aff Unit -domDebuggerSetXHRBreakpoint p = void <<< Promise.toAffE <<< send p "DOMDebugger.setXHRBreakpoint" +domDebuggerSetXHRBreakpoint p = void <<< FFI.promiseToAff <<< send p "DOMDebugger.setXHRBreakpoint" eventBreakpointsSetInstrumentationBreakpoint :: Foreign -> CDPSession -> Aff Unit -eventBreakpointsSetInstrumentationBreakpoint p = void <<< Promise.toAffE <<< send p "EventBreakpoints.setInstrumentationBreakpoint" +eventBreakpointsSetInstrumentationBreakpoint p = void <<< FFI.promiseToAff <<< send p "EventBreakpoints.setInstrumentationBreakpoint" eventBreakpointsRemoveInstrumentationBreakpoint :: Foreign -> CDPSession -> Aff Unit -eventBreakpointsRemoveInstrumentationBreakpoint p = void <<< Promise.toAffE <<< send p "EventBreakpoints.removeInstrumentationBreakpoint" +eventBreakpointsRemoveInstrumentationBreakpoint p = void <<< FFI.promiseToAff <<< send p "EventBreakpoints.removeInstrumentationBreakpoint" domSnapshotDisable :: CDPSession -> Aff Unit -domSnapshotDisable = void <<< Promise.toAffE <<< send0 "DOMSnapshot.disable" +domSnapshotDisable = void <<< FFI.promiseToAff <<< send0 "DOMSnapshot.disable" domSnapshotEnable :: CDPSession -> Aff Unit -domSnapshotEnable = void <<< Promise.toAffE <<< send0 "DOMSnapshot.enable" +domSnapshotEnable = void <<< FFI.promiseToAff <<< send0 "DOMSnapshot.enable" domSnapshotGetSnapshot :: Foreign -> CDPSession -> Aff Foreign -domSnapshotGetSnapshot p = Promise.toAffE <<< send p "DOMSnapshot.getSnapshot" +domSnapshotGetSnapshot p = FFI.promiseToAff <<< send p "DOMSnapshot.getSnapshot" domSnapshotCaptureSnapshot :: Foreign -> CDPSession -> Aff Foreign -domSnapshotCaptureSnapshot p = Promise.toAffE <<< send p "DOMSnapshot.captureSnapshot" +domSnapshotCaptureSnapshot p = FFI.promiseToAff <<< send p "DOMSnapshot.captureSnapshot" domStorageClear :: Foreign -> CDPSession -> Aff Unit -domStorageClear p = void <<< Promise.toAffE <<< send p "DOMStorage.clear" +domStorageClear p = void <<< FFI.promiseToAff <<< send p "DOMStorage.clear" domStorageDisable :: CDPSession -> Aff Unit -domStorageDisable = void <<< Promise.toAffE <<< send0 "DOMStorage.disable" +domStorageDisable = void <<< FFI.promiseToAff <<< send0 "DOMStorage.disable" domStorageEnable :: CDPSession -> Aff Unit -domStorageEnable = void <<< Promise.toAffE <<< send0 "DOMStorage.enable" +domStorageEnable = void <<< FFI.promiseToAff <<< send0 "DOMStorage.enable" domStorageGetDOMStorageItems :: Foreign -> CDPSession -> Aff Foreign -domStorageGetDOMStorageItems p = Promise.toAffE <<< send p "DOMStorage.getDOMStorageItems" +domStorageGetDOMStorageItems p = FFI.promiseToAff <<< send p "DOMStorage.getDOMStorageItems" domStorageRemoveDOMStorageItem :: Foreign -> CDPSession -> Aff Unit -domStorageRemoveDOMStorageItem p = void <<< Promise.toAffE <<< send p "DOMStorage.removeDOMStorageItem" +domStorageRemoveDOMStorageItem p = void <<< FFI.promiseToAff <<< send p "DOMStorage.removeDOMStorageItem" domStorageSetDOMStorageItem :: Foreign -> CDPSession -> Aff Unit -domStorageSetDOMStorageItem p = void <<< Promise.toAffE <<< send p "DOMStorage.setDOMStorageItem" +domStorageSetDOMStorageItem p = void <<< FFI.promiseToAff <<< send p "DOMStorage.setDOMStorageItem" databaseDisable :: CDPSession -> Aff Unit -databaseDisable = void <<< Promise.toAffE <<< send0 "Database.disable" +databaseDisable = void <<< FFI.promiseToAff <<< send0 "Database.disable" databaseEnable :: CDPSession -> Aff Unit -databaseEnable = void <<< Promise.toAffE <<< send0 "Database.enable" +databaseEnable = void <<< FFI.promiseToAff <<< send0 "Database.enable" databaseExecuteSQL :: Foreign -> CDPSession -> Aff Foreign -databaseExecuteSQL p = Promise.toAffE <<< send p "Database.executeSQL" +databaseExecuteSQL p = FFI.promiseToAff <<< send p "Database.executeSQL" databaseGetDatabaseTableNames :: Foreign -> CDPSession -> Aff Foreign -databaseGetDatabaseTableNames p = Promise.toAffE <<< send p "Database.getDatabaseTableNames" +databaseGetDatabaseTableNames p = FFI.promiseToAff <<< send p "Database.getDatabaseTableNames" deviceOrientationClearDeviceOrientationOverride :: CDPSession -> Aff Unit -deviceOrientationClearDeviceOrientationOverride = void <<< Promise.toAffE <<< send0 "DeviceOrientation.clearDeviceOrientationOverride" +deviceOrientationClearDeviceOrientationOverride = void <<< FFI.promiseToAff <<< send0 "DeviceOrientation.clearDeviceOrientationOverride" deviceOrientationSetDeviceOrientationOverride :: Foreign -> CDPSession -> Aff Unit -deviceOrientationSetDeviceOrientationOverride p = void <<< Promise.toAffE <<< send p "DeviceOrientation.setDeviceOrientationOverride" +deviceOrientationSetDeviceOrientationOverride p = void <<< FFI.promiseToAff <<< send p "DeviceOrientation.setDeviceOrientationOverride" emulationCanEmulate :: Foreign -> CDPSession -> Aff Foreign -emulationCanEmulate p = Promise.toAffE <<< send p "Emulation.canEmulate" +emulationCanEmulate p = FFI.promiseToAff <<< send p "Emulation.canEmulate" emulationClearDeviceMetricsOverride :: CDPSession -> Aff Unit -emulationClearDeviceMetricsOverride = void <<< Promise.toAffE <<< send0 "Emulation.clearDeviceMetricsOverride" +emulationClearDeviceMetricsOverride = void <<< FFI.promiseToAff <<< send0 "Emulation.clearDeviceMetricsOverride" emulationClearGeolocationOverride :: CDPSession -> Aff Unit -emulationClearGeolocationOverride = void <<< Promise.toAffE <<< send0 "Emulation.clearGeolocationOverride" +emulationClearGeolocationOverride = void <<< FFI.promiseToAff <<< send0 "Emulation.clearGeolocationOverride" emulationResetPageScaleFactor :: CDPSession -> Aff Unit -emulationResetPageScaleFactor = void <<< Promise.toAffE <<< send0 "Emulation.resetPageScaleFactor" +emulationResetPageScaleFactor = void <<< FFI.promiseToAff <<< send0 "Emulation.resetPageScaleFactor" emulationSetFocusEmulationEnabled :: Foreign -> CDPSession -> Aff Unit -emulationSetFocusEmulationEnabled p = void <<< Promise.toAffE <<< send p "Emulation.setFocusEmulationEnabled" +emulationSetFocusEmulationEnabled p = void <<< FFI.promiseToAff <<< send p "Emulation.setFocusEmulationEnabled" emulationSetAutoDarkModeOverride :: Foreign -> CDPSession -> Aff Unit -emulationSetAutoDarkModeOverride p = void <<< Promise.toAffE <<< send p "Emulation.setAutoDarkModeOverride" +emulationSetAutoDarkModeOverride p = void <<< FFI.promiseToAff <<< send p "Emulation.setAutoDarkModeOverride" emulationSetCPUThrottlingRate :: Foreign -> CDPSession -> Aff Unit -emulationSetCPUThrottlingRate p = void <<< Promise.toAffE <<< send p "Emulation.setCPUThrottlingRate" +emulationSetCPUThrottlingRate p = void <<< FFI.promiseToAff <<< send p "Emulation.setCPUThrottlingRate" emulationSetDefaultBackgroundColorOverride :: Foreign -> CDPSession -> Aff Unit -emulationSetDefaultBackgroundColorOverride p = void <<< Promise.toAffE <<< send p "Emulation.setDefaultBackgroundColorOverride" +emulationSetDefaultBackgroundColorOverride p = void <<< FFI.promiseToAff <<< send p "Emulation.setDefaultBackgroundColorOverride" emulationSetDeviceMetricsOverride :: Foreign -> CDPSession -> Aff Unit -emulationSetDeviceMetricsOverride p = void <<< Promise.toAffE <<< send p "Emulation.setDeviceMetricsOverride" +emulationSetDeviceMetricsOverride p = void <<< FFI.promiseToAff <<< send p "Emulation.setDeviceMetricsOverride" emulationSetScrollbarsHidden :: Foreign -> CDPSession -> Aff Unit -emulationSetScrollbarsHidden p = void <<< Promise.toAffE <<< send p "Emulation.setScrollbarsHidden" +emulationSetScrollbarsHidden p = void <<< FFI.promiseToAff <<< send p "Emulation.setScrollbarsHidden" emulationSetDocumentCookieDisabled :: Foreign -> CDPSession -> Aff Unit -emulationSetDocumentCookieDisabled p = void <<< Promise.toAffE <<< send p "Emulation.setDocumentCookieDisabled" +emulationSetDocumentCookieDisabled p = void <<< FFI.promiseToAff <<< send p "Emulation.setDocumentCookieDisabled" emulationSetEmitTouchEventsForMouse :: Foreign -> CDPSession -> Aff Unit -emulationSetEmitTouchEventsForMouse p = void <<< Promise.toAffE <<< send p "Emulation.setEmitTouchEventsForMouse" +emulationSetEmitTouchEventsForMouse p = void <<< FFI.promiseToAff <<< send p "Emulation.setEmitTouchEventsForMouse" emulationSetEmulatedMedia :: Foreign -> CDPSession -> Aff Unit -emulationSetEmulatedMedia p = void <<< Promise.toAffE <<< send p "Emulation.setEmulatedMedia" +emulationSetEmulatedMedia p = void <<< FFI.promiseToAff <<< send p "Emulation.setEmulatedMedia" emulationSetEmulatedVisionDeficiency :: Foreign -> CDPSession -> Aff Unit -emulationSetEmulatedVisionDeficiency p = void <<< Promise.toAffE <<< send p "Emulation.setEmulatedVisionDeficiency" +emulationSetEmulatedVisionDeficiency p = void <<< FFI.promiseToAff <<< send p "Emulation.setEmulatedVisionDeficiency" emulationSetGeolocationOverride :: Foreign -> CDPSession -> Aff Unit -emulationSetGeolocationOverride p = void <<< Promise.toAffE <<< send p "Emulation.setGeolocationOverride" +emulationSetGeolocationOverride p = void <<< FFI.promiseToAff <<< send p "Emulation.setGeolocationOverride" emulationSetIdleOverride :: Foreign -> CDPSession -> Aff Unit -emulationSetIdleOverride p = void <<< Promise.toAffE <<< send p "Emulation.setIdleOverride" +emulationSetIdleOverride p = void <<< FFI.promiseToAff <<< send p "Emulation.setIdleOverride" emulationClearIdleOverride :: CDPSession -> Aff Unit -emulationClearIdleOverride = void <<< Promise.toAffE <<< send0 "Emulation.clearIdleOverride" +emulationClearIdleOverride = void <<< FFI.promiseToAff <<< send0 "Emulation.clearIdleOverride" emulationSetNavigatorOverrides :: Foreign -> CDPSession -> Aff Unit -emulationSetNavigatorOverrides p = void <<< Promise.toAffE <<< send p "Emulation.setNavigatorOverrides" +emulationSetNavigatorOverrides p = void <<< FFI.promiseToAff <<< send p "Emulation.setNavigatorOverrides" emulationSetPageScaleFactor :: Foreign -> CDPSession -> Aff Unit -emulationSetPageScaleFactor p = void <<< Promise.toAffE <<< send p "Emulation.setPageScaleFactor" +emulationSetPageScaleFactor p = void <<< FFI.promiseToAff <<< send p "Emulation.setPageScaleFactor" emulationSetScriptExecutionDisabled :: Foreign -> CDPSession -> Aff Unit -emulationSetScriptExecutionDisabled p = void <<< Promise.toAffE <<< send p "Emulation.setScriptExecutionDisabled" +emulationSetScriptExecutionDisabled p = void <<< FFI.promiseToAff <<< send p "Emulation.setScriptExecutionDisabled" emulationSetTouchEmulationEnabled :: Foreign -> CDPSession -> Aff Unit -emulationSetTouchEmulationEnabled p = void <<< Promise.toAffE <<< send p "Emulation.setTouchEmulationEnabled" +emulationSetTouchEmulationEnabled p = void <<< FFI.promiseToAff <<< send p "Emulation.setTouchEmulationEnabled" emulationSetVirtualTimePolicy :: Foreign -> CDPSession -> Aff Foreign -emulationSetVirtualTimePolicy p = Promise.toAffE <<< send p "Emulation.setVirtualTimePolicy" +emulationSetVirtualTimePolicy p = FFI.promiseToAff <<< send p "Emulation.setVirtualTimePolicy" emulationSetLocaleOverride :: Foreign -> CDPSession -> Aff Unit -emulationSetLocaleOverride p = void <<< Promise.toAffE <<< send p "Emulation.setLocaleOverride" +emulationSetLocaleOverride p = void <<< FFI.promiseToAff <<< send p "Emulation.setLocaleOverride" emulationSetTimezoneOverride :: Foreign -> CDPSession -> Aff Unit -emulationSetTimezoneOverride p = void <<< Promise.toAffE <<< send p "Emulation.setTimezoneOverride" +emulationSetTimezoneOverride p = void <<< FFI.promiseToAff <<< send p "Emulation.setTimezoneOverride" emulationSetVisibleSize :: Foreign -> CDPSession -> Aff Unit -emulationSetVisibleSize p = void <<< Promise.toAffE <<< send p "Emulation.setVisibleSize" +emulationSetVisibleSize p = void <<< FFI.promiseToAff <<< send p "Emulation.setVisibleSize" emulationSetDisabledImageTypes :: Foreign -> CDPSession -> Aff Unit -emulationSetDisabledImageTypes p = void <<< Promise.toAffE <<< send p "Emulation.setDisabledImageTypes" +emulationSetDisabledImageTypes p = void <<< FFI.promiseToAff <<< send p "Emulation.setDisabledImageTypes" emulationSetHardwareConcurrencyOverride :: Foreign -> CDPSession -> Aff Unit -emulationSetHardwareConcurrencyOverride p = void <<< Promise.toAffE <<< send p "Emulation.setHardwareConcurrencyOverride" +emulationSetHardwareConcurrencyOverride p = void <<< FFI.promiseToAff <<< send p "Emulation.setHardwareConcurrencyOverride" emulationSetUserAgentOverride :: Foreign -> CDPSession -> Aff Unit -emulationSetUserAgentOverride p = void <<< Promise.toAffE <<< send p "Emulation.setUserAgentOverride" +emulationSetUserAgentOverride p = void <<< FFI.promiseToAff <<< send p "Emulation.setUserAgentOverride" emulationSetAutomationOverride :: Foreign -> CDPSession -> Aff Unit -emulationSetAutomationOverride p = void <<< Promise.toAffE <<< send p "Emulation.setAutomationOverride" +emulationSetAutomationOverride p = void <<< FFI.promiseToAff <<< send p "Emulation.setAutomationOverride" headlessExperimentalBeginFrame :: Foreign -> CDPSession -> Aff Foreign -headlessExperimentalBeginFrame p = Promise.toAffE <<< send p "HeadlessExperimental.beginFrame" +headlessExperimentalBeginFrame p = FFI.promiseToAff <<< send p "HeadlessExperimental.beginFrame" headlessExperimentalDisable :: CDPSession -> Aff Unit -headlessExperimentalDisable = void <<< Promise.toAffE <<< send0 "HeadlessExperimental.disable" +headlessExperimentalDisable = void <<< FFI.promiseToAff <<< send0 "HeadlessExperimental.disable" headlessExperimentalEnable :: CDPSession -> Aff Unit -headlessExperimentalEnable = void <<< Promise.toAffE <<< send0 "HeadlessExperimental.enable" +headlessExperimentalEnable = void <<< FFI.promiseToAff <<< send0 "HeadlessExperimental.enable" ioClose :: Foreign -> CDPSession -> Aff Unit -ioClose p = void <<< Promise.toAffE <<< send p "IO.close" +ioClose p = void <<< FFI.promiseToAff <<< send p "IO.close" ioRead :: Foreign -> CDPSession -> Aff Foreign -ioRead p = Promise.toAffE <<< send p "IO.read" +ioRead p = FFI.promiseToAff <<< send p "IO.read" ioResolveBlob :: Foreign -> CDPSession -> Aff Foreign -ioResolveBlob p = Promise.toAffE <<< send p "IO.resolveBlob" +ioResolveBlob p = FFI.promiseToAff <<< send p "IO.resolveBlob" indexedDBClearObjectStore :: Foreign -> CDPSession -> Aff Unit -indexedDBClearObjectStore p = void <<< Promise.toAffE <<< send p "IndexedDB.clearObjectStore" +indexedDBClearObjectStore p = void <<< FFI.promiseToAff <<< send p "IndexedDB.clearObjectStore" indexedDBDeleteDatabase :: Foreign -> CDPSession -> Aff Unit -indexedDBDeleteDatabase p = void <<< Promise.toAffE <<< send p "IndexedDB.deleteDatabase" +indexedDBDeleteDatabase p = void <<< FFI.promiseToAff <<< send p "IndexedDB.deleteDatabase" indexedDBDeleteObjectStoreEntries :: Foreign -> CDPSession -> Aff Unit -indexedDBDeleteObjectStoreEntries p = void <<< Promise.toAffE <<< send p "IndexedDB.deleteObjectStoreEntries" +indexedDBDeleteObjectStoreEntries p = void <<< FFI.promiseToAff <<< send p "IndexedDB.deleteObjectStoreEntries" indexedDBDisable :: CDPSession -> Aff Unit -indexedDBDisable = void <<< Promise.toAffE <<< send0 "IndexedDB.disable" +indexedDBDisable = void <<< FFI.promiseToAff <<< send0 "IndexedDB.disable" indexedDBEnable :: CDPSession -> Aff Unit -indexedDBEnable = void <<< Promise.toAffE <<< send0 "IndexedDB.enable" +indexedDBEnable = void <<< FFI.promiseToAff <<< send0 "IndexedDB.enable" indexedDBRequestData :: Foreign -> CDPSession -> Aff Foreign -indexedDBRequestData p = Promise.toAffE <<< send p "IndexedDB.requestData" +indexedDBRequestData p = FFI.promiseToAff <<< send p "IndexedDB.requestData" indexedDBGetMetadata :: Foreign -> CDPSession -> Aff Foreign -indexedDBGetMetadata p = Promise.toAffE <<< send p "IndexedDB.getMetadata" +indexedDBGetMetadata p = FFI.promiseToAff <<< send p "IndexedDB.getMetadata" indexedDBRequestDatabase :: Foreign -> CDPSession -> Aff Foreign -indexedDBRequestDatabase p = Promise.toAffE <<< send p "IndexedDB.requestDatabase" +indexedDBRequestDatabase p = FFI.promiseToAff <<< send p "IndexedDB.requestDatabase" indexedDBRequestDatabaseNames :: Foreign -> CDPSession -> Aff Foreign -indexedDBRequestDatabaseNames p = Promise.toAffE <<< send p "IndexedDB.requestDatabaseNames" +indexedDBRequestDatabaseNames p = FFI.promiseToAff <<< send p "IndexedDB.requestDatabaseNames" inputDispatchDragEvent :: Foreign -> CDPSession -> Aff Unit -inputDispatchDragEvent p = void <<< Promise.toAffE <<< send p "Input.dispatchDragEvent" +inputDispatchDragEvent p = void <<< FFI.promiseToAff <<< send p "Input.dispatchDragEvent" inputDispatchKeyEvent :: Foreign -> CDPSession -> Aff Unit -inputDispatchKeyEvent p = void <<< Promise.toAffE <<< send p "Input.dispatchKeyEvent" +inputDispatchKeyEvent p = void <<< FFI.promiseToAff <<< send p "Input.dispatchKeyEvent" inputInsertText :: Foreign -> CDPSession -> Aff Unit -inputInsertText p = void <<< Promise.toAffE <<< send p "Input.insertText" +inputInsertText p = void <<< FFI.promiseToAff <<< send p "Input.insertText" inputImeSetComposition :: Foreign -> CDPSession -> Aff Unit -inputImeSetComposition p = void <<< Promise.toAffE <<< send p "Input.imeSetComposition" +inputImeSetComposition p = void <<< FFI.promiseToAff <<< send p "Input.imeSetComposition" inputDispatchMouseEvent :: Foreign -> CDPSession -> Aff Unit -inputDispatchMouseEvent p = void <<< Promise.toAffE <<< send p "Input.dispatchMouseEvent" +inputDispatchMouseEvent p = void <<< FFI.promiseToAff <<< send p "Input.dispatchMouseEvent" inputDispatchTouchEvent :: Foreign -> CDPSession -> Aff Unit -inputDispatchTouchEvent p = void <<< Promise.toAffE <<< send p "Input.dispatchTouchEvent" +inputDispatchTouchEvent p = void <<< FFI.promiseToAff <<< send p "Input.dispatchTouchEvent" inputCancelDragging :: CDPSession -> Aff Unit -inputCancelDragging = void <<< Promise.toAffE <<< send0 "Input.cancelDragging" +inputCancelDragging = void <<< FFI.promiseToAff <<< send0 "Input.cancelDragging" inputEmulateTouchFromMouseEvent :: Foreign -> CDPSession -> Aff Unit -inputEmulateTouchFromMouseEvent p = void <<< Promise.toAffE <<< send p "Input.emulateTouchFromMouseEvent" +inputEmulateTouchFromMouseEvent p = void <<< FFI.promiseToAff <<< send p "Input.emulateTouchFromMouseEvent" inputSetIgnoreInputEvents :: Foreign -> CDPSession -> Aff Unit -inputSetIgnoreInputEvents p = void <<< Promise.toAffE <<< send p "Input.setIgnoreInputEvents" +inputSetIgnoreInputEvents p = void <<< FFI.promiseToAff <<< send p "Input.setIgnoreInputEvents" inputSetInterceptDrags :: Foreign -> CDPSession -> Aff Unit -inputSetInterceptDrags p = void <<< Promise.toAffE <<< send p "Input.setInterceptDrags" +inputSetInterceptDrags p = void <<< FFI.promiseToAff <<< send p "Input.setInterceptDrags" inputSynthesizePinchGesture :: Foreign -> CDPSession -> Aff Unit -inputSynthesizePinchGesture p = void <<< Promise.toAffE <<< send p "Input.synthesizePinchGesture" +inputSynthesizePinchGesture p = void <<< FFI.promiseToAff <<< send p "Input.synthesizePinchGesture" inputSynthesizeScrollGesture :: Foreign -> CDPSession -> Aff Unit -inputSynthesizeScrollGesture p = void <<< Promise.toAffE <<< send p "Input.synthesizeScrollGesture" +inputSynthesizeScrollGesture p = void <<< FFI.promiseToAff <<< send p "Input.synthesizeScrollGesture" inputSynthesizeTapGesture :: Foreign -> CDPSession -> Aff Unit -inputSynthesizeTapGesture p = void <<< Promise.toAffE <<< send p "Input.synthesizeTapGesture" +inputSynthesizeTapGesture p = void <<< FFI.promiseToAff <<< send p "Input.synthesizeTapGesture" inspectorDisable :: CDPSession -> Aff Unit -inspectorDisable = void <<< Promise.toAffE <<< send0 "Inspector.disable" +inspectorDisable = void <<< FFI.promiseToAff <<< send0 "Inspector.disable" inspectorEnable :: CDPSession -> Aff Unit -inspectorEnable = void <<< Promise.toAffE <<< send0 "Inspector.enable" +inspectorEnable = void <<< FFI.promiseToAff <<< send0 "Inspector.enable" layerTreeCompositingReasons :: Foreign -> CDPSession -> Aff Foreign -layerTreeCompositingReasons p = Promise.toAffE <<< send p "LayerTree.compositingReasons" +layerTreeCompositingReasons p = FFI.promiseToAff <<< send p "LayerTree.compositingReasons" layerTreeDisable :: CDPSession -> Aff Unit -layerTreeDisable = void <<< Promise.toAffE <<< send0 "LayerTree.disable" +layerTreeDisable = void <<< FFI.promiseToAff <<< send0 "LayerTree.disable" layerTreeEnable :: CDPSession -> Aff Unit -layerTreeEnable = void <<< Promise.toAffE <<< send0 "LayerTree.enable" +layerTreeEnable = void <<< FFI.promiseToAff <<< send0 "LayerTree.enable" layerTreeLoadSnapshot :: Foreign -> CDPSession -> Aff Foreign -layerTreeLoadSnapshot p = Promise.toAffE <<< send p "LayerTree.loadSnapshot" +layerTreeLoadSnapshot p = FFI.promiseToAff <<< send p "LayerTree.loadSnapshot" layerTreeMakeSnapshot :: Foreign -> CDPSession -> Aff Foreign -layerTreeMakeSnapshot p = Promise.toAffE <<< send p "LayerTree.makeSnapshot" +layerTreeMakeSnapshot p = FFI.promiseToAff <<< send p "LayerTree.makeSnapshot" layerTreeProfileSnapshot :: Foreign -> CDPSession -> Aff Foreign -layerTreeProfileSnapshot p = Promise.toAffE <<< send p "LayerTree.profileSnapshot" +layerTreeProfileSnapshot p = FFI.promiseToAff <<< send p "LayerTree.profileSnapshot" layerTreeReleaseSnapshot :: Foreign -> CDPSession -> Aff Unit -layerTreeReleaseSnapshot p = void <<< Promise.toAffE <<< send p "LayerTree.releaseSnapshot" +layerTreeReleaseSnapshot p = void <<< FFI.promiseToAff <<< send p "LayerTree.releaseSnapshot" layerTreeReplaySnapshot :: Foreign -> CDPSession -> Aff Foreign -layerTreeReplaySnapshot p = Promise.toAffE <<< send p "LayerTree.replaySnapshot" +layerTreeReplaySnapshot p = FFI.promiseToAff <<< send p "LayerTree.replaySnapshot" layerTreeSnapshotCommandLog :: Foreign -> CDPSession -> Aff Foreign -layerTreeSnapshotCommandLog p = Promise.toAffE <<< send p "LayerTree.snapshotCommandLog" +layerTreeSnapshotCommandLog p = FFI.promiseToAff <<< send p "LayerTree.snapshotCommandLog" logClear :: CDPSession -> Aff Unit -logClear = void <<< Promise.toAffE <<< send0 "Log.clear" +logClear = void <<< FFI.promiseToAff <<< send0 "Log.clear" logDisable :: CDPSession -> Aff Unit -logDisable = void <<< Promise.toAffE <<< send0 "Log.disable" +logDisable = void <<< FFI.promiseToAff <<< send0 "Log.disable" logEnable :: CDPSession -> Aff Unit -logEnable = void <<< Promise.toAffE <<< send0 "Log.enable" +logEnable = void <<< FFI.promiseToAff <<< send0 "Log.enable" logStartViolationsReport :: Foreign -> CDPSession -> Aff Unit -logStartViolationsReport p = void <<< Promise.toAffE <<< send p "Log.startViolationsReport" +logStartViolationsReport p = void <<< FFI.promiseToAff <<< send p "Log.startViolationsReport" logStopViolationsReport :: CDPSession -> Aff Unit -logStopViolationsReport = void <<< Promise.toAffE <<< send0 "Log.stopViolationsReport" +logStopViolationsReport = void <<< FFI.promiseToAff <<< send0 "Log.stopViolationsReport" memoryGetDOMCounters :: Foreign -> CDPSession -> Aff Foreign -memoryGetDOMCounters p = Promise.toAffE <<< send p "Memory.getDOMCounters" +memoryGetDOMCounters p = FFI.promiseToAff <<< send p "Memory.getDOMCounters" memoryPrepareForLeakDetection :: CDPSession -> Aff Unit -memoryPrepareForLeakDetection = void <<< Promise.toAffE <<< send0 "Memory.prepareForLeakDetection" +memoryPrepareForLeakDetection = void <<< FFI.promiseToAff <<< send0 "Memory.prepareForLeakDetection" memoryForciblyPurgeJavaScriptMemory :: CDPSession -> Aff Unit -memoryForciblyPurgeJavaScriptMemory = void <<< Promise.toAffE <<< send0 "Memory.forciblyPurgeJavaScriptMemory" +memoryForciblyPurgeJavaScriptMemory = void <<< FFI.promiseToAff <<< send0 "Memory.forciblyPurgeJavaScriptMemory" memorySetPressureNotificationsSuppressed :: Foreign -> CDPSession -> Aff Unit -memorySetPressureNotificationsSuppressed p = void <<< Promise.toAffE <<< send p "Memory.setPressureNotificationsSuppressed" +memorySetPressureNotificationsSuppressed p = void <<< FFI.promiseToAff <<< send p "Memory.setPressureNotificationsSuppressed" memorySimulatePressureNotification :: Foreign -> CDPSession -> Aff Unit -memorySimulatePressureNotification p = void <<< Promise.toAffE <<< send p "Memory.simulatePressureNotification" +memorySimulatePressureNotification p = void <<< FFI.promiseToAff <<< send p "Memory.simulatePressureNotification" memoryStartSampling :: Foreign -> CDPSession -> Aff Unit -memoryStartSampling p = void <<< Promise.toAffE <<< send p "Memory.startSampling" +memoryStartSampling p = void <<< FFI.promiseToAff <<< send p "Memory.startSampling" memoryStopSampling :: CDPSession -> Aff Unit -memoryStopSampling = void <<< Promise.toAffE <<< send0 "Memory.stopSampling" +memoryStopSampling = void <<< FFI.promiseToAff <<< send0 "Memory.stopSampling" memoryGetAllTimeSamplingProfile :: Foreign -> CDPSession -> Aff Foreign -memoryGetAllTimeSamplingProfile p = Promise.toAffE <<< send p "Memory.getAllTimeSamplingProfile" +memoryGetAllTimeSamplingProfile p = FFI.promiseToAff <<< send p "Memory.getAllTimeSamplingProfile" memoryGetBrowserSamplingProfile :: Foreign -> CDPSession -> Aff Foreign -memoryGetBrowserSamplingProfile p = Promise.toAffE <<< send p "Memory.getBrowserSamplingProfile" +memoryGetBrowserSamplingProfile p = FFI.promiseToAff <<< send p "Memory.getBrowserSamplingProfile" memoryGetSamplingProfile :: Foreign -> CDPSession -> Aff Foreign -memoryGetSamplingProfile p = Promise.toAffE <<< send p "Memory.getSamplingProfile" +memoryGetSamplingProfile p = FFI.promiseToAff <<< send p "Memory.getSamplingProfile" networkSetAcceptedEncodings :: Foreign -> CDPSession -> Aff Unit -networkSetAcceptedEncodings p = void <<< Promise.toAffE <<< send p "Network.setAcceptedEncodings" +networkSetAcceptedEncodings p = void <<< FFI.promiseToAff <<< send p "Network.setAcceptedEncodings" networkClearAcceptedEncodingsOverride :: CDPSession -> Aff Unit -networkClearAcceptedEncodingsOverride = void <<< Promise.toAffE <<< send0 "Network.clearAcceptedEncodingsOverride" +networkClearAcceptedEncodingsOverride = void <<< FFI.promiseToAff <<< send0 "Network.clearAcceptedEncodingsOverride" networkCanClearBrowserCache :: Foreign -> CDPSession -> Aff Foreign -networkCanClearBrowserCache p = Promise.toAffE <<< send p "Network.canClearBrowserCache" +networkCanClearBrowserCache p = FFI.promiseToAff <<< send p "Network.canClearBrowserCache" networkCanClearBrowserCookies :: Foreign -> CDPSession -> Aff Foreign -networkCanClearBrowserCookies p = Promise.toAffE <<< send p "Network.canClearBrowserCookies" +networkCanClearBrowserCookies p = FFI.promiseToAff <<< send p "Network.canClearBrowserCookies" networkCanEmulateNetworkConditions :: Foreign -> CDPSession -> Aff Foreign -networkCanEmulateNetworkConditions p = Promise.toAffE <<< send p "Network.canEmulateNetworkConditions" +networkCanEmulateNetworkConditions p = FFI.promiseToAff <<< send p "Network.canEmulateNetworkConditions" networkClearBrowserCache :: CDPSession -> Aff Unit -networkClearBrowserCache = void <<< Promise.toAffE <<< send0 "Network.clearBrowserCache" +networkClearBrowserCache = void <<< FFI.promiseToAff <<< send0 "Network.clearBrowserCache" networkClearBrowserCookies :: CDPSession -> Aff Unit -networkClearBrowserCookies = void <<< Promise.toAffE <<< send0 "Network.clearBrowserCookies" +networkClearBrowserCookies = void <<< FFI.promiseToAff <<< send0 "Network.clearBrowserCookies" networkContinueInterceptedRequest :: Foreign -> CDPSession -> Aff Unit -networkContinueInterceptedRequest p = void <<< Promise.toAffE <<< send p "Network.continueInterceptedRequest" +networkContinueInterceptedRequest p = void <<< FFI.promiseToAff <<< send p "Network.continueInterceptedRequest" networkDeleteCookies :: Foreign -> CDPSession -> Aff Unit -networkDeleteCookies p = void <<< Promise.toAffE <<< send p "Network.deleteCookies" +networkDeleteCookies p = void <<< FFI.promiseToAff <<< send p "Network.deleteCookies" networkDisable :: CDPSession -> Aff Unit -networkDisable = void <<< Promise.toAffE <<< send0 "Network.disable" +networkDisable = void <<< FFI.promiseToAff <<< send0 "Network.disable" networkEmulateNetworkConditions :: Foreign -> CDPSession -> Aff Unit -networkEmulateNetworkConditions p = void <<< Promise.toAffE <<< send p "Network.emulateNetworkConditions" +networkEmulateNetworkConditions p = void <<< FFI.promiseToAff <<< send p "Network.emulateNetworkConditions" networkEnable :: Foreign -> CDPSession -> Aff Unit -networkEnable p = void <<< Promise.toAffE <<< send p "Network.enable" +networkEnable p = void <<< FFI.promiseToAff <<< send p "Network.enable" networkGetAllCookies :: Foreign -> CDPSession -> Aff Foreign -networkGetAllCookies p = Promise.toAffE <<< send p "Network.getAllCookies" +networkGetAllCookies p = FFI.promiseToAff <<< send p "Network.getAllCookies" networkGetCertificate :: Foreign -> CDPSession -> Aff Foreign -networkGetCertificate p = Promise.toAffE <<< send p "Network.getCertificate" +networkGetCertificate p = FFI.promiseToAff <<< send p "Network.getCertificate" networkGetCookies :: Foreign -> CDPSession -> Aff Foreign -networkGetCookies p = Promise.toAffE <<< send p "Network.getCookies" +networkGetCookies p = FFI.promiseToAff <<< send p "Network.getCookies" networkGetResponseBody :: Foreign -> CDPSession -> Aff Foreign -networkGetResponseBody p = Promise.toAffE <<< send p "Network.getResponseBody" +networkGetResponseBody p = FFI.promiseToAff <<< send p "Network.getResponseBody" networkGetRequestPostData :: Foreign -> CDPSession -> Aff Foreign -networkGetRequestPostData p = Promise.toAffE <<< send p "Network.getRequestPostData" +networkGetRequestPostData p = FFI.promiseToAff <<< send p "Network.getRequestPostData" networkGetResponseBodyForInterception :: Foreign -> CDPSession -> Aff Foreign -networkGetResponseBodyForInterception p = Promise.toAffE <<< send p "Network.getResponseBodyForInterception" +networkGetResponseBodyForInterception p = FFI.promiseToAff <<< send p "Network.getResponseBodyForInterception" networkTakeResponseBodyForInterceptionAsStream :: Foreign -> CDPSession -> Aff Foreign -networkTakeResponseBodyForInterceptionAsStream p = Promise.toAffE <<< send p "Network.takeResponseBodyForInterceptionAsStream" +networkTakeResponseBodyForInterceptionAsStream p = FFI.promiseToAff <<< send p "Network.takeResponseBodyForInterceptionAsStream" networkReplayXHR :: Foreign -> CDPSession -> Aff Unit -networkReplayXHR p = void <<< Promise.toAffE <<< send p "Network.replayXHR" +networkReplayXHR p = void <<< FFI.promiseToAff <<< send p "Network.replayXHR" networkSearchInResponseBody :: Foreign -> CDPSession -> Aff Foreign -networkSearchInResponseBody p = Promise.toAffE <<< send p "Network.searchInResponseBody" +networkSearchInResponseBody p = FFI.promiseToAff <<< send p "Network.searchInResponseBody" networkSetBlockedURLs :: Foreign -> CDPSession -> Aff Unit -networkSetBlockedURLs p = void <<< Promise.toAffE <<< send p "Network.setBlockedURLs" +networkSetBlockedURLs p = void <<< FFI.promiseToAff <<< send p "Network.setBlockedURLs" networkSetBypassServiceWorker :: Foreign -> CDPSession -> Aff Unit -networkSetBypassServiceWorker p = void <<< Promise.toAffE <<< send p "Network.setBypassServiceWorker" +networkSetBypassServiceWorker p = void <<< FFI.promiseToAff <<< send p "Network.setBypassServiceWorker" networkSetCacheDisabled :: Foreign -> CDPSession -> Aff Unit -networkSetCacheDisabled p = void <<< Promise.toAffE <<< send p "Network.setCacheDisabled" +networkSetCacheDisabled p = void <<< FFI.promiseToAff <<< send p "Network.setCacheDisabled" networkSetCookie :: Foreign -> CDPSession -> Aff Foreign -networkSetCookie p = Promise.toAffE <<< send p "Network.setCookie" +networkSetCookie p = FFI.promiseToAff <<< send p "Network.setCookie" networkSetCookies :: Foreign -> CDPSession -> Aff Unit -networkSetCookies p = void <<< Promise.toAffE <<< send p "Network.setCookies" +networkSetCookies p = void <<< FFI.promiseToAff <<< send p "Network.setCookies" networkSetExtraHTTPHeaders :: Foreign -> CDPSession -> Aff Unit -networkSetExtraHTTPHeaders p = void <<< Promise.toAffE <<< send p "Network.setExtraHTTPHeaders" +networkSetExtraHTTPHeaders p = void <<< FFI.promiseToAff <<< send p "Network.setExtraHTTPHeaders" networkSetAttachDebugStack :: Foreign -> CDPSession -> Aff Unit -networkSetAttachDebugStack p = void <<< Promise.toAffE <<< send p "Network.setAttachDebugStack" +networkSetAttachDebugStack p = void <<< FFI.promiseToAff <<< send p "Network.setAttachDebugStack" networkSetRequestInterception :: Foreign -> CDPSession -> Aff Unit -networkSetRequestInterception p = void <<< Promise.toAffE <<< send p "Network.setRequestInterception" +networkSetRequestInterception p = void <<< FFI.promiseToAff <<< send p "Network.setRequestInterception" networkSetUserAgentOverride :: Foreign -> CDPSession -> Aff Unit -networkSetUserAgentOverride p = void <<< Promise.toAffE <<< send p "Network.setUserAgentOverride" +networkSetUserAgentOverride p = void <<< FFI.promiseToAff <<< send p "Network.setUserAgentOverride" networkGetSecurityIsolationStatus :: Foreign -> CDPSession -> Aff Foreign -networkGetSecurityIsolationStatus p = Promise.toAffE <<< send p "Network.getSecurityIsolationStatus" +networkGetSecurityIsolationStatus p = FFI.promiseToAff <<< send p "Network.getSecurityIsolationStatus" networkEnableReportingApi :: Foreign -> CDPSession -> Aff Unit -networkEnableReportingApi p = void <<< Promise.toAffE <<< send p "Network.enableReportingApi" +networkEnableReportingApi p = void <<< FFI.promiseToAff <<< send p "Network.enableReportingApi" networkLoadNetworkResource :: Foreign -> CDPSession -> Aff Foreign -networkLoadNetworkResource p = Promise.toAffE <<< send p "Network.loadNetworkResource" +networkLoadNetworkResource p = FFI.promiseToAff <<< send p "Network.loadNetworkResource" overlayDisable :: CDPSession -> Aff Unit -overlayDisable = void <<< Promise.toAffE <<< send0 "Overlay.disable" +overlayDisable = void <<< FFI.promiseToAff <<< send0 "Overlay.disable" overlayEnable :: CDPSession -> Aff Unit -overlayEnable = void <<< Promise.toAffE <<< send0 "Overlay.enable" +overlayEnable = void <<< FFI.promiseToAff <<< send0 "Overlay.enable" overlayGetHighlightObjectForTest :: Foreign -> CDPSession -> Aff Foreign -overlayGetHighlightObjectForTest p = Promise.toAffE <<< send p "Overlay.getHighlightObjectForTest" +overlayGetHighlightObjectForTest p = FFI.promiseToAff <<< send p "Overlay.getHighlightObjectForTest" overlayGetGridHighlightObjectsForTest :: Foreign -> CDPSession -> Aff Foreign -overlayGetGridHighlightObjectsForTest p = Promise.toAffE <<< send p "Overlay.getGridHighlightObjectsForTest" +overlayGetGridHighlightObjectsForTest p = FFI.promiseToAff <<< send p "Overlay.getGridHighlightObjectsForTest" overlayGetSourceOrderHighlightObjectForTest :: Foreign -> CDPSession -> Aff Foreign -overlayGetSourceOrderHighlightObjectForTest p = Promise.toAffE <<< send p "Overlay.getSourceOrderHighlightObjectForTest" +overlayGetSourceOrderHighlightObjectForTest p = FFI.promiseToAff <<< send p "Overlay.getSourceOrderHighlightObjectForTest" overlayHideHighlight :: CDPSession -> Aff Unit -overlayHideHighlight = void <<< Promise.toAffE <<< send0 "Overlay.hideHighlight" +overlayHideHighlight = void <<< FFI.promiseToAff <<< send0 "Overlay.hideHighlight" overlayHighlightFrame :: Foreign -> CDPSession -> Aff Unit -overlayHighlightFrame p = void <<< Promise.toAffE <<< send p "Overlay.highlightFrame" +overlayHighlightFrame p = void <<< FFI.promiseToAff <<< send p "Overlay.highlightFrame" overlayHighlightNode :: Foreign -> CDPSession -> Aff Unit -overlayHighlightNode p = void <<< Promise.toAffE <<< send p "Overlay.highlightNode" +overlayHighlightNode p = void <<< FFI.promiseToAff <<< send p "Overlay.highlightNode" overlayHighlightQuad :: Foreign -> CDPSession -> Aff Unit -overlayHighlightQuad p = void <<< Promise.toAffE <<< send p "Overlay.highlightQuad" +overlayHighlightQuad p = void <<< FFI.promiseToAff <<< send p "Overlay.highlightQuad" overlayHighlightRect :: Foreign -> CDPSession -> Aff Unit -overlayHighlightRect p = void <<< Promise.toAffE <<< send p "Overlay.highlightRect" +overlayHighlightRect p = void <<< FFI.promiseToAff <<< send p "Overlay.highlightRect" overlayHighlightSourceOrder :: Foreign -> CDPSession -> Aff Unit -overlayHighlightSourceOrder p = void <<< Promise.toAffE <<< send p "Overlay.highlightSourceOrder" +overlayHighlightSourceOrder p = void <<< FFI.promiseToAff <<< send p "Overlay.highlightSourceOrder" overlaySetInspectMode :: Foreign -> CDPSession -> Aff Unit -overlaySetInspectMode p = void <<< Promise.toAffE <<< send p "Overlay.setInspectMode" +overlaySetInspectMode p = void <<< FFI.promiseToAff <<< send p "Overlay.setInspectMode" overlaySetShowAdHighlights :: Foreign -> CDPSession -> Aff Unit -overlaySetShowAdHighlights p = void <<< Promise.toAffE <<< send p "Overlay.setShowAdHighlights" +overlaySetShowAdHighlights p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowAdHighlights" overlaySetPausedInDebuggerMessage :: Foreign -> CDPSession -> Aff Unit -overlaySetPausedInDebuggerMessage p = void <<< Promise.toAffE <<< send p "Overlay.setPausedInDebuggerMessage" +overlaySetPausedInDebuggerMessage p = void <<< FFI.promiseToAff <<< send p "Overlay.setPausedInDebuggerMessage" overlaySetShowDebugBorders :: Foreign -> CDPSession -> Aff Unit -overlaySetShowDebugBorders p = void <<< Promise.toAffE <<< send p "Overlay.setShowDebugBorders" +overlaySetShowDebugBorders p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowDebugBorders" overlaySetShowFPSCounter :: Foreign -> CDPSession -> Aff Unit -overlaySetShowFPSCounter p = void <<< Promise.toAffE <<< send p "Overlay.setShowFPSCounter" +overlaySetShowFPSCounter p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowFPSCounter" overlaySetShowGridOverlays :: Foreign -> CDPSession -> Aff Unit -overlaySetShowGridOverlays p = void <<< Promise.toAffE <<< send p "Overlay.setShowGridOverlays" +overlaySetShowGridOverlays p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowGridOverlays" overlaySetShowFlexOverlays :: Foreign -> CDPSession -> Aff Unit -overlaySetShowFlexOverlays p = void <<< Promise.toAffE <<< send p "Overlay.setShowFlexOverlays" +overlaySetShowFlexOverlays p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowFlexOverlays" overlaySetShowScrollSnapOverlays :: Foreign -> CDPSession -> Aff Unit -overlaySetShowScrollSnapOverlays p = void <<< Promise.toAffE <<< send p "Overlay.setShowScrollSnapOverlays" +overlaySetShowScrollSnapOverlays p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowScrollSnapOverlays" overlaySetShowContainerQueryOverlays :: Foreign -> CDPSession -> Aff Unit -overlaySetShowContainerQueryOverlays p = void <<< Promise.toAffE <<< send p "Overlay.setShowContainerQueryOverlays" +overlaySetShowContainerQueryOverlays p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowContainerQueryOverlays" overlaySetShowPaintRects :: Foreign -> CDPSession -> Aff Unit -overlaySetShowPaintRects p = void <<< Promise.toAffE <<< send p "Overlay.setShowPaintRects" +overlaySetShowPaintRects p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowPaintRects" overlaySetShowLayoutShiftRegions :: Foreign -> CDPSession -> Aff Unit -overlaySetShowLayoutShiftRegions p = void <<< Promise.toAffE <<< send p "Overlay.setShowLayoutShiftRegions" +overlaySetShowLayoutShiftRegions p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowLayoutShiftRegions" overlaySetShowScrollBottleneckRects :: Foreign -> CDPSession -> Aff Unit -overlaySetShowScrollBottleneckRects p = void <<< Promise.toAffE <<< send p "Overlay.setShowScrollBottleneckRects" +overlaySetShowScrollBottleneckRects p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowScrollBottleneckRects" overlaySetShowHitTestBorders :: Foreign -> CDPSession -> Aff Unit -overlaySetShowHitTestBorders p = void <<< Promise.toAffE <<< send p "Overlay.setShowHitTestBorders" +overlaySetShowHitTestBorders p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowHitTestBorders" overlaySetShowWebVitals :: Foreign -> CDPSession -> Aff Unit -overlaySetShowWebVitals p = void <<< Promise.toAffE <<< send p "Overlay.setShowWebVitals" +overlaySetShowWebVitals p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowWebVitals" overlaySetShowViewportSizeOnResize :: Foreign -> CDPSession -> Aff Unit -overlaySetShowViewportSizeOnResize p = void <<< Promise.toAffE <<< send p "Overlay.setShowViewportSizeOnResize" +overlaySetShowViewportSizeOnResize p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowViewportSizeOnResize" overlaySetShowHinge :: Foreign -> CDPSession -> Aff Unit -overlaySetShowHinge p = void <<< Promise.toAffE <<< send p "Overlay.setShowHinge" +overlaySetShowHinge p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowHinge" overlaySetShowIsolatedElements :: Foreign -> CDPSession -> Aff Unit -overlaySetShowIsolatedElements p = void <<< Promise.toAffE <<< send p "Overlay.setShowIsolatedElements" +overlaySetShowIsolatedElements p = void <<< FFI.promiseToAff <<< send p "Overlay.setShowIsolatedElements" pageAddScriptToEvaluateOnLoad :: Foreign -> CDPSession -> Aff Foreign -pageAddScriptToEvaluateOnLoad p = Promise.toAffE <<< send p "Page.addScriptToEvaluateOnLoad" +pageAddScriptToEvaluateOnLoad p = FFI.promiseToAff <<< send p "Page.addScriptToEvaluateOnLoad" pageAddScriptToEvaluateOnNewDocument :: Foreign -> CDPSession -> Aff Foreign -pageAddScriptToEvaluateOnNewDocument p = Promise.toAffE <<< send p "Page.addScriptToEvaluateOnNewDocument" +pageAddScriptToEvaluateOnNewDocument p = FFI.promiseToAff <<< send p "Page.addScriptToEvaluateOnNewDocument" pageBringToFront :: CDPSession -> Aff Unit -pageBringToFront = void <<< Promise.toAffE <<< send0 "Page.bringToFront" +pageBringToFront = void <<< FFI.promiseToAff <<< send0 "Page.bringToFront" pageCaptureScreenshot :: Foreign -> CDPSession -> Aff Foreign -pageCaptureScreenshot p = Promise.toAffE <<< send p "Page.captureScreenshot" +pageCaptureScreenshot p = FFI.promiseToAff <<< send p "Page.captureScreenshot" pageCaptureSnapshot :: Foreign -> CDPSession -> Aff Foreign -pageCaptureSnapshot p = Promise.toAffE <<< send p "Page.captureSnapshot" +pageCaptureSnapshot p = FFI.promiseToAff <<< send p "Page.captureSnapshot" pageClearDeviceMetricsOverride :: CDPSession -> Aff Unit -pageClearDeviceMetricsOverride = void <<< Promise.toAffE <<< send0 "Page.clearDeviceMetricsOverride" +pageClearDeviceMetricsOverride = void <<< FFI.promiseToAff <<< send0 "Page.clearDeviceMetricsOverride" pageClearDeviceOrientationOverride :: CDPSession -> Aff Unit -pageClearDeviceOrientationOverride = void <<< Promise.toAffE <<< send0 "Page.clearDeviceOrientationOverride" +pageClearDeviceOrientationOverride = void <<< FFI.promiseToAff <<< send0 "Page.clearDeviceOrientationOverride" pageClearGeolocationOverride :: CDPSession -> Aff Unit -pageClearGeolocationOverride = void <<< Promise.toAffE <<< send0 "Page.clearGeolocationOverride" +pageClearGeolocationOverride = void <<< FFI.promiseToAff <<< send0 "Page.clearGeolocationOverride" pageCreateIsolatedWorld :: Foreign -> CDPSession -> Aff Foreign -pageCreateIsolatedWorld p = Promise.toAffE <<< send p "Page.createIsolatedWorld" +pageCreateIsolatedWorld p = FFI.promiseToAff <<< send p "Page.createIsolatedWorld" pageDeleteCookie :: Foreign -> CDPSession -> Aff Unit -pageDeleteCookie p = void <<< Promise.toAffE <<< send p "Page.deleteCookie" +pageDeleteCookie p = void <<< FFI.promiseToAff <<< send p "Page.deleteCookie" pageDisable :: CDPSession -> Aff Unit -pageDisable = void <<< Promise.toAffE <<< send0 "Page.disable" +pageDisable = void <<< FFI.promiseToAff <<< send0 "Page.disable" pageEnable :: CDPSession -> Aff Unit -pageEnable = void <<< Promise.toAffE <<< send0 "Page.enable" +pageEnable = void <<< FFI.promiseToAff <<< send0 "Page.enable" pageGetAppManifest :: Foreign -> CDPSession -> Aff Foreign -pageGetAppManifest p = Promise.toAffE <<< send p "Page.getAppManifest" +pageGetAppManifest p = FFI.promiseToAff <<< send p "Page.getAppManifest" pageGetInstallabilityErrors :: Foreign -> CDPSession -> Aff Foreign -pageGetInstallabilityErrors p = Promise.toAffE <<< send p "Page.getInstallabilityErrors" +pageGetInstallabilityErrors p = FFI.promiseToAff <<< send p "Page.getInstallabilityErrors" pageGetManifestIcons :: Foreign -> CDPSession -> Aff Foreign -pageGetManifestIcons p = Promise.toAffE <<< send p "Page.getManifestIcons" +pageGetManifestIcons p = FFI.promiseToAff <<< send p "Page.getManifestIcons" pageGetAppId :: Foreign -> CDPSession -> Aff Foreign -pageGetAppId p = Promise.toAffE <<< send p "Page.getAppId" +pageGetAppId p = FFI.promiseToAff <<< send p "Page.getAppId" pageGetAdScriptId :: Foreign -> CDPSession -> Aff Foreign -pageGetAdScriptId p = Promise.toAffE <<< send p "Page.getAdScriptId" +pageGetAdScriptId p = FFI.promiseToAff <<< send p "Page.getAdScriptId" pageGetCookies :: Foreign -> CDPSession -> Aff Foreign -pageGetCookies p = Promise.toAffE <<< send p "Page.getCookies" +pageGetCookies p = FFI.promiseToAff <<< send p "Page.getCookies" pageGetFrameTree :: Foreign -> CDPSession -> Aff Foreign -pageGetFrameTree p = Promise.toAffE <<< send p "Page.getFrameTree" +pageGetFrameTree p = FFI.promiseToAff <<< send p "Page.getFrameTree" pageGetLayoutMetrics :: Foreign -> CDPSession -> Aff Foreign -pageGetLayoutMetrics p = Promise.toAffE <<< send p "Page.getLayoutMetrics" +pageGetLayoutMetrics p = FFI.promiseToAff <<< send p "Page.getLayoutMetrics" pageGetNavigationHistory :: Foreign -> CDPSession -> Aff Foreign -pageGetNavigationHistory p = Promise.toAffE <<< send p "Page.getNavigationHistory" +pageGetNavigationHistory p = FFI.promiseToAff <<< send p "Page.getNavigationHistory" pageResetNavigationHistory :: CDPSession -> Aff Unit -pageResetNavigationHistory = void <<< Promise.toAffE <<< send0 "Page.resetNavigationHistory" +pageResetNavigationHistory = void <<< FFI.promiseToAff <<< send0 "Page.resetNavigationHistory" pageGetResourceContent :: Foreign -> CDPSession -> Aff Foreign -pageGetResourceContent p = Promise.toAffE <<< send p "Page.getResourceContent" +pageGetResourceContent p = FFI.promiseToAff <<< send p "Page.getResourceContent" pageGetResourceTree :: Foreign -> CDPSession -> Aff Foreign -pageGetResourceTree p = Promise.toAffE <<< send p "Page.getResourceTree" +pageGetResourceTree p = FFI.promiseToAff <<< send p "Page.getResourceTree" pageHandleJavaScriptDialog :: Foreign -> CDPSession -> Aff Unit -pageHandleJavaScriptDialog p = void <<< Promise.toAffE <<< send p "Page.handleJavaScriptDialog" +pageHandleJavaScriptDialog p = void <<< FFI.promiseToAff <<< send p "Page.handleJavaScriptDialog" pageNavigate :: Foreign -> CDPSession -> Aff Foreign -pageNavigate p = Promise.toAffE <<< send p "Page.navigate" +pageNavigate p = FFI.promiseToAff <<< send p "Page.navigate" pageNavigateToHistoryEntry :: Foreign -> CDPSession -> Aff Unit -pageNavigateToHistoryEntry p = void <<< Promise.toAffE <<< send p "Page.navigateToHistoryEntry" +pageNavigateToHistoryEntry p = void <<< FFI.promiseToAff <<< send p "Page.navigateToHistoryEntry" pagePrintToPDF :: Foreign -> CDPSession -> Aff Foreign -pagePrintToPDF p = Promise.toAffE <<< send p "Page.printToPDF" +pagePrintToPDF p = FFI.promiseToAff <<< send p "Page.printToPDF" pageReload :: Foreign -> CDPSession -> Aff Unit -pageReload p = void <<< Promise.toAffE <<< send p "Page.reload" +pageReload p = void <<< FFI.promiseToAff <<< send p "Page.reload" pageRemoveScriptToEvaluateOnLoad :: Foreign -> CDPSession -> Aff Unit -pageRemoveScriptToEvaluateOnLoad p = void <<< Promise.toAffE <<< send p "Page.removeScriptToEvaluateOnLoad" +pageRemoveScriptToEvaluateOnLoad p = void <<< FFI.promiseToAff <<< send p "Page.removeScriptToEvaluateOnLoad" pageRemoveScriptToEvaluateOnNewDocument :: Foreign -> CDPSession -> Aff Unit -pageRemoveScriptToEvaluateOnNewDocument p = void <<< Promise.toAffE <<< send p "Page.removeScriptToEvaluateOnNewDocument" +pageRemoveScriptToEvaluateOnNewDocument p = void <<< FFI.promiseToAff <<< send p "Page.removeScriptToEvaluateOnNewDocument" pageScreencastFrameAck :: Foreign -> CDPSession -> Aff Unit -pageScreencastFrameAck p = void <<< Promise.toAffE <<< send p "Page.screencastFrameAck" +pageScreencastFrameAck p = void <<< FFI.promiseToAff <<< send p "Page.screencastFrameAck" pageSearchInResource :: Foreign -> CDPSession -> Aff Foreign -pageSearchInResource p = Promise.toAffE <<< send p "Page.searchInResource" +pageSearchInResource p = FFI.promiseToAff <<< send p "Page.searchInResource" pageSetAdBlockingEnabled :: Foreign -> CDPSession -> Aff Unit -pageSetAdBlockingEnabled p = void <<< Promise.toAffE <<< send p "Page.setAdBlockingEnabled" +pageSetAdBlockingEnabled p = void <<< FFI.promiseToAff <<< send p "Page.setAdBlockingEnabled" pageSetBypassCSP :: Foreign -> CDPSession -> Aff Unit -pageSetBypassCSP p = void <<< Promise.toAffE <<< send p "Page.setBypassCSP" +pageSetBypassCSP p = void <<< FFI.promiseToAff <<< send p "Page.setBypassCSP" pageGetPermissionsPolicyState :: Foreign -> CDPSession -> Aff Foreign -pageGetPermissionsPolicyState p = Promise.toAffE <<< send p "Page.getPermissionsPolicyState" +pageGetPermissionsPolicyState p = FFI.promiseToAff <<< send p "Page.getPermissionsPolicyState" pageGetOriginTrials :: Foreign -> CDPSession -> Aff Foreign -pageGetOriginTrials p = Promise.toAffE <<< send p "Page.getOriginTrials" +pageGetOriginTrials p = FFI.promiseToAff <<< send p "Page.getOriginTrials" pageSetDeviceMetricsOverride :: Foreign -> CDPSession -> Aff Unit -pageSetDeviceMetricsOverride p = void <<< Promise.toAffE <<< send p "Page.setDeviceMetricsOverride" +pageSetDeviceMetricsOverride p = void <<< FFI.promiseToAff <<< send p "Page.setDeviceMetricsOverride" pageSetDeviceOrientationOverride :: Foreign -> CDPSession -> Aff Unit -pageSetDeviceOrientationOverride p = void <<< Promise.toAffE <<< send p "Page.setDeviceOrientationOverride" +pageSetDeviceOrientationOverride p = void <<< FFI.promiseToAff <<< send p "Page.setDeviceOrientationOverride" pageSetFontFamilies :: Foreign -> CDPSession -> Aff Unit -pageSetFontFamilies p = void <<< Promise.toAffE <<< send p "Page.setFontFamilies" +pageSetFontFamilies p = void <<< FFI.promiseToAff <<< send p "Page.setFontFamilies" pageSetFontSizes :: Foreign -> CDPSession -> Aff Unit -pageSetFontSizes p = void <<< Promise.toAffE <<< send p "Page.setFontSizes" +pageSetFontSizes p = void <<< FFI.promiseToAff <<< send p "Page.setFontSizes" pageSetDocumentContent :: Foreign -> CDPSession -> Aff Unit -pageSetDocumentContent p = void <<< Promise.toAffE <<< send p "Page.setDocumentContent" +pageSetDocumentContent p = void <<< FFI.promiseToAff <<< send p "Page.setDocumentContent" pageSetDownloadBehavior :: Foreign -> CDPSession -> Aff Unit -pageSetDownloadBehavior p = void <<< Promise.toAffE <<< send p "Page.setDownloadBehavior" +pageSetDownloadBehavior p = void <<< FFI.promiseToAff <<< send p "Page.setDownloadBehavior" pageSetGeolocationOverride :: Foreign -> CDPSession -> Aff Unit -pageSetGeolocationOverride p = void <<< Promise.toAffE <<< send p "Page.setGeolocationOverride" +pageSetGeolocationOverride p = void <<< FFI.promiseToAff <<< send p "Page.setGeolocationOverride" pageSetLifecycleEventsEnabled :: Foreign -> CDPSession -> Aff Unit -pageSetLifecycleEventsEnabled p = void <<< Promise.toAffE <<< send p "Page.setLifecycleEventsEnabled" +pageSetLifecycleEventsEnabled p = void <<< FFI.promiseToAff <<< send p "Page.setLifecycleEventsEnabled" pageSetTouchEmulationEnabled :: Foreign -> CDPSession -> Aff Unit -pageSetTouchEmulationEnabled p = void <<< Promise.toAffE <<< send p "Page.setTouchEmulationEnabled" +pageSetTouchEmulationEnabled p = void <<< FFI.promiseToAff <<< send p "Page.setTouchEmulationEnabled" pageStartScreencast :: Foreign -> CDPSession -> Aff Unit -pageStartScreencast p = void <<< Promise.toAffE <<< send p "Page.startScreencast" +pageStartScreencast p = void <<< FFI.promiseToAff <<< send p "Page.startScreencast" pageStopLoading :: CDPSession -> Aff Unit -pageStopLoading = void <<< Promise.toAffE <<< send0 "Page.stopLoading" +pageStopLoading = void <<< FFI.promiseToAff <<< send0 "Page.stopLoading" pageCrash :: CDPSession -> Aff Unit -pageCrash = void <<< Promise.toAffE <<< send0 "Page.crash" +pageCrash = void <<< FFI.promiseToAff <<< send0 "Page.crash" pageClose :: CDPSession -> Aff Unit -pageClose = void <<< Promise.toAffE <<< send0 "Page.close" +pageClose = void <<< FFI.promiseToAff <<< send0 "Page.close" pageSetWebLifecycleState :: Foreign -> CDPSession -> Aff Unit -pageSetWebLifecycleState p = void <<< Promise.toAffE <<< send p "Page.setWebLifecycleState" +pageSetWebLifecycleState p = void <<< FFI.promiseToAff <<< send p "Page.setWebLifecycleState" pageStopScreencast :: CDPSession -> Aff Unit -pageStopScreencast = void <<< Promise.toAffE <<< send0 "Page.stopScreencast" +pageStopScreencast = void <<< FFI.promiseToAff <<< send0 "Page.stopScreencast" pageProduceCompilationCache :: Foreign -> CDPSession -> Aff Unit -pageProduceCompilationCache p = void <<< Promise.toAffE <<< send p "Page.produceCompilationCache" +pageProduceCompilationCache p = void <<< FFI.promiseToAff <<< send p "Page.produceCompilationCache" pageAddCompilationCache :: Foreign -> CDPSession -> Aff Unit -pageAddCompilationCache p = void <<< Promise.toAffE <<< send p "Page.addCompilationCache" +pageAddCompilationCache p = void <<< FFI.promiseToAff <<< send p "Page.addCompilationCache" pageClearCompilationCache :: CDPSession -> Aff Unit -pageClearCompilationCache = void <<< Promise.toAffE <<< send0 "Page.clearCompilationCache" +pageClearCompilationCache = void <<< FFI.promiseToAff <<< send0 "Page.clearCompilationCache" pageSetSPCTransactionMode :: Foreign -> CDPSession -> Aff Unit -pageSetSPCTransactionMode p = void <<< Promise.toAffE <<< send p "Page.setSPCTransactionMode" +pageSetSPCTransactionMode p = void <<< FFI.promiseToAff <<< send p "Page.setSPCTransactionMode" pageSetRPHRegistrationMode :: Foreign -> CDPSession -> Aff Unit -pageSetRPHRegistrationMode p = void <<< Promise.toAffE <<< send p "Page.setRPHRegistrationMode" +pageSetRPHRegistrationMode p = void <<< FFI.promiseToAff <<< send p "Page.setRPHRegistrationMode" pageGenerateTestReport :: Foreign -> CDPSession -> Aff Unit -pageGenerateTestReport p = void <<< Promise.toAffE <<< send p "Page.generateTestReport" +pageGenerateTestReport p = void <<< FFI.promiseToAff <<< send p "Page.generateTestReport" pageWaitForDebugger :: CDPSession -> Aff Unit -pageWaitForDebugger = void <<< Promise.toAffE <<< send0 "Page.waitForDebugger" +pageWaitForDebugger = void <<< FFI.promiseToAff <<< send0 "Page.waitForDebugger" pageSetInterceptFileChooserDialog :: Foreign -> CDPSession -> Aff Unit -pageSetInterceptFileChooserDialog p = void <<< Promise.toAffE <<< send p "Page.setInterceptFileChooserDialog" +pageSetInterceptFileChooserDialog p = void <<< FFI.promiseToAff <<< send p "Page.setInterceptFileChooserDialog" pageSetPrerenderingAllowed :: Foreign -> CDPSession -> Aff Unit -pageSetPrerenderingAllowed p = void <<< Promise.toAffE <<< send p "Page.setPrerenderingAllowed" +pageSetPrerenderingAllowed p = void <<< FFI.promiseToAff <<< send p "Page.setPrerenderingAllowed" performanceDisable :: CDPSession -> Aff Unit -performanceDisable = void <<< Promise.toAffE <<< send0 "Performance.disable" +performanceDisable = void <<< FFI.promiseToAff <<< send0 "Performance.disable" performanceEnable :: Foreign -> CDPSession -> Aff Unit -performanceEnable p = void <<< Promise.toAffE <<< send p "Performance.enable" +performanceEnable p = void <<< FFI.promiseToAff <<< send p "Performance.enable" performanceSetTimeDomain :: Foreign -> CDPSession -> Aff Unit -performanceSetTimeDomain p = void <<< Promise.toAffE <<< send p "Performance.setTimeDomain" +performanceSetTimeDomain p = void <<< FFI.promiseToAff <<< send p "Performance.setTimeDomain" performanceGetMetrics :: Foreign -> CDPSession -> Aff Foreign -performanceGetMetrics p = Promise.toAffE <<< send p "Performance.getMetrics" +performanceGetMetrics p = FFI.promiseToAff <<< send p "Performance.getMetrics" performanceTimelineEnable :: Foreign -> CDPSession -> Aff Unit -performanceTimelineEnable p = void <<< Promise.toAffE <<< send p "PerformanceTimeline.enable" +performanceTimelineEnable p = void <<< FFI.promiseToAff <<< send p "PerformanceTimeline.enable" securityDisable :: CDPSession -> Aff Unit -securityDisable = void <<< Promise.toAffE <<< send0 "Security.disable" +securityDisable = void <<< FFI.promiseToAff <<< send0 "Security.disable" securityEnable :: CDPSession -> Aff Unit -securityEnable = void <<< Promise.toAffE <<< send0 "Security.enable" +securityEnable = void <<< FFI.promiseToAff <<< send0 "Security.enable" securitySetIgnoreCertificateErrors :: Foreign -> CDPSession -> Aff Unit -securitySetIgnoreCertificateErrors p = void <<< Promise.toAffE <<< send p "Security.setIgnoreCertificateErrors" +securitySetIgnoreCertificateErrors p = void <<< FFI.promiseToAff <<< send p "Security.setIgnoreCertificateErrors" securityHandleCertificateError :: Foreign -> CDPSession -> Aff Unit -securityHandleCertificateError p = void <<< Promise.toAffE <<< send p "Security.handleCertificateError" +securityHandleCertificateError p = void <<< FFI.promiseToAff <<< send p "Security.handleCertificateError" securitySetOverrideCertificateErrors :: Foreign -> CDPSession -> Aff Unit -securitySetOverrideCertificateErrors p = void <<< Promise.toAffE <<< send p "Security.setOverrideCertificateErrors" +securitySetOverrideCertificateErrors p = void <<< FFI.promiseToAff <<< send p "Security.setOverrideCertificateErrors" serviceWorkerDeliverPushMessage :: Foreign -> CDPSession -> Aff Unit -serviceWorkerDeliverPushMessage p = void <<< Promise.toAffE <<< send p "ServiceWorker.deliverPushMessage" +serviceWorkerDeliverPushMessage p = void <<< FFI.promiseToAff <<< send p "ServiceWorker.deliverPushMessage" serviceWorkerDisable :: CDPSession -> Aff Unit -serviceWorkerDisable = void <<< Promise.toAffE <<< send0 "ServiceWorker.disable" +serviceWorkerDisable = void <<< FFI.promiseToAff <<< send0 "ServiceWorker.disable" serviceWorkerDispatchSyncEvent :: Foreign -> CDPSession -> Aff Unit -serviceWorkerDispatchSyncEvent p = void <<< Promise.toAffE <<< send p "ServiceWorker.dispatchSyncEvent" +serviceWorkerDispatchSyncEvent p = void <<< FFI.promiseToAff <<< send p "ServiceWorker.dispatchSyncEvent" serviceWorkerDispatchPeriodicSyncEvent :: Foreign -> CDPSession -> Aff Unit -serviceWorkerDispatchPeriodicSyncEvent p = void <<< Promise.toAffE <<< send p "ServiceWorker.dispatchPeriodicSyncEvent" +serviceWorkerDispatchPeriodicSyncEvent p = void <<< FFI.promiseToAff <<< send p "ServiceWorker.dispatchPeriodicSyncEvent" serviceWorkerEnable :: CDPSession -> Aff Unit -serviceWorkerEnable = void <<< Promise.toAffE <<< send0 "ServiceWorker.enable" +serviceWorkerEnable = void <<< FFI.promiseToAff <<< send0 "ServiceWorker.enable" serviceWorkerInspectWorker :: Foreign -> CDPSession -> Aff Unit -serviceWorkerInspectWorker p = void <<< Promise.toAffE <<< send p "ServiceWorker.inspectWorker" +serviceWorkerInspectWorker p = void <<< FFI.promiseToAff <<< send p "ServiceWorker.inspectWorker" serviceWorkerSetForceUpdateOnPageLoad :: Foreign -> CDPSession -> Aff Unit -serviceWorkerSetForceUpdateOnPageLoad p = void <<< Promise.toAffE <<< send p "ServiceWorker.setForceUpdateOnPageLoad" +serviceWorkerSetForceUpdateOnPageLoad p = void <<< FFI.promiseToAff <<< send p "ServiceWorker.setForceUpdateOnPageLoad" serviceWorkerSkipWaiting :: Foreign -> CDPSession -> Aff Unit -serviceWorkerSkipWaiting p = void <<< Promise.toAffE <<< send p "ServiceWorker.skipWaiting" +serviceWorkerSkipWaiting p = void <<< FFI.promiseToAff <<< send p "ServiceWorker.skipWaiting" serviceWorkerStartWorker :: Foreign -> CDPSession -> Aff Unit -serviceWorkerStartWorker p = void <<< Promise.toAffE <<< send p "ServiceWorker.startWorker" +serviceWorkerStartWorker p = void <<< FFI.promiseToAff <<< send p "ServiceWorker.startWorker" serviceWorkerStopAllWorkers :: CDPSession -> Aff Unit -serviceWorkerStopAllWorkers = void <<< Promise.toAffE <<< send0 "ServiceWorker.stopAllWorkers" +serviceWorkerStopAllWorkers = void <<< FFI.promiseToAff <<< send0 "ServiceWorker.stopAllWorkers" serviceWorkerStopWorker :: Foreign -> CDPSession -> Aff Unit -serviceWorkerStopWorker p = void <<< Promise.toAffE <<< send p "ServiceWorker.stopWorker" +serviceWorkerStopWorker p = void <<< FFI.promiseToAff <<< send p "ServiceWorker.stopWorker" serviceWorkerUnregister :: Foreign -> CDPSession -> Aff Unit -serviceWorkerUnregister p = void <<< Promise.toAffE <<< send p "ServiceWorker.unregister" +serviceWorkerUnregister p = void <<< FFI.promiseToAff <<< send p "ServiceWorker.unregister" serviceWorkerUpdateRegistration :: Foreign -> CDPSession -> Aff Unit -serviceWorkerUpdateRegistration p = void <<< Promise.toAffE <<< send p "ServiceWorker.updateRegistration" +serviceWorkerUpdateRegistration p = void <<< FFI.promiseToAff <<< send p "ServiceWorker.updateRegistration" storageGetStorageKeyForFrame :: Foreign -> CDPSession -> Aff Foreign -storageGetStorageKeyForFrame p = Promise.toAffE <<< send p "Storage.getStorageKeyForFrame" +storageGetStorageKeyForFrame p = FFI.promiseToAff <<< send p "Storage.getStorageKeyForFrame" storageClearDataForOrigin :: Foreign -> CDPSession -> Aff Unit -storageClearDataForOrigin p = void <<< Promise.toAffE <<< send p "Storage.clearDataForOrigin" +storageClearDataForOrigin p = void <<< FFI.promiseToAff <<< send p "Storage.clearDataForOrigin" storageClearDataForStorageKey :: Foreign -> CDPSession -> Aff Unit -storageClearDataForStorageKey p = void <<< Promise.toAffE <<< send p "Storage.clearDataForStorageKey" +storageClearDataForStorageKey p = void <<< FFI.promiseToAff <<< send p "Storage.clearDataForStorageKey" storageGetCookies :: Foreign -> CDPSession -> Aff Foreign -storageGetCookies p = Promise.toAffE <<< send p "Storage.getCookies" +storageGetCookies p = FFI.promiseToAff <<< send p "Storage.getCookies" storageSetCookies :: Foreign -> CDPSession -> Aff Unit -storageSetCookies p = void <<< Promise.toAffE <<< send p "Storage.setCookies" +storageSetCookies p = void <<< FFI.promiseToAff <<< send p "Storage.setCookies" storageClearCookies :: Foreign -> CDPSession -> Aff Unit -storageClearCookies p = void <<< Promise.toAffE <<< send p "Storage.clearCookies" +storageClearCookies p = void <<< FFI.promiseToAff <<< send p "Storage.clearCookies" storageGetUsageAndQuota :: Foreign -> CDPSession -> Aff Foreign -storageGetUsageAndQuota p = Promise.toAffE <<< send p "Storage.getUsageAndQuota" +storageGetUsageAndQuota p = FFI.promiseToAff <<< send p "Storage.getUsageAndQuota" storageOverrideQuotaForOrigin :: Foreign -> CDPSession -> Aff Unit -storageOverrideQuotaForOrigin p = void <<< Promise.toAffE <<< send p "Storage.overrideQuotaForOrigin" +storageOverrideQuotaForOrigin p = void <<< FFI.promiseToAff <<< send p "Storage.overrideQuotaForOrigin" storageTrackCacheStorageForOrigin :: Foreign -> CDPSession -> Aff Unit -storageTrackCacheStorageForOrigin p = void <<< Promise.toAffE <<< send p "Storage.trackCacheStorageForOrigin" +storageTrackCacheStorageForOrigin p = void <<< FFI.promiseToAff <<< send p "Storage.trackCacheStorageForOrigin" storageTrackCacheStorageForStorageKey :: Foreign -> CDPSession -> Aff Unit -storageTrackCacheStorageForStorageKey p = void <<< Promise.toAffE <<< send p "Storage.trackCacheStorageForStorageKey" +storageTrackCacheStorageForStorageKey p = void <<< FFI.promiseToAff <<< send p "Storage.trackCacheStorageForStorageKey" storageTrackIndexedDBForOrigin :: Foreign -> CDPSession -> Aff Unit -storageTrackIndexedDBForOrigin p = void <<< Promise.toAffE <<< send p "Storage.trackIndexedDBForOrigin" +storageTrackIndexedDBForOrigin p = void <<< FFI.promiseToAff <<< send p "Storage.trackIndexedDBForOrigin" storageTrackIndexedDBForStorageKey :: Foreign -> CDPSession -> Aff Unit -storageTrackIndexedDBForStorageKey p = void <<< Promise.toAffE <<< send p "Storage.trackIndexedDBForStorageKey" +storageTrackIndexedDBForStorageKey p = void <<< FFI.promiseToAff <<< send p "Storage.trackIndexedDBForStorageKey" storageUntrackCacheStorageForOrigin :: Foreign -> CDPSession -> Aff Unit -storageUntrackCacheStorageForOrigin p = void <<< Promise.toAffE <<< send p "Storage.untrackCacheStorageForOrigin" +storageUntrackCacheStorageForOrigin p = void <<< FFI.promiseToAff <<< send p "Storage.untrackCacheStorageForOrigin" storageUntrackCacheStorageForStorageKey :: Foreign -> CDPSession -> Aff Unit -storageUntrackCacheStorageForStorageKey p = void <<< Promise.toAffE <<< send p "Storage.untrackCacheStorageForStorageKey" +storageUntrackCacheStorageForStorageKey p = void <<< FFI.promiseToAff <<< send p "Storage.untrackCacheStorageForStorageKey" storageUntrackIndexedDBForOrigin :: Foreign -> CDPSession -> Aff Unit -storageUntrackIndexedDBForOrigin p = void <<< Promise.toAffE <<< send p "Storage.untrackIndexedDBForOrigin" +storageUntrackIndexedDBForOrigin p = void <<< FFI.promiseToAff <<< send p "Storage.untrackIndexedDBForOrigin" storageUntrackIndexedDBForStorageKey :: Foreign -> CDPSession -> Aff Unit -storageUntrackIndexedDBForStorageKey p = void <<< Promise.toAffE <<< send p "Storage.untrackIndexedDBForStorageKey" +storageUntrackIndexedDBForStorageKey p = void <<< FFI.promiseToAff <<< send p "Storage.untrackIndexedDBForStorageKey" storageGetTrustTokens :: Foreign -> CDPSession -> Aff Foreign -storageGetTrustTokens p = Promise.toAffE <<< send p "Storage.getTrustTokens" +storageGetTrustTokens p = FFI.promiseToAff <<< send p "Storage.getTrustTokens" storageClearTrustTokens :: Foreign -> CDPSession -> Aff Foreign -storageClearTrustTokens p = Promise.toAffE <<< send p "Storage.clearTrustTokens" +storageClearTrustTokens p = FFI.promiseToAff <<< send p "Storage.clearTrustTokens" storageGetInterestGroupDetails :: Foreign -> CDPSession -> Aff Foreign -storageGetInterestGroupDetails p = Promise.toAffE <<< send p "Storage.getInterestGroupDetails" +storageGetInterestGroupDetails p = FFI.promiseToAff <<< send p "Storage.getInterestGroupDetails" storageSetInterestGroupTracking :: Foreign -> CDPSession -> Aff Unit -storageSetInterestGroupTracking p = void <<< Promise.toAffE <<< send p "Storage.setInterestGroupTracking" +storageSetInterestGroupTracking p = void <<< FFI.promiseToAff <<< send p "Storage.setInterestGroupTracking" storageGetSharedStorageMetadata :: Foreign -> CDPSession -> Aff Foreign -storageGetSharedStorageMetadata p = Promise.toAffE <<< send p "Storage.getSharedStorageMetadata" +storageGetSharedStorageMetadata p = FFI.promiseToAff <<< send p "Storage.getSharedStorageMetadata" storageGetSharedStorageEntries :: Foreign -> CDPSession -> Aff Foreign -storageGetSharedStorageEntries p = Promise.toAffE <<< send p "Storage.getSharedStorageEntries" +storageGetSharedStorageEntries p = FFI.promiseToAff <<< send p "Storage.getSharedStorageEntries" storageSetSharedStorageEntry :: Foreign -> CDPSession -> Aff Unit -storageSetSharedStorageEntry p = void <<< Promise.toAffE <<< send p "Storage.setSharedStorageEntry" +storageSetSharedStorageEntry p = void <<< FFI.promiseToAff <<< send p "Storage.setSharedStorageEntry" storageDeleteSharedStorageEntry :: Foreign -> CDPSession -> Aff Unit -storageDeleteSharedStorageEntry p = void <<< Promise.toAffE <<< send p "Storage.deleteSharedStorageEntry" +storageDeleteSharedStorageEntry p = void <<< FFI.promiseToAff <<< send p "Storage.deleteSharedStorageEntry" storageClearSharedStorageEntries :: Foreign -> CDPSession -> Aff Unit -storageClearSharedStorageEntries p = void <<< Promise.toAffE <<< send p "Storage.clearSharedStorageEntries" +storageClearSharedStorageEntries p = void <<< FFI.promiseToAff <<< send p "Storage.clearSharedStorageEntries" storageResetSharedStorageBudget :: Foreign -> CDPSession -> Aff Unit -storageResetSharedStorageBudget p = void <<< Promise.toAffE <<< send p "Storage.resetSharedStorageBudget" +storageResetSharedStorageBudget p = void <<< FFI.promiseToAff <<< send p "Storage.resetSharedStorageBudget" storageSetSharedStorageTracking :: Foreign -> CDPSession -> Aff Unit -storageSetSharedStorageTracking p = void <<< Promise.toAffE <<< send p "Storage.setSharedStorageTracking" +storageSetSharedStorageTracking p = void <<< FFI.promiseToAff <<< send p "Storage.setSharedStorageTracking" storageSetStorageBucketTracking :: Foreign -> CDPSession -> Aff Unit -storageSetStorageBucketTracking p = void <<< Promise.toAffE <<< send p "Storage.setStorageBucketTracking" +storageSetStorageBucketTracking p = void <<< FFI.promiseToAff <<< send p "Storage.setStorageBucketTracking" storageDeleteStorageBucket :: Foreign -> CDPSession -> Aff Unit -storageDeleteStorageBucket p = void <<< Promise.toAffE <<< send p "Storage.deleteStorageBucket" +storageDeleteStorageBucket p = void <<< FFI.promiseToAff <<< send p "Storage.deleteStorageBucket" storageRunBounceTrackingMitigations :: Foreign -> CDPSession -> Aff Foreign -storageRunBounceTrackingMitigations p = Promise.toAffE <<< send p "Storage.runBounceTrackingMitigations" +storageRunBounceTrackingMitigations p = FFI.promiseToAff <<< send p "Storage.runBounceTrackingMitigations" storageSetAttributionReportingLocalTestingMode :: Foreign -> CDPSession -> Aff Unit -storageSetAttributionReportingLocalTestingMode p = void <<< Promise.toAffE <<< send p "Storage.setAttributionReportingLocalTestingMode" +storageSetAttributionReportingLocalTestingMode p = void <<< FFI.promiseToAff <<< send p "Storage.setAttributionReportingLocalTestingMode" storageSetAttributionReportingTracking :: Foreign -> CDPSession -> Aff Unit -storageSetAttributionReportingTracking p = void <<< Promise.toAffE <<< send p "Storage.setAttributionReportingTracking" +storageSetAttributionReportingTracking p = void <<< FFI.promiseToAff <<< send p "Storage.setAttributionReportingTracking" systemInfoGetInfo :: Foreign -> CDPSession -> Aff Foreign -systemInfoGetInfo p = Promise.toAffE <<< send p "SystemInfo.getInfo" +systemInfoGetInfo p = FFI.promiseToAff <<< send p "SystemInfo.getInfo" systemInfoGetFeatureState :: Foreign -> CDPSession -> Aff Foreign -systemInfoGetFeatureState p = Promise.toAffE <<< send p "SystemInfo.getFeatureState" +systemInfoGetFeatureState p = FFI.promiseToAff <<< send p "SystemInfo.getFeatureState" systemInfoGetProcessInfo :: Foreign -> CDPSession -> Aff Foreign -systemInfoGetProcessInfo p = Promise.toAffE <<< send p "SystemInfo.getProcessInfo" +systemInfoGetProcessInfo p = FFI.promiseToAff <<< send p "SystemInfo.getProcessInfo" targetActivateTarget :: Foreign -> CDPSession -> Aff Unit -targetActivateTarget p = void <<< Promise.toAffE <<< send p "Target.activateTarget" +targetActivateTarget p = void <<< FFI.promiseToAff <<< send p "Target.activateTarget" targetAttachToTarget :: Foreign -> CDPSession -> Aff Foreign -targetAttachToTarget p = Promise.toAffE <<< send p "Target.attachToTarget" +targetAttachToTarget p = FFI.promiseToAff <<< send p "Target.attachToTarget" targetAttachToBrowserTarget :: Foreign -> CDPSession -> Aff Foreign -targetAttachToBrowserTarget p = Promise.toAffE <<< send p "Target.attachToBrowserTarget" +targetAttachToBrowserTarget p = FFI.promiseToAff <<< send p "Target.attachToBrowserTarget" targetCloseTarget :: Foreign -> CDPSession -> Aff Foreign -targetCloseTarget p = Promise.toAffE <<< send p "Target.closeTarget" +targetCloseTarget p = FFI.promiseToAff <<< send p "Target.closeTarget" targetExposeDevToolsProtocol :: Foreign -> CDPSession -> Aff Unit -targetExposeDevToolsProtocol p = void <<< Promise.toAffE <<< send p "Target.exposeDevToolsProtocol" +targetExposeDevToolsProtocol p = void <<< FFI.promiseToAff <<< send p "Target.exposeDevToolsProtocol" targetCreateBrowserContext :: Foreign -> CDPSession -> Aff Foreign -targetCreateBrowserContext p = Promise.toAffE <<< send p "Target.createBrowserContext" +targetCreateBrowserContext p = FFI.promiseToAff <<< send p "Target.createBrowserContext" targetGetBrowserContexts :: Foreign -> CDPSession -> Aff Foreign -targetGetBrowserContexts p = Promise.toAffE <<< send p "Target.getBrowserContexts" +targetGetBrowserContexts p = FFI.promiseToAff <<< send p "Target.getBrowserContexts" targetCreateTarget :: Foreign -> CDPSession -> Aff Foreign -targetCreateTarget p = Promise.toAffE <<< send p "Target.createTarget" +targetCreateTarget p = FFI.promiseToAff <<< send p "Target.createTarget" targetDetachFromTarget :: Foreign -> CDPSession -> Aff Unit -targetDetachFromTarget p = void <<< Promise.toAffE <<< send p "Target.detachFromTarget" +targetDetachFromTarget p = void <<< FFI.promiseToAff <<< send p "Target.detachFromTarget" targetDisposeBrowserContext :: Foreign -> CDPSession -> Aff Unit -targetDisposeBrowserContext p = void <<< Promise.toAffE <<< send p "Target.disposeBrowserContext" +targetDisposeBrowserContext p = void <<< FFI.promiseToAff <<< send p "Target.disposeBrowserContext" targetGetTargetInfo :: Foreign -> CDPSession -> Aff Foreign -targetGetTargetInfo p = Promise.toAffE <<< send p "Target.getTargetInfo" +targetGetTargetInfo p = FFI.promiseToAff <<< send p "Target.getTargetInfo" targetGetTargets :: Foreign -> CDPSession -> Aff Foreign -targetGetTargets p = Promise.toAffE <<< send p "Target.getTargets" +targetGetTargets p = FFI.promiseToAff <<< send p "Target.getTargets" targetSendMessageToTarget :: Foreign -> CDPSession -> Aff Unit -targetSendMessageToTarget p = void <<< Promise.toAffE <<< send p "Target.Promise.toAffE <<< sendMessageToTarget" +targetSendMessageToTarget p = void <<< FFI.promiseToAff <<< send p "Target.FFI.promiseToAff <<< sendMessageToTarget" targetSetAutoAttach :: Foreign -> CDPSession -> Aff Unit -targetSetAutoAttach p = void <<< Promise.toAffE <<< send p "Target.setAutoAttach" +targetSetAutoAttach p = void <<< FFI.promiseToAff <<< send p "Target.setAutoAttach" targetAutoAttachRelated :: Foreign -> CDPSession -> Aff Unit -targetAutoAttachRelated p = void <<< Promise.toAffE <<< send p "Target.autoAttachRelated" +targetAutoAttachRelated p = void <<< FFI.promiseToAff <<< send p "Target.autoAttachRelated" targetSetDiscoverTargets :: Foreign -> CDPSession -> Aff Unit -targetSetDiscoverTargets p = void <<< Promise.toAffE <<< send p "Target.setDiscoverTargets" +targetSetDiscoverTargets p = void <<< FFI.promiseToAff <<< send p "Target.setDiscoverTargets" targetSetRemoteLocations :: Foreign -> CDPSession -> Aff Unit -targetSetRemoteLocations p = void <<< Promise.toAffE <<< send p "Target.setRemoteLocations" +targetSetRemoteLocations p = void <<< FFI.promiseToAff <<< send p "Target.setRemoteLocations" tetheringBind :: Foreign -> CDPSession -> Aff Unit -tetheringBind p = void <<< Promise.toAffE <<< send p "Tethering.bind" +tetheringBind p = void <<< FFI.promiseToAff <<< send p "Tethering.bind" tetheringUnbind :: Foreign -> CDPSession -> Aff Unit -tetheringUnbind p = void <<< Promise.toAffE <<< send p "Tethering.unbind" +tetheringUnbind p = void <<< FFI.promiseToAff <<< send p "Tethering.unbind" tracingEnd :: CDPSession -> Aff Unit -tracingEnd = void <<< Promise.toAffE <<< send0 "Tracing.end" +tracingEnd = void <<< FFI.promiseToAff <<< send0 "Tracing.end" tracingGetCategories :: Foreign -> CDPSession -> Aff Foreign -tracingGetCategories p = Promise.toAffE <<< send p "Tracing.getCategories" +tracingGetCategories p = FFI.promiseToAff <<< send p "Tracing.getCategories" tracingRecordClockSyncMarker :: Foreign -> CDPSession -> Aff Unit -tracingRecordClockSyncMarker p = void <<< Promise.toAffE <<< send p "Tracing.recordClockSyncMarker" +tracingRecordClockSyncMarker p = void <<< FFI.promiseToAff <<< send p "Tracing.recordClockSyncMarker" tracingRequestMemoryDump :: Foreign -> CDPSession -> Aff Foreign -tracingRequestMemoryDump p = Promise.toAffE <<< send p "Tracing.requestMemoryDump" +tracingRequestMemoryDump p = FFI.promiseToAff <<< send p "Tracing.requestMemoryDump" tracingStart :: Foreign -> CDPSession -> Aff Unit -tracingStart p = void <<< Promise.toAffE <<< send p "Tracing.start" +tracingStart p = void <<< FFI.promiseToAff <<< send p "Tracing.start" fetchDisable :: CDPSession -> Aff Unit -fetchDisable = void <<< Promise.toAffE <<< send0 "Fetch.disable" +fetchDisable = void <<< FFI.promiseToAff <<< send0 "Fetch.disable" fetchEnable :: Foreign -> CDPSession -> Aff Unit -fetchEnable p = void <<< Promise.toAffE <<< send p "Fetch.enable" +fetchEnable p = void <<< FFI.promiseToAff <<< send p "Fetch.enable" fetchFailRequest :: Foreign -> CDPSession -> Aff Unit -fetchFailRequest p = void <<< Promise.toAffE <<< send p "Fetch.failRequest" +fetchFailRequest p = void <<< FFI.promiseToAff <<< send p "Fetch.failRequest" fetchFulfillRequest :: Foreign -> CDPSession -> Aff Unit -fetchFulfillRequest p = void <<< Promise.toAffE <<< send p "Fetch.fulfillRequest" +fetchFulfillRequest p = void <<< FFI.promiseToAff <<< send p "Fetch.fulfillRequest" fetchContinueRequest :: Foreign -> CDPSession -> Aff Unit -fetchContinueRequest p = void <<< Promise.toAffE <<< send p "Fetch.continueRequest" +fetchContinueRequest p = void <<< FFI.promiseToAff <<< send p "Fetch.continueRequest" fetchContinueWithAuth :: Foreign -> CDPSession -> Aff Unit -fetchContinueWithAuth p = void <<< Promise.toAffE <<< send p "Fetch.continueWithAuth" +fetchContinueWithAuth p = void <<< FFI.promiseToAff <<< send p "Fetch.continueWithAuth" fetchContinueResponse :: Foreign -> CDPSession -> Aff Unit -fetchContinueResponse p = void <<< Promise.toAffE <<< send p "Fetch.continueResponse" +fetchContinueResponse p = void <<< FFI.promiseToAff <<< send p "Fetch.continueResponse" fetchGetResponseBody :: Foreign -> CDPSession -> Aff Foreign -fetchGetResponseBody p = Promise.toAffE <<< send p "Fetch.getResponseBody" +fetchGetResponseBody p = FFI.promiseToAff <<< send p "Fetch.getResponseBody" fetchTakeResponseBodyAsStream :: Foreign -> CDPSession -> Aff Foreign -fetchTakeResponseBodyAsStream p = Promise.toAffE <<< send p "Fetch.takeResponseBodyAsStream" +fetchTakeResponseBodyAsStream p = FFI.promiseToAff <<< send p "Fetch.takeResponseBodyAsStream" webAudioEnable :: CDPSession -> Aff Unit -webAudioEnable = void <<< Promise.toAffE <<< send0 "WebAudio.enable" +webAudioEnable = void <<< FFI.promiseToAff <<< send0 "WebAudio.enable" webAudioDisable :: CDPSession -> Aff Unit -webAudioDisable = void <<< Promise.toAffE <<< send0 "WebAudio.disable" +webAudioDisable = void <<< FFI.promiseToAff <<< send0 "WebAudio.disable" webAudioGetRealtimeData :: Foreign -> CDPSession -> Aff Foreign -webAudioGetRealtimeData p = Promise.toAffE <<< send p "WebAudio.getRealtimeData" +webAudioGetRealtimeData p = FFI.promiseToAff <<< send p "WebAudio.getRealtimeData" webAuthnEnable :: Foreign -> CDPSession -> Aff Unit -webAuthnEnable p = void <<< Promise.toAffE <<< send p "WebAuthn.enable" +webAuthnEnable p = void <<< FFI.promiseToAff <<< send p "WebAuthn.enable" webAuthnDisable :: CDPSession -> Aff Unit -webAuthnDisable = void <<< Promise.toAffE <<< send0 "WebAuthn.disable" +webAuthnDisable = void <<< FFI.promiseToAff <<< send0 "WebAuthn.disable" webAuthnAddVirtualAuthenticator :: Foreign -> CDPSession -> Aff Foreign -webAuthnAddVirtualAuthenticator p = Promise.toAffE <<< send p "WebAuthn.addVirtualAuthenticator" +webAuthnAddVirtualAuthenticator p = FFI.promiseToAff <<< send p "WebAuthn.addVirtualAuthenticator" webAuthnSetResponseOverrideBits :: Foreign -> CDPSession -> Aff Unit -webAuthnSetResponseOverrideBits p = void <<< Promise.toAffE <<< send p "WebAuthn.setResponseOverrideBits" +webAuthnSetResponseOverrideBits p = void <<< FFI.promiseToAff <<< send p "WebAuthn.setResponseOverrideBits" webAuthnRemoveVirtualAuthenticator :: Foreign -> CDPSession -> Aff Unit -webAuthnRemoveVirtualAuthenticator p = void <<< Promise.toAffE <<< send p "WebAuthn.removeVirtualAuthenticator" +webAuthnRemoveVirtualAuthenticator p = void <<< FFI.promiseToAff <<< send p "WebAuthn.removeVirtualAuthenticator" webAuthnAddCredential :: Foreign -> CDPSession -> Aff Unit -webAuthnAddCredential p = void <<< Promise.toAffE <<< send p "WebAuthn.addCredential" +webAuthnAddCredential p = void <<< FFI.promiseToAff <<< send p "WebAuthn.addCredential" webAuthnGetCredential :: Foreign -> CDPSession -> Aff Foreign -webAuthnGetCredential p = Promise.toAffE <<< send p "WebAuthn.getCredential" +webAuthnGetCredential p = FFI.promiseToAff <<< send p "WebAuthn.getCredential" webAuthnGetCredentials :: Foreign -> CDPSession -> Aff Foreign -webAuthnGetCredentials p = Promise.toAffE <<< send p "WebAuthn.getCredentials" +webAuthnGetCredentials p = FFI.promiseToAff <<< send p "WebAuthn.getCredentials" webAuthnRemoveCredential :: Foreign -> CDPSession -> Aff Unit -webAuthnRemoveCredential p = void <<< Promise.toAffE <<< send p "WebAuthn.removeCredential" +webAuthnRemoveCredential p = void <<< FFI.promiseToAff <<< send p "WebAuthn.removeCredential" webAuthnClearCredentials :: Foreign -> CDPSession -> Aff Unit -webAuthnClearCredentials p = void <<< Promise.toAffE <<< send p "WebAuthn.clearCredentials" +webAuthnClearCredentials p = void <<< FFI.promiseToAff <<< send p "WebAuthn.clearCredentials" webAuthnSetUserVerified :: Foreign -> CDPSession -> Aff Unit -webAuthnSetUserVerified p = void <<< Promise.toAffE <<< send p "WebAuthn.setUserVerified" +webAuthnSetUserVerified p = void <<< FFI.promiseToAff <<< send p "WebAuthn.setUserVerified" webAuthnSetAutomaticPresenceSimulation :: Foreign -> CDPSession -> Aff Unit -webAuthnSetAutomaticPresenceSimulation p = void <<< Promise.toAffE <<< send p "WebAuthn.setAutomaticPresenceSimulation" +webAuthnSetAutomaticPresenceSimulation p = void <<< FFI.promiseToAff <<< send p "WebAuthn.setAutomaticPresenceSimulation" mediaEnable :: CDPSession -> Aff Unit -mediaEnable = void <<< Promise.toAffE <<< send0 "Media.enable" +mediaEnable = void <<< FFI.promiseToAff <<< send0 "Media.enable" mediaDisable :: CDPSession -> Aff Unit -mediaDisable = void <<< Promise.toAffE <<< send0 "Media.disable" +mediaDisable = void <<< FFI.promiseToAff <<< send0 "Media.disable" deviceAccessEnable :: CDPSession -> Aff Unit -deviceAccessEnable = void <<< Promise.toAffE <<< send0 "DeviceAccess.enable" +deviceAccessEnable = void <<< FFI.promiseToAff <<< send0 "DeviceAccess.enable" deviceAccessDisable :: CDPSession -> Aff Unit -deviceAccessDisable = void <<< Promise.toAffE <<< send0 "DeviceAccess.disable" +deviceAccessDisable = void <<< FFI.promiseToAff <<< send0 "DeviceAccess.disable" deviceAccessSelectPrompt :: Foreign -> CDPSession -> Aff Unit -deviceAccessSelectPrompt p = void <<< Promise.toAffE <<< send p "DeviceAccess.selectPrompt" +deviceAccessSelectPrompt p = void <<< FFI.promiseToAff <<< send p "DeviceAccess.selectPrompt" deviceAccessCancelPrompt :: Foreign -> CDPSession -> Aff Unit -deviceAccessCancelPrompt p = void <<< Promise.toAffE <<< send p "DeviceAccess.cancelPrompt" +deviceAccessCancelPrompt p = void <<< FFI.promiseToAff <<< send p "DeviceAccess.cancelPrompt" preloadEnable :: CDPSession -> Aff Unit -preloadEnable = void <<< Promise.toAffE <<< send0 "Preload.enable" +preloadEnable = void <<< FFI.promiseToAff <<< send0 "Preload.enable" preloadDisable :: CDPSession -> Aff Unit -preloadDisable = void <<< Promise.toAffE <<< send0 "Preload.disable" +preloadDisable = void <<< FFI.promiseToAff <<< send0 "Preload.disable" fedCmEnable :: Foreign -> CDPSession -> Aff Unit -fedCmEnable p = void <<< Promise.toAffE <<< send p "FedCm.enable" +fedCmEnable p = void <<< FFI.promiseToAff <<< send p "FedCm.enable" fedCmDisable :: CDPSession -> Aff Unit -fedCmDisable = void <<< Promise.toAffE <<< send0 "FedCm.disable" +fedCmDisable = void <<< FFI.promiseToAff <<< send0 "FedCm.disable" fedCmSelectAccount :: Foreign -> CDPSession -> Aff Unit -fedCmSelectAccount p = void <<< Promise.toAffE <<< send p "FedCm.selectAccount" +fedCmSelectAccount p = void <<< FFI.promiseToAff <<< send p "FedCm.selectAccount" fedCmDismissDialog :: Foreign -> CDPSession -> Aff Unit -fedCmDismissDialog p = void <<< Promise.toAffE <<< send p "FedCm.dismissDialog" +fedCmDismissDialog p = void <<< FFI.promiseToAff <<< send p "FedCm.dismissDialog" fedCmResetCooldown :: CDPSession -> Aff Unit -fedCmResetCooldown = void <<< Promise.toAffE <<< send0 "FedCm.resetCooldown" +fedCmResetCooldown = void <<< FFI.promiseToAff <<< send0 "FedCm.resetCooldown" diff --git a/src/Puppeteer.CDPSession.purs b/src/Puppeteer.CDPSession.purs index 440a3ef..a9f58c2 100644 --- a/src/Puppeteer.CDPSession.purs +++ b/src/Puppeteer.CDPSession.purs @@ -7,8 +7,9 @@ import Control.Promise as Promise import Effect (Effect) import Effect.Aff (Aff) import Puppeteer.Base (CDPSession) +import Puppeteer.FFI as FFI foreign import _detach :: CDPSession -> Effect (Promise Unit) detach :: CDPSession -> Aff Unit -detach = Promise.toAffE <<< _detach +detach = FFI.promiseToAff <<< _detach diff --git a/src/Puppeteer.Eval.purs b/src/Puppeteer.Eval.purs index 3f10f82..4309010 100644 --- a/src/Puppeteer.Eval.purs +++ b/src/Puppeteer.Eval.purs @@ -17,30 +17,31 @@ import Effect (Effect) import Effect.Aff (Aff) import Foreign (Foreign, unsafeToForeign) import Puppeteer.Base (class EvalTarget, Handle) +import Puppeteer.FFI as FFI foreign import _run :: forall @r. String -> Foreign -> Array Foreign -> Effect (Promise r) foreign import _runh :: forall @r. String -> Foreign -> Array Foreign -> Effect (Promise (Handle r)) unsafeRunJs0 :: forall e @r. EvalTarget e => String -> e -> Aff r -unsafeRunJs0 js h = Promise.toAffE $ _run js (unsafeToForeign h) [] +unsafeRunJs0 js h = FFI.promiseToAff $ _run js (unsafeToForeign h) [] unsafeRunJsHandle0 :: forall e @r. EvalTarget e => String -> e -> Aff (Handle r) -unsafeRunJsHandle0 js h = Promise.toAffE $ _runh js (unsafeToForeign h) [] +unsafeRunJsHandle0 js h = FFI.promiseToAff $ _runh js (unsafeToForeign h) [] unsafeRunJs1 :: forall a e @r. EvalTarget e => String -> a -> e -> Aff r -unsafeRunJs1 js a h = Promise.toAffE $ _run js (unsafeToForeign h) [ unsafeToForeign a ] +unsafeRunJs1 js a h = FFI.promiseToAff $ _run js (unsafeToForeign h) [ unsafeToForeign a ] unsafeRunJsHandle1 :: forall a e @r. EvalTarget e => String -> a -> e -> Aff (Handle r) -unsafeRunJsHandle1 js a h = Promise.toAffE $ _runh js (unsafeToForeign h) [ unsafeToForeign a ] +unsafeRunJsHandle1 js a h = FFI.promiseToAff $ _runh js (unsafeToForeign h) [ unsafeToForeign a ] unsafeRunJs2 :: forall a b e @r. EvalTarget e => String -> a -> b -> e -> Aff r -unsafeRunJs2 js a b h = Promise.toAffE $ _run js (unsafeToForeign h) [ unsafeToForeign a, unsafeToForeign b ] +unsafeRunJs2 js a b h = FFI.promiseToAff $ _run js (unsafeToForeign h) [ unsafeToForeign a, unsafeToForeign b ] unsafeRunJsHandle2 :: forall a b e @r. EvalTarget e => String -> a -> b -> e -> Aff (Handle r) -unsafeRunJsHandle2 js a b h = Promise.toAffE $ _runh js (unsafeToForeign h) [ unsafeToForeign a, unsafeToForeign b ] +unsafeRunJsHandle2 js a b h = FFI.promiseToAff $ _runh js (unsafeToForeign h) [ unsafeToForeign a, unsafeToForeign b ] unsafeRunJs3 :: forall a b c e @r. EvalTarget e => String -> a -> b -> c -> e -> Aff r -unsafeRunJs3 js a b c h = Promise.toAffE $ _run js (unsafeToForeign h) [ unsafeToForeign a, unsafeToForeign b, unsafeToForeign c ] +unsafeRunJs3 js a b c h = FFI.promiseToAff $ _run js (unsafeToForeign h) [ unsafeToForeign a, unsafeToForeign b, unsafeToForeign c ] unsafeRunJsHandle3 :: forall a b c e @r. EvalTarget e => String -> a -> b -> c -> e -> Aff (Handle r) -unsafeRunJsHandle3 js a b c h = Promise.toAffE $ _runh js (unsafeToForeign h) [ unsafeToForeign a, unsafeToForeign b, unsafeToForeign c ] +unsafeRunJsHandle3 js a b c h = FFI.promiseToAff $ _runh js (unsafeToForeign h) [ unsafeToForeign a, unsafeToForeign b, unsafeToForeign c ] diff --git a/src/Puppeteer.FFI.js b/src/Puppeteer.FFI.js index c3409c2..a59176a 100644 --- a/src/Puppeteer.FFI.js +++ b/src/Puppeteer.FFI.js @@ -20,3 +20,15 @@ export const _maybeToUndefined = mton => m => { const n = mton(m) return n === null ? undefined : n } + +/** @type {(_: unknown) => string} */ +export const anyToString = a => + typeof a === 'string' + ? a + : typeof a === 'undefined' + ? 'undefined' + : a === null + ? 'null' + : a instanceof Array + ? JSON.stringify(a.map(i => anyToString(i))) + : a.toString() diff --git a/src/Puppeteer.FFI.purs b/src/Puppeteer.FFI.purs index 9675bcc..3710ebd 100644 --- a/src/Puppeteer.FFI.purs +++ b/src/Puppeteer.FFI.purs @@ -1,9 +1,12 @@ -module Puppeteer.FFI (mapToRecord, maybeToUndefined, mergeRecords, unsafeMaybeToUndefined, makeMap) where +module Puppeteer.FFI (mapToRecord, maybeToUndefined, mergeRecords, unsafeMaybeToUndefined, makeMap, promiseToAff) where import Prelude +import Control.Monad.Except (runExcept) +import Control.Promise (Promise) +import Control.Promise as Promise import Data.Array as Array -import Data.Foldable (foldl) +import Data.Either (either) import Data.FoldableWithIndex (foldlWithIndex) import Data.Map (Map) import Data.Map as Map @@ -11,10 +14,15 @@ import Data.Maybe (Maybe) import Data.Nullable (Nullable) import Data.Nullable as Nullable import Data.Tuple (Tuple(..)) -import Foreign (Foreign) +import Effect (Effect) +import Effect.Aff (Aff) +import Effect.Class (liftEffect) +import Effect.Exception (error) +import Foreign (Foreign, unsafeReadTagged) import Simple.JSON (class WriteForeign) foreign import mergeRecords :: Array Foreign -> Foreign +foreign import anyToString :: Foreign -> String foreign import _mapToRecord :: forall a. Array { k :: String, v :: a } -> Foreign foreign import _maybeToUndefined :: forall a. (Maybe a -> Nullable a) -> Maybe a -> Foreign @@ -29,3 +37,12 @@ maybeToUndefined = _maybeToUndefined Nullable.toNullable unsafeMaybeToUndefined :: forall a. Maybe a -> Foreign unsafeMaybeToUndefined = _maybeToUndefined Nullable.toNullable + +promiseToAff :: forall a. Effect (Promise a) -> Aff a +promiseToAff = + let + err e = either (const $ error $ anyToString e) identity + $ runExcept + $ unsafeReadTagged "Error" e + in + flip bind (Promise.toAff' err) <<< liftEffect diff --git a/src/Puppeteer.Handle.purs b/src/Puppeteer.Handle.purs index 5e26998..343ad01 100644 --- a/src/Puppeteer.Handle.purs +++ b/src/Puppeteer.Handle.purs @@ -66,7 +66,7 @@ foreign import _clone :: forall a. Handle a -> Effect (Promise a) foreign import _getProperties :: forall a. Handle a -> Effect (Promise (Array { k :: String, v :: (Handle Foreign) })) clone :: forall a. WriteForeign a => ReadForeign a => Handle a -> Aff a -clone = Promise.toAffE <<< _clone +clone = FFI.promiseToAff <<< _clone findFirst :: forall a b sel. IsElement a => Selector sel b => sel -> Handle a -> Aff (Maybe (Handle b)) findFirst q h = do @@ -74,49 +74,49 @@ findFirst q h = do pure $ head els findAll :: forall a b sel. IsElement a => Selector sel b => sel -> Handle a -> Aff (Array (Handle b)) -findAll q h = Promise.toAffE $ _find (Selector.toCSS q) h +findAll q h = FFI.promiseToAff $ _find (Selector.toCSS q) h click :: forall a. IsElement a => Handle a -> Aff Unit -click h = Promise.toAffE $ _click h +click h = FFI.promiseToAff $ _click h boundingBox :: forall a. IsElement a => Handle a -> Aff (Maybe BoundingBox) -boundingBox = map Nullable.toMaybe <<< Promise.toAffE <<< _boundingBox +boundingBox = map Nullable.toMaybe <<< FFI.promiseToAff <<< _boundingBox hover :: forall a. IsElement a => Handle a -> Aff Unit -hover = Promise.toAffE <<< _hover +hover = FFI.promiseToAff <<< _hover isHidden :: forall a. IsElement a => Handle a -> Aff Boolean -isHidden = Promise.toAffE <<< _isHidden +isHidden = FFI.promiseToAff <<< _isHidden isVisible :: forall a. IsElement a => Handle a -> Aff Boolean -isVisible = Promise.toAffE <<< _isVisible +isVisible = FFI.promiseToAff <<< _isVisible isIntersectingViewport :: forall a. IsElement a => Handle a -> Aff Boolean -isIntersectingViewport = Promise.toAffE <<< _isIntersectingViewport +isIntersectingViewport = FFI.promiseToAff <<< _isIntersectingViewport drop :: forall a b. IsElement a => IsElement b => Handle a -> Handle b -> Aff Unit -drop a = Promise.toAffE <<< _drop a +drop a = FFI.promiseToAff <<< _drop a screenshot :: forall a. IsElement a => ScreenshotOptions -> Handle a -> Aff Buffer -screenshot o = Promise.toAffE <<< _screenshot (prepareScreenshotOptions o) +screenshot o = FFI.promiseToAff <<< _screenshot (prepareScreenshotOptions o) scrollIntoView :: forall a. IsElement a => Handle a -> Aff Unit -scrollIntoView = Promise.toAffE <<< _scrollIntoView +scrollIntoView = FFI.promiseToAff <<< _scrollIntoView select :: forall a. IsElement a => Array String -> Handle a -> Aff Unit -select a = Promise.toAffE <<< _select a +select a = FFI.promiseToAff <<< _select a tap :: forall a. IsElement a => Handle a -> Aff Unit -tap = Promise.toAffE <<< _tap +tap = FFI.promiseToAff <<< _tap uploadFile :: Array FilePath -> Handle HTML.HTMLInputElement -> Aff Unit -uploadFile a = Promise.toAffE <<< _uploadFile a +uploadFile a = FFI.promiseToAff <<< _uploadFile a waitForSelector :: forall a b s. Selector s b => IsElement a => s -> Handle a -> Aff (Handle b) -waitForSelector s = Promise.toAffE <<< _waitForSelector (Selector.toCSS s) +waitForSelector s = FFI.promiseToAff <<< _waitForSelector (Selector.toCSS s) getProperties :: forall a. Handle a -> Aff (Map String (Handle Foreign)) -getProperties = map FFI.makeMap <<< Promise.toAffE <<< _getProperties +getProperties = map FFI.makeMap <<< FFI.promiseToAff <<< _getProperties toHTML :: forall a. Handle a -> Aff (Maybe (Handle HTMLElement)) toHTML h = do diff --git a/src/Puppeteer.Keyboard.purs b/src/Puppeteer.Keyboard.purs index 7b13787..89e588c 100644 --- a/src/Puppeteer.Keyboard.purs +++ b/src/Puppeteer.Keyboard.purs @@ -16,6 +16,7 @@ import Effect.Aff (Aff) import Foreign (Foreign) import Puppeteer.Base (Context(..), Keyboard) import Puppeteer.Base (Keyboard) as X +import Puppeteer.FFI as FFI import Simple.JSON (writeImpl) type DownHint :: Symbol @@ -27,18 +28,18 @@ foreign import _press :: Foreign -> Nullable Int -> Keyboard -> Effect (Promise foreign import _type :: String -> Nullable Int -> Keyboard -> Effect (Promise Unit) up :: Key -> Keyboard -> Aff Unit -up k kb = Promise.toAffE $ _up (prepareKey k) kb +up k kb = FFI.promiseToAff $ _up (prepareKey k) kb down :: Key -> Keyboard -> Aff (Context DownHint) down k kb = do - Promise.toAffE $ _down (prepareKey k) kb + FFI.promiseToAff $ _down (prepareKey k) kb pure $ Context (\_ -> up k kb) press :: Key -> Keyboard -> Aff Unit -press k kb = Promise.toAffE $ _press (prepareKey k) Nullable.null kb +press k kb = FFI.promiseToAff $ _press (prepareKey k) Nullable.null kb doType :: String -> Keyboard -> Aff Unit -doType s kb = Promise.toAffE $ _type s Nullable.null kb +doType s kb = FFI.promiseToAff $ _type s Nullable.null kb data KeyMod = KeyModMetaLeft diff --git a/src/Puppeteer.Mouse.purs b/src/Puppeteer.Mouse.purs index 94207cc..9491180 100644 --- a/src/Puppeteer.Mouse.purs +++ b/src/Puppeteer.Mouse.purs @@ -19,6 +19,7 @@ import Effect (Effect) import Effect.Aff (Aff) import Prim.Row (class Nub, class Union) import Puppeteer.Base (Mouse) +import Puppeteer.FFI as FFI import Record (merge, modify) as Record import Type.Prelude (Proxy(..)) @@ -41,42 +42,46 @@ type MouseMoveOptions r = (steps :: Number | r) type MouseOptions r = (button :: MouseButton | r) type MouseClickOptions r = (count :: Int, delay :: Number | MouseOptions r) -foreign import scrollImpl :: Mouse -> {deltaX :: Number, deltaY :: Number} -> Effect (Promise Unit) -foreign import clickImpl :: Mouse -> {x :: Number, y :: Number} -> {button :: String, count :: Int, delay :: Number} -> Effect (Promise Unit) -foreign import downImpl :: Mouse -> String -> Effect (Promise Unit) -foreign import upImpl :: Mouse -> String -> Effect (Promise Unit) -foreign import moveImpl :: Mouse -> {x :: Number, y :: Number} -> {steps :: Number} -> Effect (Promise Unit) +foreign import scrollImpl :: Mouse -> { deltaX :: Number, deltaY :: Number } -> Effect (Promise Unit) +foreign import clickImpl :: Mouse -> { x :: Number, y :: Number } -> { button :: String, count :: Int, delay :: Number } -> Effect (Promise Unit) +foreign import downImpl :: Mouse -> String -> Effect (Promise Unit) +foreign import upImpl :: Mouse -> String -> Effect (Promise Unit) +foreign import moveImpl :: Mouse -> { x :: Number, y :: Number } -> { steps :: Number } -> Effect (Promise Unit) scroll :: forall options missing. Union options missing (MouseWheelOptions ()) => Union options (MouseWheelOptions ()) (MouseWheelOptions ()) => Record options -> Mouse -> Aff Unit -scroll options mouse = Promise.toAffE - $ scrollImpl mouse - $ Record.merge options {deltaX: 0.0, deltaY: 0.0} +scroll options mouse = FFI.promiseToAff + $ scrollImpl mouse + $ Record.merge options { deltaX: 0.0, deltaY: 0.0 } down :: MouseButton -> Mouse -> Aff Unit -down btn mouse = Promise.toAffE $ downImpl mouse (mouseButtonToString btn) +down btn mouse = FFI.promiseToAff $ downImpl mouse (mouseButtonToString btn) up :: MouseButton -> Mouse -> Aff Unit -up btn mouse = Promise.toAffE $ upImpl mouse (mouseButtonToString btn) +up btn mouse = FFI.promiseToAff $ upImpl mouse (mouseButtonToString btn) -moveTo :: forall options missing fullU. Nub fullU (MouseMoveOptions ()) - => Union options missing (MouseMoveOptions ()) - => Union options (MouseMoveOptions ()) fullU - => Record options - -> Mouse - -> {x :: Number, y :: Number} - -> Aff Unit -moveTo opts mouse xy = Promise.toAffE - $ moveImpl mouse xy - $ Record.merge opts {steps: 1.0} +moveTo + :: forall options missing fullU + . Nub fullU (MouseMoveOptions ()) + => Union options missing (MouseMoveOptions ()) + => Union options (MouseMoveOptions ()) fullU + => Record options + -> Mouse + -> { x :: Number, y :: Number } + -> Aff Unit +moveTo opts mouse xy = FFI.promiseToAff + $ moveImpl mouse xy + $ Record.merge opts { steps: 1.0 } -click :: forall options missing fullU. Nub fullU (MouseClickOptions ()) - => Union options missing (MouseClickOptions ()) - => Union options (MouseClickOptions ()) fullU - => Record options - -> Mouse - -> {x :: Number, y :: Number} - -> Aff Unit -click opts mouse xy = Promise.toAffE - $ clickImpl mouse xy - $ Record.modify (Proxy @"button") mouseButtonToString - $ Record.merge opts {button: MouseLeft, count: 1, delay: 0.0} +click + :: forall options missing fullU + . Nub fullU (MouseClickOptions ()) + => Union options missing (MouseClickOptions ()) + => Union options (MouseClickOptions ()) fullU + => Record options + -> Mouse + -> { x :: Number, y :: Number } + -> Aff Unit +click opts mouse xy = FFI.promiseToAff + $ clickImpl mouse xy + $ Record.modify (Proxy @"button") mouseButtonToString + $ Record.merge opts { button: MouseLeft, count: 1, delay: 0.0 } diff --git a/src/Puppeteer.Page.Cookie.purs b/src/Puppeteer.Page.Cookie.purs index e1d5082..db621fc 100644 --- a/src/Puppeteer.Page.Cookie.purs +++ b/src/Puppeteer.Page.Cookie.purs @@ -93,23 +93,23 @@ set { name, value, url, domain, path, secure, sameSite, expires } p = , expires: map (unwrap <<< Instant.unInstant) expires } in - Promise.toAffE $ _set o p + FFI.promiseToAff $ _set o p delete :: CookieDelete -> Page -> Aff Unit delete { name, url, domain, path } p = let o = writeImpl { name, url: FFI.maybeToUndefined url, domain: FFI.maybeToUndefined domain, path: FFI.maybeToUndefined path } in - Promise.toAffE $ _delete o p + FFI.promiseToAff $ _delete o p listForCurrentPage :: Page -> Aff (Array Cookie) -listForCurrentPage = map (Array.catMaybes <<< map cookieRaw) <<< Promise.toAffE <<< _list [] +listForCurrentPage = map (Array.catMaybes <<< map cookieRaw) <<< FFI.promiseToAff <<< _list [] listForUrl :: URL -> Page -> Aff (Array Cookie) listForUrl = listForUrls <<< pure listForUrls :: NonEmptyArray URL -> Page -> Aff (Array Cookie) -listForUrls urls p = map (Array.catMaybes <<< map cookieRaw) $ Promise.toAffE $ _list (Array.NonEmpty.toArray urls) p +listForUrls urls p = map (Array.catMaybes <<< map cookieRaw) $ FFI.promiseToAff $ _list (Array.NonEmpty.toArray urls) p cookieRaw :: CookieRaw -> Maybe Cookie cookieRaw { domain, expires, path, url, name, value, sameSite, secure } = do diff --git a/src/Puppeteer.Page.Emulate.purs b/src/Puppeteer.Page.Emulate.purs index 8488ff3..26cdca3 100644 --- a/src/Puppeteer.Page.Emulate.purs +++ b/src/Puppeteer.Page.Emulate.purs @@ -16,13 +16,13 @@ module Puppeteer.Page.Emulate import Prelude import Control.Promise (Promise) -import Control.Promise as Promise import Data.Maybe (Maybe) import Data.Newtype (class Newtype, unwrap) import Effect (Effect) import Effect.Aff (Aff) import Foreign (Foreign) -import Puppeteer.Base (Context(..), Handle, Page) +import Puppeteer.Base (Context(..), Page) +import Puppeteer.FFI as FFI import Simple.JSON (undefined, writeImpl) type NetworkConditions = @@ -93,41 +93,41 @@ type IdleHint :: Symbol type IdleHint = "User idling is being emulated. Invoking `Puppeteer.closeContext` will undo this emulation." device :: Device -> Page -> Aff Unit -device d p = Promise.toAffE $ _emulate (_knownDevice <<< knownDeviceString $ d) p +device d p = FFI.promiseToAff $ _emulate (_knownDevice <<< knownDeviceString $ d) p cpuThrottling :: ThrottleFactor -> Page -> Aff (Context CpuThrottleHint) cpuThrottling t p = do - Promise.toAffE $ _cpuThrottling (unwrap t) p - pure $ Context (\_ -> Promise.toAffE $ _cpuThrottling 1.0 p) + FFI.promiseToAff $ _cpuThrottling (unwrap t) p + pure $ Context (\_ -> FFI.promiseToAff $ _cpuThrottling 1.0 p) idle :: Idle -> Page -> Aff (Context IdleHint) -idle UserInactive p = map (const $ Context (\_ -> unidle p)) <<< Promise.toAffE <<< _idle (writeImpl { isUserActive: false, isScreenUnlocked: true }) $ p -idle ScreenLocked p = map (const $ Context (\_ -> unidle p)) <<< Promise.toAffE <<< _idle (writeImpl { isScreenUnlocked: false, isUserActive: false }) $ p +idle UserInactive p = map (const $ Context (\_ -> unidle p)) <<< FFI.promiseToAff <<< _idle (writeImpl { isUserActive: false, isScreenUnlocked: true }) $ p +idle ScreenLocked p = map (const $ Context (\_ -> unidle p)) <<< FFI.promiseToAff <<< _idle (writeImpl { isScreenUnlocked: false, isUserActive: false }) $ p idle NotIdle p = map (const mempty) $ unidle p unidle :: Page -> Aff Unit -unidle = void <<< Promise.toAffE <<< _idle undefined +unidle = void <<< FFI.promiseToAff <<< _idle undefined print :: Page -> Aff (Context PrintHint) print p = do - Promise.toAffE $ _emulatePrint p - pure $ Context (\_ -> Promise.toAffE $ _unemulatePrint p) + FFI.promiseToAff $ _emulatePrint p + pure $ Context (\_ -> FFI.promiseToAff $ _unemulatePrint p) network :: NetworkConditions -> Page -> Aff (Context NetworkHint) network n p = do - Promise.toAffE $ _emulateNetwork n p - pure $ Context (\_ -> Promise.toAffE $ _unemulateNetwork p) + FFI.promiseToAff $ _emulateNetwork n p + pure $ Context (\_ -> FFI.promiseToAff $ _unemulateNetwork p) --| https://pptr.dev/api/puppeteer.page.emulatetimezone timezone :: String -> Page -> Aff (Context TimezoneHint) timezone tz p = do - Promise.toAffE $ _emulateTimezone tz p - pure $ Context (\_ -> Promise.toAffE $ _unemulateTimezone p) + FFI.promiseToAff $ _emulateTimezone tz p + pure $ Context (\_ -> FFI.promiseToAff $ _unemulateTimezone p) visionDeficiency :: VisionDeficiency -> Page -> Aff (Context VisionDeficiencyHint) visionDeficiency d p = do - Promise.toAffE $ _emulateVisionDeficiency (visionDeficiencyString d) p - pure $ Context (\_ -> Promise.toAffE $ _unemulateVisionDeficiency p) + FFI.promiseToAff $ _emulateVisionDeficiency (visionDeficiencyString d) p + pure $ Context (\_ -> FFI.promiseToAff $ _unemulateVisionDeficiency p) data VisionDeficiency = BlurredVision diff --git a/src/Puppeteer.Page.Event.Dialog.purs b/src/Puppeteer.Page.Event.Dialog.purs index c116c75..6697ae1 100644 --- a/src/Puppeteer.Page.Event.Dialog.purs +++ b/src/Puppeteer.Page.Event.Dialog.purs @@ -49,10 +49,10 @@ foreign import _accept :: Foreign -> Dialog -> Effect (Promise Unit) foreign import _type :: Dialog -> String dismiss :: Dialog -> Aff Unit -dismiss = Promise.toAffE <<< _dismiss +dismiss = FFI.promiseToAff <<< _dismiss accept :: Maybe String -> Dialog -> Aff Unit -accept s = Promise.toAffE <<< _accept (FFI.maybeToUndefined s) +accept s = FFI.promiseToAff <<< _accept (FFI.maybeToUndefined s) dialogType :: Dialog -> DialogType dialogType = dialogTypeOfString <<< _type diff --git a/src/Puppeteer.Page.Export.purs b/src/Puppeteer.Page.Export.purs index 0ed23b9..99b7fa8 100644 --- a/src/Puppeteer.Page.Export.purs +++ b/src/Puppeteer.Page.Export.purs @@ -102,7 +102,7 @@ foreign import _screenshot :: Foreign -> Page -> Effect (Promise Buffer) foreign import _pdf :: Foreign -> Page -> Effect (Promise Buffer) screenshot :: ScreenshotOptions -> Page -> Aff Buffer -screenshot o = Promise.toAffE <<< _screenshot (prepareScreenshotOptions o) +screenshot o = FFI.promiseToAff <<< _screenshot (prepareScreenshotOptions o) pdf :: PdfOptions -> Page -> Aff Buffer -pdf o = Promise.toAffE <<< _pdf (preparePdfOptions o) +pdf o = FFI.promiseToAff <<< _pdf (preparePdfOptions o) diff --git a/src/Puppeteer.Page.HTTP.Request.purs b/src/Puppeteer.Page.HTTP.Request.purs index 6cc753e..6e631a6 100644 --- a/src/Puppeteer.Page.HTTP.Request.purs +++ b/src/Puppeteer.Page.HTTP.Request.purs @@ -92,13 +92,13 @@ headers :: Request -> Effect (Map String String) headers = map FFI.makeMap <<< _headers abort :: Context InterceptRequestsHint -> ErrorCode -> Request -> Aff Unit -abort _ e = Promise.toAffE <<< _abort (errorCodeString e) +abort _ e = FFI.promiseToAff <<< _abort (errorCodeString e) continue :: Context InterceptRequestsHint -> ContinueRequestOverrides -> Request -> Aff Unit -continue _ o = Promise.toAffE <<< _continue (prepareContinueRequestOverrides o) +continue _ o = FFI.promiseToAff <<< _continue (prepareContinueRequestOverrides o) respond :: Context InterceptRequestsHint -> RespondToRequest -> Request -> Aff Unit -respond _ r = Promise.toAffE <<< _respond (prepareRespondToRequest r) +respond _ r = FFI.promiseToAff <<< _respond (prepareRespondToRequest r) failure :: Request -> Effect (Maybe String) failure = map (map _.errorText <<< Nullable.toMaybe) <<< _failure diff --git a/src/Puppeteer.Page.HTTP.Response.purs b/src/Puppeteer.Page.HTTP.Response.purs index 942b91b..87717f5 100644 --- a/src/Puppeteer.Page.HTTP.Response.purs +++ b/src/Puppeteer.Page.HTTP.Response.purs @@ -12,6 +12,7 @@ import Effect.Aff (Aff) import Foreign (Foreign) import Node.Buffer (Buffer) import Puppeteer.Base (Request, Response) +import Puppeteer.FFI as FFI import Simple.JSON (readImpl) foreign import request :: Response -> Effect Request @@ -27,13 +28,13 @@ foreign import _remoteAddressIp :: Response -> Effect Foreign foreign import _remoteAddressPort :: Response -> Effect Foreign bodyBuffer :: Response -> Aff Buffer -bodyBuffer = Promise.toAffE <<< _bodyBuffer +bodyBuffer = FFI.promiseToAff <<< _bodyBuffer bodyJson :: Response -> Aff Foreign -bodyJson = Promise.toAffE <<< _bodyJson +bodyJson = FFI.promiseToAff <<< _bodyJson bodyText :: Response -> Aff String -bodyText = Promise.toAffE <<< _bodyText +bodyText = FFI.promiseToAff <<< _bodyText remoteAddressIp :: Response -> Effect (Maybe String) remoteAddressIp = map (hush <<< runExcept) <<< map readImpl <<< _remoteAddressIp diff --git a/src/Puppeteer.Page.HTTP.purs b/src/Puppeteer.Page.HTTP.purs index a3d0e53..4993289 100644 --- a/src/Puppeteer.Page.HTTP.purs +++ b/src/Puppeteer.Page.HTTP.purs @@ -44,18 +44,18 @@ type InterceptRequestsHint = "Requests are being intercepted. Invoking `Puppetee bypassCsp :: Page -> Aff (Context BypassCSPHint) bypassCsp p = do - Promise.toAffE $ _bypassCsp p - pure $ Context (\_ -> Promise.toAffE $ _unbypassCsp p) + FFI.promiseToAff $ _bypassCsp p + pure $ Context (\_ -> FFI.promiseToAff $ _unbypassCsp p) disableCache :: Page -> Aff (Context DisableCacheHint) disableCache p = do - Promise.toAffE $ _disableCache p - pure $ Context (\_ -> Promise.toAffE $ _enableCache p) + FFI.promiseToAff $ _disableCache p + pure $ Context (\_ -> FFI.promiseToAff $ _enableCache p) interceptRequests :: Page -> Aff (Context InterceptRequestsHint) interceptRequests p = do - Promise.toAffE $ _interceptRequests p - pure (Context $ \_ -> Promise.toAffE $ _uninterceptRequests p) + FFI.promiseToAff $ _interceptRequests p + pure (Context $ \_ -> FFI.promiseToAff $ _uninterceptRequests p) interceptNextRequest :: (Context InterceptRequestsHint -> Request -> Aff Unit) -> Page -> Aff Unit interceptNextRequest cb p = do @@ -66,4 +66,4 @@ interceptNextRequest cb p = do pure unit sendExtraHeaders :: Map String String -> Page -> Aff Unit -sendExtraHeaders h = Promise.toAffE <<< _sendExtraHeaders (FFI.mapToRecord h) +sendExtraHeaders h = FFI.promiseToAff <<< _sendExtraHeaders (FFI.mapToRecord h) diff --git a/src/Puppeteer.Page.Navigate.purs b/src/Puppeteer.Page.Navigate.purs index 5ea41a7..23046ed 100644 --- a/src/Puppeteer.Page.Navigate.purs +++ b/src/Puppeteer.Page.Navigate.purs @@ -11,6 +11,7 @@ import Effect (Effect) import Effect.Aff (Aff) import Foreign (Foreign) import Puppeteer.Base (LifecycleEvent(..), Page, URL, duplexLifecycleEvent, duplexWrite) +import Puppeteer.FFI as FFI import Puppeteer.HTTP as HTTP foreign import _forward :: Foreign -> Page -> Effect (Promise (Maybe HTTP.Response)) @@ -19,16 +20,16 @@ foreign import _reload :: Foreign -> Page -> Effect (Promise (Maybe HTTP.Respons foreign import _to :: String -> Foreign -> Page -> Effect (Promise (Maybe HTTP.Response)) forward :: LifecycleEvent -> Page -> Aff (Maybe HTTP.Response) -forward ev = Promise.toAffE <<< _forward (duplexWrite duplexLifecycleEvent ev) +forward ev = FFI.promiseToAff <<< _forward (duplexWrite duplexLifecycleEvent ev) back :: LifecycleEvent -> Page -> Aff (Maybe HTTP.Response) -back ev = Promise.toAffE <<< _back (duplexWrite duplexLifecycleEvent ev) +back ev = FFI.promiseToAff <<< _back (duplexWrite duplexLifecycleEvent ev) to :: LifecycleEvent -> Page -> URL -> Aff (Maybe HTTP.Response) -to ev p u = Promise.toAffE $ _to u (duplexWrite duplexLifecycleEvent ev) p +to ev p u = FFI.promiseToAff $ _to u (duplexWrite duplexLifecycleEvent ev) p reload :: LifecycleEvent -> Page -> Aff (Maybe HTTP.Response) -reload ev = Promise.toAffE <<< _reload (duplexWrite duplexLifecycleEvent ev) +reload ev = FFI.promiseToAff <<< _reload (duplexWrite duplexLifecycleEvent ev) forward_ :: Page -> Aff (Maybe HTTP.Response) forward_ = forward Load diff --git a/src/Puppeteer.Page.WaitFor.purs b/src/Puppeteer.Page.WaitFor.purs index ccf4957..58cffdc 100644 --- a/src/Puppeteer.Page.WaitFor.purs +++ b/src/Puppeteer.Page.WaitFor.purs @@ -18,6 +18,7 @@ import Effect (Effect) import Effect.Aff (Aff) import Foreign (Foreign) import Puppeteer.Base (Context(..), Handle, LifecycleEvent, Page, duplexWrite, duplexLifecycleEvent) +import Puppeteer.FFI as FFI import Puppeteer.Selector (class Selector, toCSS) newtype NetworkIdleFor = NetworkIdleFor Milliseconds @@ -39,13 +40,13 @@ navigation ev p = do pure $ Context (\_ -> Promise.toAff $ promise) networkIdle :: NetworkIdleFor -> Page -> Aff Unit -networkIdle i = Promise.toAffE <<< _networkIdle (unwrap $ unwrap i) +networkIdle i = FFI.promiseToAff <<< _networkIdle (unwrap $ unwrap i) selector :: forall s e. Selector s e => s -> Page -> Aff (Handle e) -selector s = Promise.toAffE <<< _selectorToExist (toCSS s) +selector s = FFI.promiseToAff <<< _selectorToExist (toCSS s) selectorToBeVisible :: forall s e. Selector s e => s -> Page -> Aff (Handle e) -selectorToBeVisible s = Promise.toAffE <<< _selector (toCSS s) +selectorToBeVisible s = FFI.promiseToAff <<< _selector (toCSS s) selectorToBeHidden :: forall s e. Selector s e => s -> Page -> Aff Unit -selectorToBeHidden s = Promise.toAffE <<< _selectorToBeHidden (toCSS s) +selectorToBeHidden s = FFI.promiseToAff <<< _selectorToBeHidden (toCSS s) diff --git a/src/Puppeteer.Page.purs b/src/Puppeteer.Page.purs index 7ba3ee0..6ac49d4 100644 --- a/src/Puppeteer.Page.purs +++ b/src/Puppeteer.Page.purs @@ -42,6 +42,7 @@ import Foreign (Foreign, unsafeToForeign) import Node.Path (FilePath) import Puppeteer.Base (Page) as X import Puppeteer.Base (class PageProducer, CDPSession, Handle, Keyboard, LifecycleEvent, Mouse, Page, URL, Viewport, duplexLifecycleEvent, duplexViewport, duplexWrite) +import Puppeteer.FFI as FFI import Puppeteer.Handle (unsafeCoerceHandle) import Puppeteer.Selector (class Selector, toCSS) import Simple.JSON (readImpl, undefined, writeImpl) @@ -120,48 +121,48 @@ foreign import _title :: Page -> Effect (Promise String) foreign import _viewport :: Page -> Foreign new :: forall b. PageProducer b => b -> Aff Page -new = Promise.toAffE <<< _newPage <<< unsafeToForeign +new = FFI.promiseToAff <<< _newPage <<< unsafeToForeign createCDPSession :: Page -> Aff CDPSession -createCDPSession = Promise.toAffE <<< _createCDPSession +createCDPSession = FFI.promiseToAff <<< _createCDPSession authenticate :: { username :: String, password :: String } -> Page -> Aff Unit -authenticate creds = Promise.toAffE <<< _authenticate creds +authenticate creds = FFI.promiseToAff <<< _authenticate creds all :: forall b. PageProducer b => b -> Aff (Array Page) -all = Promise.toAffE <<< _all <<< unsafeToForeign +all = FFI.promiseToAff <<< _all <<< unsafeToForeign findAll :: forall s e. Selector s e => s -> Page -> Aff (Array (Handle e)) -findAll s = Promise.toAffE <<< _findAll (toCSS s) +findAll s = FFI.promiseToAff <<< _findAll (toCSS s) findFirst :: forall s e. Selector s e => s -> Page -> Aff (Maybe (Handle e)) findFirst s = map Array.head <<< findAll s addScriptTag :: AddScript -> Page -> Aff (Handle HTMLScriptElement) -addScriptTag a = Promise.toAffE <<< _addScriptTag (prepareAddScript a) +addScriptTag a = FFI.promiseToAff <<< _addScriptTag (prepareAddScript a) addStyleTag :: forall s e. AddStyle s e => s -> Page -> Aff (Handle e) addStyleTag a h = do - t <- Promise.toAffE $ _addStyleTag (prepareAddStyle a) h + t <- FFI.promiseToAff $ _addStyleTag (prepareAddStyle a) h pure $ unsafeCoerceHandle t bringToFront :: Page -> Aff Unit -bringToFront = Promise.toAffE <<< _bringToFront +bringToFront = FFI.promiseToAff <<< _bringToFront close :: Page -> Aff Unit -close = Promise.toAffE <<< _close +close = FFI.promiseToAff <<< _close content :: Page -> Aff String -content = Promise.toAffE <<< _content +content = FFI.promiseToAff <<< _content setContent :: String -> LifecycleEvent -> Page -> Aff Unit -setContent s ev = Promise.toAffE <<< _setContent s (duplexWrite duplexLifecycleEvent ev) +setContent s ev = FFI.promiseToAff <<< _setContent s (duplexWrite duplexLifecycleEvent ev) setViewport :: Viewport -> Page -> Aff Unit -setViewport vp = Promise.toAffE <<< _setViewport (duplexWrite duplexViewport vp) +setViewport vp = FFI.promiseToAff <<< _setViewport (duplexWrite duplexViewport vp) title :: Page -> Aff String -title = Promise.toAffE <<< _title +title = FFI.promiseToAff <<< _title viewport :: Page -> Maybe Viewport viewport = hush <<< runExcept <<< readImpl <<< _viewport diff --git a/src/Puppeteer.Plugin.AdBlock.purs b/src/Puppeteer.Plugin.AdBlock.purs index 37c5d60..1b6cd07 100644 --- a/src/Puppeteer.Plugin.AdBlock.purs +++ b/src/Puppeteer.Plugin.AdBlock.purs @@ -65,7 +65,7 @@ install :: forall (r :: Row Type). AdBlockOptions -> Puppeteer r -> Effect (Pupp install o p = _install (prepareOptions o) p blocker :: forall (r :: Row Type). Puppeteer (adblock :: AdBlockPlugin | r) -> Aff AdBlocker -blocker = Promise.toAffE <<< _blocker +blocker = FFI.promiseToAff <<< _blocker cspInjectedH :: EventEmitter.EventHandle0 AdBlocker cspInjectedH = EventEmitter.EventHandle "csp-injected" identity diff --git a/src/Puppeteer.Plugin.Captcha.purs b/src/Puppeteer.Plugin.Captcha.purs index 14be850..f927ff5 100644 --- a/src/Puppeteer.Plugin.Captcha.purs +++ b/src/Puppeteer.Plugin.Captcha.purs @@ -291,24 +291,24 @@ infos f = do findCaptchas :: forall (r :: Row Type). Puppeteer (captcha :: CaptchaPlugin | r) -> Page -> Aff (Array CaptchaInfoMaybeFiltered) findCaptchas _ p = do - f <- Promise.toAffE $ _findCaptchas p + f <- FFI.promiseToAff $ _findCaptchas p liftEither $ infos f getSolutions :: forall (r :: Row Type). Puppeteer (captcha :: CaptchaPlugin | r) -> Page -> Array CaptchaInfo -> Aff (Array CaptchaSolution) getSolutions _ p is = do - f <- Promise.toAffE $ _getSolutions p (writeImpl $ duplexWrite duplexInfo <$> is) + f <- FFI.promiseToAff $ _getSolutions p (writeImpl $ duplexWrite duplexInfo <$> is) { solutions } <- liftEither $ read @({ solutions :: Array Foreign }) f liftEither $ for solutions $ duplexRead duplexSoln enterSolutions :: forall (r :: Row Type). Puppeteer (captcha :: CaptchaPlugin | r) -> Page -> Array CaptchaSolution -> Aff (Array CaptchaSolved) enterSolutions _ p sols = do - f <- Promise.toAffE $ _enterSolutions p (writeImpl $ duplexWrite duplexSoln <$> sols) + f <- FFI.promiseToAff $ _enterSolutions p (writeImpl $ duplexWrite duplexSoln <$> sols) { solved } <- liftEither $ read @({ solved :: Array Foreign }) f liftEither $ for solved $ duplexRead duplexSolved solveCaptchas :: forall (r :: Row Type). Puppeteer (captcha :: CaptchaPlugin | r) -> Page -> Aff SolveResult solveCaptchas _ p = do - f <- Promise.toAffE $ _solveCaptchas p + f <- FFI.promiseToAff $ _solveCaptchas p { solved, solutions } <- liftEither $ read @({ solved :: Array Foreign, solutions :: Array Foreign }) f captchas <- liftEither $ infos f liftEither do diff --git a/src/Puppeteer.purs b/src/Puppeteer.purs index 33f980c..3360116 100644 --- a/src/Puppeteer.purs +++ b/src/Puppeteer.purs @@ -169,25 +169,25 @@ foreign import _launch :: forall p. Foreign -> Puppeteer p -> Effect (Promise Br --| [`PuppeteerExtra`](https://github.com/berstend/puppeteer-extra/blob/master/packages/puppeteer-extra/src/index.ts) --| [`PuppeteerNode`](https://pptr.dev/api/puppeteer.puppeteernode) new :: Aff (Puppeteer ()) -new = Promise.toAffE _puppeteer +new = FFI.promiseToAff _puppeteer --| Connect to an existing browser instance --| --| [`PuppeteerNode#connect`](https://pptr.dev/api/puppeteer.puppeteernode.connect) connect :: forall p. Connect -> Puppeteer p -> Aff Browser -connect c = Promise.toAffE <<< _connect (prepareConnectOptions c) +connect c = FFI.promiseToAff <<< _connect (prepareConnectOptions c) connect_ :: forall p. Puppeteer p -> Aff Browser -connect_ = Promise.toAffE <<< _connect (prepareLaunchOptions launchDefault) +connect_ = FFI.promiseToAff <<< _connect (prepareLaunchOptions launchDefault) --| Launch a new browser instance --| --| [`PuppeteerNode#launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) launch :: forall p. Launch -> Puppeteer p -> Aff Browser -launch l = Promise.toAffE <<< _launch (prepareLaunchOptions l) +launch l = FFI.promiseToAff <<< _launch (prepareLaunchOptions l) launch_ :: forall p. Puppeteer p -> Aff Browser -launch_ = Promise.toAffE <<< _launch (prepareLaunchOptions launchDefault) +launch_ = FFI.promiseToAff <<< _launch (prepareLaunchOptions launchDefault) launchNonHeadless :: forall p. Puppeteer p -> Aff Browser -launchNonHeadless = Promise.toAffE <<< _launch (prepareLaunchOptions $ launchDefault { headless = false }) +launchNonHeadless = FFI.promiseToAff <<< _launch (prepareLaunchOptions $ launchDefault { headless = false })