Finish native completion and retire legacy command machinery

This commit is contained in:
2026-11-20 06:32:47 +00:00
parent 7db626781e
commit faa8cb5822
72 changed files with 841 additions and 2966 deletions

View File

@@ -4,11 +4,14 @@ import (
"context"
"io"
"gitea.maximumdirect.net/eric/narratio/internal/adapters/storage"
"gitea.maximumdirect.net/eric/narratio/internal/config"
"go.maximumdirect.net/commandkit"
)
func executeForTest(args []string, stdout, stderr io.Writer) int {
return Execute(context.Background(), args, commandkit.Streams{Out: stdout, Err: stderr}).Status
return executeWithDependencies(args, stdout, stderr, commandDependencies{}, executePlan)
}
func executeWithPipelineExecutor(args []string, stdout, stderr io.Writer, executor pipelineExecutor) int {
@@ -16,6 +19,9 @@ func executeWithPipelineExecutor(args []string, stdout, stderr io.Writer, execut
}
func executeWithDependencies(args []string, stdout, stderr io.Writer, deps commandDependencies, executor pipelineExecutor) int {
if deps.newObjectStore == nil {
deps.newObjectStore = func(context.Context, *config.Config) (storage.ObjectStore, error) { return &storage.FakeBackend{}, nil }
}
application, err := newApplication(deps, executor)
if err != nil {
panic(err)