diff --git a/app/src/main/java/io/xpipe/app/util/CommandView.java b/app/src/main/java/io/xpipe/app/util/CommandView.java new file mode 100644 index 000000000..ffcf685ad --- /dev/null +++ b/app/src/main/java/io/xpipe/app/util/CommandView.java @@ -0,0 +1,13 @@ +package io.xpipe.app.util; + +import io.xpipe.core.process.CommandBuilder; +import io.xpipe.core.process.ShellControl; +import lombok.experimental.SuperBuilder; + +@SuperBuilder +public abstract class CommandView { + + protected final ShellControl shellControl; + + protected abstract CommandBuilder base(); +} diff --git a/core/src/main/java/io/xpipe/core/process/CommandControl.java b/core/src/main/java/io/xpipe/core/process/CommandControl.java index 3fc2bc89a..b6b4493d8 100644 --- a/core/src/main/java/io/xpipe/core/process/CommandControl.java +++ b/core/src/main/java/io/xpipe/core/process/CommandControl.java @@ -1,5 +1,6 @@ package io.xpipe.core.process; +import com.fasterxml.jackson.databind.JsonNode; import io.xpipe.core.util.FailableConsumer; import java.io.InputStream; @@ -83,6 +84,8 @@ public interface CommandControl extends ProcessControl { String readStdoutOrThrow() throws Exception; + JsonNode readStdoutJsonOrThrow() throws Exception; + String readStderrOrThrow() throws Exception; String readStdoutAndWait() throws Exception;