Verified Commit cebaf49a authored by Camil Staps's avatar Camil Staps 🚀

Add parameter to serveElectron to modify EngineOptions

parent 3471d52d
......@@ -3,6 +3,7 @@ definition module Electron.App
from StdMaybe import :: Maybe
from ABC.Interpreter.JavaScript import :: JSVal, :: JSFun, :: JSWorld
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Engine import :: EngineOptions
from iTasks.WF.Definition import :: Task
:: ElectronProcess
......@@ -35,6 +36,9 @@ from iTasks.WF.Definition import :: Task
derive JSONEncode TransportMethod
derive JSONDecode TransportMethod
serveElectron :: !(ElectronProcess UniversalConnectionDetails -> Task Connection) !*World -> *World
serveElectron ::
!([String] EngineOptions -> EngineOptions)
!(ElectronProcess UniversalConnectionDetails -> Task Connection)
!*World -> *World
runInElectron :: !ElectronProcess !(JSVal *JSWorld -> *JSWorld) -> Task ()
......@@ -91,8 +91,14 @@ tcpConnection processId = mapReadWrite
Nothing
(sharedStore "tcpConnections" 'Data.Map'.newMap)
serveElectron :: !(ElectronProcess UniversalConnectionDetails -> Task Connection) !*World -> *World
serveElectron startConnection w = doTasks (onStartup task) w
serveElectron ::
!([String] EngineOptions -> EngineOptions)
!(ElectronProcess UniversalConnectionDetails -> Task Connection)
!*World -> *World
serveElectron modOpts startConnection w =
doTasksWithOptions
(\cli opts -> Ok (onStartup task,modOpts cli opts))
w
where
task :: Task ()
task =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment