refactor: swap pkg/framework imports to pkg/core
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
76d2843753
commit
a36ae054c0
3 changed files with 9 additions and 7 deletions
|
|
@ -7,9 +7,9 @@ import (
|
|||
"sync"
|
||||
|
||||
"forge.lthn.ai/core/cli/pkg/cli"
|
||||
"forge.lthn.ai/core/go/pkg/framework"
|
||||
"forge.lthn.ai/core/go/pkg/core"
|
||||
"forge.lthn.ai/core/go-i18n"
|
||||
"forge.lthn.ai/core/go/pkg/process"
|
||||
"forge.lthn.ai/core/go-process"
|
||||
)
|
||||
|
||||
// QARunner orchestrates PHP QA checks using pkg/process.
|
||||
|
|
@ -17,7 +17,7 @@ type QARunner struct {
|
|||
dir string
|
||||
fix bool
|
||||
service *process.Service
|
||||
core *framework.Core
|
||||
core *core.Core
|
||||
|
||||
// Output tracking
|
||||
outputMu sync.Mutex
|
||||
|
|
@ -27,14 +27,14 @@ type QARunner struct {
|
|||
// NewQARunner creates a QA runner for the given directory.
|
||||
func NewQARunner(dir string, fix bool) (*QARunner, error) {
|
||||
// Create a Core with process service for the QA session
|
||||
core, err := framework.New(
|
||||
framework.WithName("process", process.NewService(process.Options{})),
|
||||
core, err := core.New(
|
||||
core.WithName("process", process.NewService(process.Options{})),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, cli.WrapVerb(err, "create", "process service")
|
||||
}
|
||||
|
||||
svc, err := framework.ServiceFor[*process.Service](core, "process")
|
||||
svc, err := core.ServiceFor[*process.Service](core, "process")
|
||||
if err != nil {
|
||||
return nil, cli.WrapVerb(err, "get", "process service")
|
||||
}
|
||||
|
|
@ -238,7 +238,7 @@ func (r *QARunner) Run(ctx context.Context, stages []QAStage) (*QARunResult, err
|
|||
}
|
||||
|
||||
// Register output handler
|
||||
r.core.RegisterAction(func(c *framework.Core, msg framework.Message) error {
|
||||
r.core.RegisterAction(func(c *core.Core, msg core.Message) error {
|
||||
switch m := msg.(type) {
|
||||
case process.ActionProcessOutput:
|
||||
r.outputMu.Lock()
|
||||
|
|
|
|||
1
go.mod
1
go.mod
|
|
@ -7,6 +7,7 @@ require (
|
|||
forge.lthn.ai/core/go v0.1.0
|
||||
forge.lthn.ai/core/go-i18n v0.1.0
|
||||
forge.lthn.ai/core/go-io v0.0.1
|
||||
forge.lthn.ai/core/go-process v0.1.0
|
||||
github.com/dunglas/frankenphp v1.5.0
|
||||
github.com/stretchr/testify v1.11.1
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
|
|
|
|||
1
go.sum
1
go.sum
|
|
@ -12,6 +12,7 @@ forge.lthn.ai/core/go-io v0.0.1 h1:N/GCl6Asusfr4gs53JZixJVtqcnerQ6GcxSN8F8iJXY=
|
|||
forge.lthn.ai/core/go-io v0.0.1/go.mod h1:l+gG/G5TMIOTG8G7y0dg4fh1a7Suy8wCYVwsz4duV7M=
|
||||
forge.lthn.ai/core/go-log v0.0.1 h1:x/E6EfF9vixzqiLHQOl2KT25HyBcMc9qiBkomqVlpPg=
|
||||
forge.lthn.ai/core/go-log v0.0.1/go.mod h1:r14MXKOD3LF/sI8XUJQhRk/SZHBE7jAFVuCfgkXoZPw=
|
||||
forge.lthn.ai/core/go-process v0.1.0 h1:lRpliQuu/Omt+kAHMFoQYOb5PKEIKg8yTMchFhejpK8=
|
||||
github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw=
|
||||
github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE=
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
|
||||
|
|
|
|||
Reference in a new issue