diff --git a/src/core/ethereal-core.scala b/src/core/ethereal-core.scala index da8137e..973304e 100644 --- a/src/core/ethereal-core.scala +++ b/src/core/ethereal-core.scala @@ -178,6 +178,7 @@ def cli[BusType <: Matchable](using executive: Executive) DaemonEvent.Exit(line().decode[Pid]) case t"i" => + import Decoder.int val cliInput: CliInput = if line() == t"p" then CliInput.Pipe else CliInput.Terminal val pid: Pid = Pid(line().decode[Int]) val script: Text = line() @@ -236,6 +237,8 @@ def cli[BusType <: Matchable](using executive: Executive) lazy val color: ColorDepth = import workingDirectories.systemProperty + import Decoder.int + if safely(Environment.colorterm[Text]) == t"truecolor" then ColorDepth.TrueColor else ColorDepth (safely(mute[ExecEvent](sh"tput colors".exec[Text]().decode[Int])).or(-1)) @@ -289,6 +292,7 @@ def cli[BusType <: Matchable](using executive: Executive) supervise: import logFormats.standard + import Decoder.int given Message is Loggable = Log.route(Syslog(t"ethereal")) val socket: jn.ServerSocket = jn.ServerSocket(0) diff --git a/src/core/ethereal.CliInput.scala b/src/core/ethereal.CliInput.scala index 1e477b0..1c05291 100644 --- a/src/core/ethereal.CliInput.scala +++ b/src/core/ethereal.CliInput.scala @@ -19,10 +19,9 @@ package ethereal import anticipation.* import gossamer.* import prepositional.* -import spectacular.* object CliInput: - given decoder: Decoder[CliInput] = text => valueOf(text.lower.capitalize.s) + given decoder: CliInput is Decodable in Text = text => valueOf(text.lower.capitalize.s) given encodable: CliInput is Encodable in Text = _.toString.tt.lower enum CliInput: diff --git a/src/core/ethereal.ClientConnection.scala b/src/core/ethereal.ClientConnection.scala index 98f9dfc..5a40509 100644 --- a/src/core/ethereal.ClientConnection.scala +++ b/src/core/ethereal.ClientConnection.scala @@ -18,6 +18,7 @@ package ethereal import anticipation.* import contingency.* +import guillotine.* import parasite.* import profanity.* import rudiments.* diff --git a/src/core/ethereal.DaemonEvent.scala b/src/core/ethereal.DaemonEvent.scala index 318ae2f..7cd7af8 100644 --- a/src/core/ethereal.DaemonEvent.scala +++ b/src/core/ethereal.DaemonEvent.scala @@ -17,8 +17,8 @@ package ethereal import anticipation.* +import guillotine.* import profanity.* -import rudiments.* import language.experimental.pureFunctions diff --git a/src/core/ethereal.DaemonLogEvent.scala b/src/core/ethereal.DaemonLogEvent.scala index a7451f3..fdbb1eb 100644 --- a/src/core/ethereal.DaemonLogEvent.scala +++ b/src/core/ethereal.DaemonLogEvent.scala @@ -18,8 +18,8 @@ package ethereal import anticipation.* import fulminate.* +import guillotine.* import profanity.* -import rudiments.* enum DaemonLogEvent: case WriteExecutable(location: Text) diff --git a/src/core/ethereal.DaemonService.scala b/src/core/ethereal.DaemonService.scala index d650178..d3fe1d7 100644 --- a/src/core/ethereal.DaemonService.scala +++ b/src/core/ethereal.DaemonService.scala @@ -19,20 +19,20 @@ package ethereal import anticipation.* import exoskeleton.* import galilei.* +import guillotine.* import prepositional.* import proscenium.* -import rudiments.* import serpentine.* import language.experimental.pureFunctions case class DaemonService[BusType <: Matchable] - (pid: Pid, + (pid: Pid, shutdown: () => Unit, cliInput: CliInput, - script: Path on Linux, + script: Path on Linux, deliver: BusType => Unit, - bus: Stream[BusType], + bus: Stream[BusType], scriptName: Text) extends ShellContext: diff --git a/src/core/ethereal.Installer.scala b/src/core/ethereal.Installer.scala index 10c6271..4b19131 100644 --- a/src/core/ethereal.Installer.scala +++ b/src/core/ethereal.Installer.scala @@ -109,6 +109,7 @@ object Installer: if safely(scriptPath.decode[Path on Linux]) == service.script && !force then Result.AlreadyOnPath(command, service.script.text) else + import Decoder.int val payloadSize: Memory = Memory(Properties.ethereal.payloadSize[Int]()) val jarSize: Memory = Memory(Properties.ethereal.jarSize[Int]()) val scriptFile: Path on Linux = service.script