fix: stubs shell y tui usan tipos nativos en firmas en vez de Result/Option de core

Result[T] y Option[T] de core no son accesibles desde otros paquetes sin import.
Cambiado a (T, error) y (T, bool) siguiendo la regla de tipos nativos en firmas.
Añadidas dependencias bubbletea/bubbles/lipgloss al go.mod raíz para que tui compile.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-28 23:23:06 +01:00
parent 8581d3959a
commit 4808e16629
12 changed files with 121 additions and 38 deletions
+4 -2
View File
@@ -1,9 +1,11 @@
package shell
import "fmt"
// Implementation: github.com/lucasdataproyects/devfactory/shell
// Run ejecuta un comando del sistema con timeout de 30 segundos y devuelve el resultado.
func Run(name string, args ...string) Result[CmdResult] {
func Run(name string, args ...string) (CmdResult, error) {
// stub — implementation in devfactory/shell
return Result[CmdResult]{}
return CmdResult{}, fmt.Errorf("not implemented")
}
+6 -3
View File
@@ -1,11 +1,14 @@
package shell
import "time"
import (
"fmt"
"time"
)
// Implementation: github.com/lucasdataproyects/devfactory/shell
// RunWithTimeout ejecuta un comando del sistema con timeout configurable.
func RunWithTimeout(name string, timeout time.Duration, args ...string) Result[CmdResult] {
func RunWithTimeout(name string, timeout time.Duration, args ...string) (CmdResult, error) {
// stub — implementation in devfactory/shell
return Result[CmdResult]{}
return CmdResult{}, fmt.Errorf("not implemented")
}
+4 -2
View File
@@ -1,9 +1,11 @@
package shell
import "fmt"
// Implementation: github.com/lucasdataproyects/devfactory/shell
// RunPipe encadena multiples comandos con pipe y devuelve el resultado final.
func RunPipe(commands ...string) Result[CmdResult] {
func RunPipe(commands ...string) (CmdResult, error) {
// stub — implementation in devfactory/shell
return Result[CmdResult]{}
return CmdResult{}, fmt.Errorf("not implemented")
}
+4 -2
View File
@@ -1,9 +1,11 @@
package shell
import "fmt"
// Implementation: github.com/lucasdataproyects/devfactory/shell
// RunShell ejecuta un comando shell interpretado por /bin/sh.
func RunShell(command string) Result[CmdResult] {
func RunShell(command string) (CmdResult, error) {
// stub — implementation in devfactory/shell
return Result[CmdResult]{}
return CmdResult{}, fmt.Errorf("not implemented")
}
+6 -3
View File
@@ -1,11 +1,14 @@
package shell
import "time"
import (
"fmt"
"time"
)
// Implementation: github.com/lucasdataproyects/devfactory/shell
// RunShellTimeout ejecuta un comando shell con timeout configurable.
func RunShellTimeout(command string, timeout time.Duration) Result[CmdResult] {
func RunShellTimeout(command string, timeout time.Duration) (CmdResult, error) {
// stub — implementation in devfactory/shell
return Result[CmdResult]{}
return CmdResult{}, fmt.Errorf("not implemented")
}
+3 -3
View File
@@ -2,8 +2,8 @@ package shell
// Implementation: github.com/lucasdataproyects/devfactory/shell
// Which busca la ruta de un ejecutable en el PATH del sistema. Devuelve None si no existe.
func Which(name string) Option[string] {
// Which busca la ruta de un ejecutable en el PATH del sistema. Devuelve ("", false) si no existe.
func Which(name string) (string, bool) {
// stub — implementation in devfactory/shell
return Option[string]{}
return "", false
}