Add offline pipeline inspection and shared native resource preflight
This commit is contained in:
@@ -2,10 +2,9 @@ package cli
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/core/config"
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/framework/pipeline"
|
||||
"go.maximumdirect.net/ckconfig"
|
||||
"go.maximumdirect.net/ckprompt"
|
||||
"go.maximumdirect.net/commandkit"
|
||||
@@ -42,6 +41,7 @@ func NewApplication(version string, options Options) (*commandkit.App, error) {
|
||||
definitions = ckprompt.WithNamespaces(definitions, promptkit.Namespaces{})
|
||||
declarations := []commandkit.Declaration{
|
||||
commandkit.Completion("notarius"),
|
||||
pipelineCommands(newState, func() (pipeline.ModuleCatalog, error) { return effectiveCatalog(options) }),
|
||||
ckconfig.Command(ckconfig.Suite[struct{}, *nativeLoaders]{
|
||||
NewState: newState,
|
||||
CheckInput: func(_ string, selection ckconfig.Selection, _ struct{}) error {
|
||||
@@ -53,10 +53,3 @@ func NewApplication(version string, options Options) (*commandkit.App, error) {
|
||||
declarations = append(declarations, ckprompt.Declarations(definitions)...)
|
||||
return commandkit.New(commandkit.Identity{Name: "notarius", Version: version}, declarations...)
|
||||
}
|
||||
|
||||
func checkConfigSelection(selection ckconfig.Selection) error {
|
||||
if selection.Config.Set && strings.TrimSpace(selection.Config.Value) == "" {
|
||||
return fmt.Errorf("--config must not be empty")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user