From ac832f9e914cf603cda3bcb7ed101194098dfdb9 Mon Sep 17 00:00:00 2001 From: unclegedd Date: Wed, 17 Jan 2024 09:35:37 -0600 Subject: [PATCH] WIP: rebase --- go.mod | 6 +++--- src/cmd/uds.go | 7 ++++--- src/pkg/bundle/deploy.go | 7 ++++--- src/pkg/sources/tarball.go | 2 -- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 391aafce8..32368b187 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,9 @@ go 1.21.5 require ( github.com/AlecAivazis/survey/v2 v2.3.7 github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b + github.com/charmbracelet/bubbles v0.16.1 + github.com/charmbracelet/bubbletea v0.25.0 + github.com/charmbracelet/lipgloss v0.9.1 github.com/defenseunicorns/zarf v0.32.1 github.com/goccy/go-yaml v1.11.2 github.com/mholt/archiver/v3 v3.5.1 @@ -136,10 +139,7 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect - github.com/charmbracelet/bubbles v0.16.1 // indirect - github.com/charmbracelet/bubbletea v0.25.0 // indirect github.com/charmbracelet/harmonica v0.2.0 // indirect - github.com/charmbracelet/lipgloss v0.9.1 // indirect github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect github.com/clbanning/mxj/v2 v2.7.0 // indirect github.com/cloudflare/circl v1.3.5 // indirect diff --git a/src/cmd/uds.go b/src/cmd/uds.go index ba88ae1d5..dacb640e4 100644 --- a/src/cmd/uds.go +++ b/src/cmd/uds.go @@ -5,23 +5,24 @@ package cmd import ( + "bytes" "os" "path/filepath" "strings" "github.com/AlecAivazis/survey/v2" + tea "github.com/charmbracelet/bubbletea" "github.com/defenseunicorns/uds-cli/src/config" "github.com/defenseunicorns/uds-cli/src/config/lang" "github.com/defenseunicorns/uds-cli/src/pkg/bundle" + "github.com/defenseunicorns/uds-cli/src/pkg/bundle/tui" zarfConfig "github.com/defenseunicorns/zarf/src/config" "github.com/defenseunicorns/zarf/src/pkg/message" zarfUtils "github.com/defenseunicorns/zarf/src/pkg/utils" zarfTypes "github.com/defenseunicorns/zarf/src/types" goyaml "github.com/goccy/go-yaml" + "github.com/pterm/pterm" "github.com/spf13/cobra" - "github.com/defenseunicorns/uds-cli/src/tui" - - "github.com/defenseunicorns/uds-cli/src/pkg/utils" ) var createCmd = &cobra.Command{ diff --git a/src/pkg/bundle/deploy.go b/src/pkg/bundle/deploy.go index d1f01b7e4..6b9618a88 100644 --- a/src/pkg/bundle/deploy.go +++ b/src/pkg/bundle/deploy.go @@ -15,6 +15,7 @@ import ( "github.com/AlecAivazis/survey/v2" "github.com/defenseunicorns/uds-cli/src/config" + "github.com/defenseunicorns/uds-cli/src/pkg/bundle/tui" "github.com/defenseunicorns/uds-cli/src/pkg/sources" "github.com/defenseunicorns/uds-cli/src/types" zarfConfig "github.com/defenseunicorns/zarf/src/config" @@ -100,13 +101,13 @@ func (b *Bundler) Deploy(ptermBuf *bytes.Buffer) error { if len(userSpecifiedPackages) != len(packagesToDeploy) { return fmt.Errorf("invalid zarf packages specified by --packages") } - return deployPackages(packagesToDeploy, resume, b) + return deployPackages(packagesToDeploy, resume, b, ptermBuf) } - return deployPackages(b.bundle.Packages, resume, b) + return deployPackages(b.bundle.Packages, resume, b, ptermBuf) } -func deployPackages(packages []types.Package, resume bool, b *Bundler) error { +func deployPackages(packages []types.Package, resume bool, b *Bundler, ptermBuf *bytes.Buffer) error { // map of Zarf pkgs and their vars bundleExportedVars := make(map[string]map[string]string) diff --git a/src/pkg/sources/tarball.go b/src/pkg/sources/tarball.go index a39e27f08..33a23c4fc 100644 --- a/src/pkg/sources/tarball.go +++ b/src/pkg/sources/tarball.go @@ -12,8 +12,6 @@ import ( "path/filepath" "strings" - "github.com/defenseunicorns/uds-cli/src/config" - "github.com/defenseunicorns/uds-cli/src/pkg/utils" "github.com/defenseunicorns/zarf/src/pkg/layout" "github.com/defenseunicorns/zarf/src/pkg/message" "github.com/defenseunicorns/zarf/src/pkg/oci"