diff --git a/api/api.go b/api/api.go index ad344f9..8f77138 100644 --- a/api/api.go +++ b/api/api.go @@ -1,6 +1,6 @@ package api -//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --package=api -generate=types -o ./openapi.gen.go ../../config/openapi.yml +//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --package=api -generate=types -o ./openapi.gen.go ../../config/openapi.yml import ( "bytes" @@ -204,9 +204,21 @@ func (s *Session) CreateEAB(ctx context.Context, chainSlug, orgSlug, realmSlug, return &eabOutput, nil } -func (s *Session) CreateService(ctx context.Context, orgSlug, serviceSlug, serverType string, localhostPort *int) (*Service, error) { +func (s *Session) CreateOrg(ctx context.Context, orgName string) (*Organization, error) { + orgInput := CreateOrgJSONRequestBody{ + Name: orgName, + } + + var orgOutput Organization + if err := s.post(ctx, "/orgs", orgInput, &orgOutput); err != nil { + return nil, err + } + return &orgOutput, nil +} + +func (s *Session) CreateService(ctx context.Context, orgSlug, serviceName, serverType string, localhostPort *int) (*Service, error) { serviceInput := CreateServiceJSONRequestBody{ - Name: serviceSlug, + Name: serviceName, ServerType: serverType, LocalhostPort: localhostPort, } diff --git a/api/openapi.gen.go b/api/openapi.gen.go index f15dd20..59d03df 100644 --- a/api/openapi.gen.go +++ b/api/openapi.gen.go @@ -1,6 +1,6 @@ // Package api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. package api import ( @@ -406,6 +406,12 @@ type CreateClientJSONBody struct { Type *string `json:"type,omitempty"` } +// CreateOrgJSONBody defines parameters for CreateOrg. +type CreateOrgJSONBody struct { + // Name The name for this organization. + Name string `json:"name"` +} + // GetCredentialsParams defines parameters for GetCredentials. type GetCredentialsParams struct { // CaParam ca for operation @@ -458,6 +464,9 @@ type CreateCliTokenJSONRequestBody CreateCliTokenJSONBody // CreateClientJSONRequestBody defines body for CreateClient for application/json ContentType. type CreateClientJSONRequestBody CreateClientJSONBody +// CreateOrgJSONRequestBody defines body for CreateOrg for application/json ContentType. +type CreateOrgJSONRequestBody CreateOrgJSONBody + // AttachOrgServiceJSONRequestBody defines body for AttachOrgService for application/json ContentType. type AttachOrgServiceJSONRequestBody AttachOrgServiceJSONBody diff --git a/api/tools.go b/api/tools.go index d8fe39e..93e755c 100644 --- a/api/tools.go +++ b/api/tools.go @@ -4,5 +4,5 @@ package api import ( - _ "github.com/deepmap/oapi-codegen/cmd/oapi-codegen" + _ "github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen" ) diff --git a/component/models/selectors.go b/component/models/selectors.go index cf6f13e..aae9e2c 100644 --- a/component/models/selectors.go +++ b/component/models/selectors.go @@ -2,7 +2,6 @@ package models import ( "fmt" - "reflect" "strings" "github.com/charmbracelet/bubbles/list" @@ -144,7 +143,8 @@ func (m *Selector[T]) View() string { return b.String() } - if reflect.ValueOf(m.chosen.Value).IsZero() { + var zeroT T + if m.chosen.Value == zeroT { fmt.Fprintln(&b, ui.StepDone( fmt.Sprintf("Selected %s.", ui.Emphasize(m.chosen.String)), )) diff --git a/component/selector_test.go b/component/selector_test.go index 3d6118e..8924273 100644 --- a/component/selector_test.go +++ b/component/selector_test.go @@ -78,6 +78,69 @@ func TestSelector(t *testing.T) { uitest.TestGolden(t, drv.Golden()) }) + t.Run("orgs solo creatable", func(t *testing.T) { + if srv.IsProxy() { + t.Skip("selector tests unsupported in proxy mode") + } + + cfg.Test.Prefer = map[string]cli.ConfigTestPrefer{ + "/v0/orgs": { + Example: "solo", + }, + } + ctx = cli.ContextWithConfig(ctx, cfg) + + drv, tm := uitest.TestTUI(ctx, t) + + choicec := make(chan api.Organization, 1) + errc := make(chan error, 1) + go func() { + selector := component.Selector[api.Organization]{ + Prompt: "Which organization do you want for this test?", + Flag: "--org", + + Creatable: true, + + Fetcher: &component.Fetcher[api.Organization]{ + FetchFn: func() ([]api.Organization, error) { return anc.GetOrgs(ctx) }, + }, + } + + org, err := selector.Choice(ctx, drv) + if err != nil { + errc <- err + return + } + + choicec <- *org + errc <- tm.Quit() + }() + + uitest.WaitForGoldenContains(t, drv, errc, + "? Which organization do you want for this test?", + ) + + tm.Send(tea.KeyMsg{ + Type: tea.KeyDown, + }) + tm.Send(tea.KeyMsg{ + Type: tea.KeyEnter, + }) + + org := <-choicec + + if want, got := "", org.Slug; want != got { + t.Errorf("Want org choice: %q, Got: %q", want, got) + } + + if err := <-errc; err != nil { + t.Error(err) + } + + tm.WaitFinished(t, teatest.WithFinalTimeout(time.Second*3)) + uitest.TestGolden(t, drv.Golden()) + }) + t.Run("orgs double", func(t *testing.T) { if srv.IsProxy() { t.Skip("selector tests unsupported in proxy mode") diff --git a/component/testdata/TestSelector/orgs_solo_creatable.golden b/component/testdata/TestSelector/orgs_solo_creatable.golden new file mode 100644 index 0000000..b947a53 --- /dev/null +++ b/component/testdata/TestSelector/orgs_solo_creatable.golden @@ -0,0 +1,12 @@ +─── Fetcher[github.com/anchordotdev/cli/api.Organization] ────────────────────── + * Fetching organizations…⠋ +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + ? Which organization do you want for this test? + > Solo Org Slug (solo-org-slug) + Create New Organization +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + ? Which organization do you want for this test? + Solo Org Slug (solo-org-slug) + > Create New Organization +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + - Selected Create New Organization. diff --git a/config.go b/config.go index f13924f..610803e 100644 --- a/config.go +++ b/config.go @@ -58,6 +58,7 @@ type Config struct { Org struct { APID string `env:"ORG" toml:"apid,omitempty"` + Name string `env:"ORG_NAME" toml:",omitempty,readonly"` } `toml:"org,omitempty"` Realm struct { diff --git a/go.mod b/go.mod index d51bba8..dc94842 100644 --- a/go.mod +++ b/go.mod @@ -8,13 +8,12 @@ require ( github.com/atotto/clipboard v0.1.4 github.com/aymanbagabas/go-udiff v0.2.0 github.com/benburkert/dns v0.0.0-20190225204957-d356cf78cdfc - github.com/brianvoe/gofakeit/v7 v7.0.4 + github.com/brianvoe/gofakeit/v7 v7.1.2 github.com/charmbracelet/bubbles v0.20.0 - github.com/charmbracelet/bubbletea v1.1.0 - github.com/charmbracelet/lipgloss v0.13.0 + github.com/charmbracelet/bubbletea v1.1.2 + github.com/charmbracelet/lipgloss v1.0.0 github.com/charmbracelet/x/exp/teatest v0.0.0-20240222131549-03ee51df8bea github.com/cli/browser v1.3.0 - github.com/deepmap/oapi-codegen v1.16.3 github.com/fatih/structtag v1.2.0 github.com/go-test/deep v1.1.1 github.com/gofrs/flock v0.12.1 @@ -24,13 +23,14 @@ require ( github.com/mcuadros/go-defaults v1.2.0 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 github.com/muesli/termenv v0.15.2 + github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 github.com/oapi-codegen/runtime v1.1.1 github.com/pelletier/go-toml/v2 v2.2.3 github.com/r3labs/diff/v3 v3.0.1 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 - github.com/zalando/go-keyring v0.2.5 + github.com/zalando/go-keyring v0.2.6 golang.org/x/crypto v0.28.0 golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 golang.org/x/sync v0.8.0 @@ -40,25 +40,25 @@ require ( ) require ( + al.essio.dev/pkg/shellescape v1.5.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect - github.com/alessio/shellescape v1.4.1 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/charmbracelet/x/ansi v0.2.3 // indirect + github.com/charmbracelet/x/ansi v0.4.2 // indirect github.com/charmbracelet/x/exp/golden v0.0.0-20240815200342-61de596daa2b // indirect github.com/charmbracelet/x/term v0.2.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/danieljoos/wincred v1.2.0 // indirect + github.com/danieljoos/wincred v1.2.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect - github.com/getkin/kin-openapi v0.118.0 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/swag v0.22.4 // indirect + github.com/getkin/kin-openapi v0.127.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/invopop/yaml v0.1.0 // indirect + github.com/invopop/yaml v0.3.1 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect @@ -67,19 +67,19 @@ require ( github.com/mattn/go-runewidth v0.0.16 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect - github.com/perimeterx/marshmallow v1.1.4 // indirect + github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/rivo/uniseg v0.4.7 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/sahilm/fuzzy v0.1.1 // indirect + github.com/sergi/go-diff v1.3.1 // indirect + github.com/speakeasy-api/openapi-overlay v0.9.0 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect golang.org/x/mod v0.21.0 // indirect golang.org/x/net v0.30.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/protobuf v1.34.3-0.20240830093551-013dd178dc9a // indirect + golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/tools v0.24.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 4fa3167..100b152 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,11 @@ +al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho= +al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= -github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= -github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/armon/go-proxyproto v0.0.0-20210323213023-7e956b284f0a/go.mod h1:QmP9hvJ91BbJmGVGSbutW19IC0Q9phDCLGaomwTJbgU= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= @@ -15,60 +15,73 @@ github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWp github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA= github.com/benburkert/dns v0.0.0-20190225204957-d356cf78cdfc h1:eyDlmf21vuKN61WoxV2cQLDH/PBDyyjIhUI4kT2o1yM= github.com/benburkert/dns v0.0.0-20190225204957-d356cf78cdfc/go.mod h1:6ul4nJKqsreAIBK5lUkibcUn2YBU6CvDzlKDH+dtZsQ= -github.com/brianvoe/gofakeit/v7 v7.0.4 h1:Mkxwz9jYg8Ad8NvT9HA27pCMZGFQo08MK6jD0QTKEww= -github.com/brianvoe/gofakeit/v7 v7.0.4/go.mod h1:QXuPeBw164PJCzCUZVmgpgHJ3Llj49jSLVkKPMtxtxA= +github.com/brianvoe/gofakeit/v7 v7.1.2 h1:vSKaVScNhWVpf1rlyEKSvO8zKZfuDtGqoIHT//iNNb8= +github.com/brianvoe/gofakeit/v7 v7.1.2/go.mod h1:QXuPeBw164PJCzCUZVmgpgHJ3Llj49jSLVkKPMtxtxA= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/charmbracelet/bubbles v0.20.0 h1:jSZu6qD8cRQ6k9OMfR1WlM+ruM8fkPWkHvQWD9LIutE= github.com/charmbracelet/bubbles v0.20.0/go.mod h1:39slydyswPy+uVOHZ5x/GjwVAFkCsV8IIVy+4MhzwwU= -github.com/charmbracelet/bubbletea v1.1.0 h1:FjAl9eAL3HBCHenhz/ZPjkKdScmaS5SK69JAK2YJK9c= -github.com/charmbracelet/bubbletea v1.1.0/go.mod h1:9Ogk0HrdbHolIKHdjfFpyXJmiCzGwy+FesYkZr7hYU4= -github.com/charmbracelet/lipgloss v0.13.0 h1:4X3PPeoWEDCMvzDvGmTajSyYPcZM4+y8sCA/SsA3cjw= -github.com/charmbracelet/lipgloss v0.13.0/go.mod h1:nw4zy0SBX/F/eAO1cWdcvy6qnkDUxr8Lw7dvFrAIbbY= -github.com/charmbracelet/x/ansi v0.2.3 h1:VfFN0NUpcjBRd4DnKfRaIRo53KRgey/nhOoEqosGDEY= -github.com/charmbracelet/x/ansi v0.2.3/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= +github.com/charmbracelet/bubbletea v1.1.2 h1:naQXF2laRxyLyil/i7fxdpiz1/k06IKquhm4vBfHsIc= +github.com/charmbracelet/bubbletea v1.1.2/go.mod h1:9HIU/hBV24qKjlehyj8z1r/tR9TYTQEag+cWZnuXo8E= +github.com/charmbracelet/lipgloss v1.0.0 h1:O7VkGDvqEdGi93X+DeqsQ7PKHDgtQfF8j8/O2qFMQNg= +github.com/charmbracelet/lipgloss v1.0.0/go.mod h1:U5fy9Z+C38obMs+T+tJqst9VGzlOYGj4ri9reL3qUlo= +github.com/charmbracelet/x/ansi v0.4.2 h1:0JM6Aj/g/KC154/gOP4vfxun0ff6itogDYk41kof+qk= +github.com/charmbracelet/x/ansi v0.4.2/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= github.com/charmbracelet/x/exp/golden v0.0.0-20240815200342-61de596daa2b h1:MnAMdlwSltxJyULnrYbkZpp4k58Co7Tah3ciKhSNo0Q= github.com/charmbracelet/x/exp/golden v0.0.0-20240815200342-61de596daa2b/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= github.com/charmbracelet/x/exp/teatest v0.0.0-20240222131549-03ee51df8bea h1:rMsCa4AcGApEidjhRpitA2HZds22ZSnAuVjx8SVF3yA= github.com/charmbracelet/x/exp/teatest v0.0.0-20240222131549-03ee51df8bea/go.mod h1:SG24wGkG/mix5V2dZLXfQ6Bod43HGvk9CkTDxATwKN4= github.com/charmbracelet/x/term v0.2.0 h1:cNB9Ot9q8I711MyZ7myUR5HFWL/lc3OpU8jZ4hwm0x0= github.com/charmbracelet/x/term v0.2.0/go.mod h1:GVxgxAbjUrmpvIINHIQnJJKpMlHiZ4cktEQCN6GWyF0= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cli/browser v1.3.0 h1:LejqCrpWr+1pRqmEPDGnTZOjsMe7sehifLynZJuqJpo= github.com/cli/browser v1.3.0/go.mod h1:HH8s+fOAxjhQoBUAsKuPCbqUuxZDhQ2/aD+SzsEfBTk= github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= -github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0= +github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deepmap/oapi-codegen v1.16.3 h1:GT9G86SbQtT1r8ZB+4Cybi9VGdu1P5ieNvNdEoCSbrA= -github.com/deepmap/oapi-codegen v1.16.3/go.mod h1:JD6ErqeX0nYnhdciLc61Konj3NBASREMlkHOgHn8WAM= +github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58= +github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 h1:PRxIJD8XjimM5aTknUK9w6DHLDox2r2M3DI4i2pnd3w= +github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936/go.mod h1:ttYvX5qlB+mlV1okblJqcSMtR4c52UKxDiX9GRBS8+Q= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= -github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/getkin/kin-openapi v0.127.0 h1:Mghqi3Dhryf3F8vR370nN67pAERW+3a95vomb3MAREY= +github.com/getkin/kin-openapi v0.127.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U= github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -77,15 +90,19 @@ github.com/google/go-github/v54 v54.0.0 h1:OZdXwow4EAD5jEo5qg+dGFH2DpkyZvVsAehjv github.com/google/go-github/v54 v54.0.0/go.mod h1:Sw1LXWHhXRZtzJ9LI5fyJg9wbQzYvFhW8W5P2yaAQ7s= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inetaf/tcpproxy v0.0.0-20240214030015-3ce58045626c h1:gYfYE403/nlrGNYj6BEOs9ucLCAGB9gstlSk92DttTg= github.com/inetaf/tcpproxy v0.0.0-20240214030015-3ce58045626c/go.mod h1:Di7LXRyUcnvAcLicFhtM9/MlZl/TNgRSDHORM2c6CMI= -github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= -github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= +github.com/invopop/yaml v0.3.1/go.mod h1:PMOp3nn4/12yEZUFfmOuNHJsZToEEOwoWsT+D81KkeA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/joeshaw/envdecode v0.0.0-20200121155833-099f1fc765bd h1:nIzoSW6OhhppWLm4yqBwZsKJlAayUu5FGozhrF3ETSM= github.com/joeshaw/envdecode v0.0.0-20200121155833-099f1fc765bd/go.mod h1:MEQrHur0g8VplbLOv5vXmDzacSaH9Z7XhcgsSh1xciU= @@ -102,8 +119,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= @@ -123,12 +138,30 @@ github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIf github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 h1:ykgG34472DWey7TSjd8vIfNykXgjOgYJZoQbKfEeY/Q= +github.com/oapi-codegen/oapi-codegen/v2 v2.4.1/go.mod h1:N5+lY1tiTDV3V1BeHtOxeWXHoPVeApvsvjJqegfoaz8= github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= -github.com/perimeterx/marshmallow v1.1.4 h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw= -github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= +github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -137,68 +170,83 @@ github.com/r3labs/diff/v3 v3.0.1/go.mod h1:f1S9bourRbiM66NskseyUdo0fTmEE0qKrikYJ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA= github.com/sahilm/fuzzy v0.1.1/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/speakeasy-api/openapi-overlay v0.9.0 h1:Wrz6NO02cNlLzx1fB093lBlYxSI54VRhy1aSutx0PQg= +github.com/speakeasy-api/openapi-overlay v0.9.0/go.mod h1:f5FloQrHA7MsxYg9djzMD5h6dxrHjVVByWKh7an8TRc= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zalando/go-keyring v0.2.5 h1:Bc2HHpjALryKD62ppdEzaFG6VxL6Bc+5v0LYpN8Lba8= -github.com/zalando/go-keyring v0.2.5/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= +github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= +github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/zalando/go-keyring v0.2.6 h1:r7Yc3+H+Ux0+M72zacZoItR3UDxeWfKTcabvkI8ua9s= +github.com/zalando/go-keyring v0.2.6/go.mod h1:2TCrxYrbUNYfNS/Kgy/LSrkSQzZ5UPVH85RwfczwvcI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 h1:6R2FC06FonbXQ8pK11/PDFY6N6LWlf9KlzibaCapmqc= golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -206,34 +254,44 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.3-0.20240830093551-013dd178dc9a h1:UNlrMk8d892POVAv5gvUsHpTm1eiqQBL8k7Dv8nTe1E= -google.golang.org/protobuf v1.34.3-0.20240830093551-013dd178dc9a/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM= diff --git a/lcl/lcl.go b/lcl/lcl.go index 9bbf57f..f55b2ff 100644 --- a/lcl/lcl.go +++ b/lcl/lcl.go @@ -2,6 +2,7 @@ package lcl import ( "context" + "errors" "fmt" "net" "slices" @@ -9,8 +10,6 @@ import ( "github.com/anchordotdev/cli" "github.com/anchordotdev/cli/api" "github.com/anchordotdev/cli/auth" - "github.com/anchordotdev/cli/component" - componentmodels "github.com/anchordotdev/cli/component/models" "github.com/anchordotdev/cli/lcl/models" "github.com/anchordotdev/cli/trust" "github.com/anchordotdev/cli/truststore" @@ -46,8 +45,6 @@ var CmdLcl = cli.NewCmd[Command](cli.CmdRoot, "lcl", func(cmd *cobra.Command) { type Command struct { anc *api.Session clipboard cli.Clipboard - - OrgAPID, RealmAPID string } func (c Command) UI() cli.UI { @@ -57,8 +54,6 @@ func (c Command) UI() cli.UI { } func (c *Command) run(ctx context.Context, drv *ui.Driver) error { - cfg := cli.ConfigFromContext(ctx) - if err := c.apiAuth(ctx, drv); err != nil { return err } @@ -76,7 +71,7 @@ func (c *Command) run(ctx context.Context, drv *ui.Driver) error { return err } - return c.appSetup(ctx, cfg, drv) + return c.appSetup(ctx, drv) } func (c *Command) apiAuth(ctx context.Context, drv *ui.Driver) error { @@ -161,25 +156,12 @@ func (c *Command) systemConfig(ctx context.Context, drv *ui.Driver) error { } } -func (c *Command) appSetup(ctx context.Context, cfg *cli.Config, drv *ui.Driver) error { +func (c *Command) appSetup(ctx context.Context, drv *ui.Driver) error { // run setup command drv.Activate(ctx, models.SetupHeader) drv.Activate(ctx, models.SetupHint) - orgAPID, err := c.orgAPID(ctx, cfg, drv) - if err != nil { - return err - } - - realmAPID, err := c.realmAPID(ctx, cfg, drv, orgAPID) - if err != nil { - return err - } - cmdSetup := &Setup{ - OrgAPID: orgAPID, - RealmAPID: realmAPID, - anc: c.anc, clipboard: c.clipboard, } @@ -187,68 +169,6 @@ func (c *Command) appSetup(ctx context.Context, cfg *cli.Config, drv *ui.Driver) return cmdSetup.perform(ctx, drv) } -func (c *Command) orgAPID(ctx context.Context, cfg *cli.Config, drv *ui.Driver) (string, error) { - if c.OrgAPID != "" { - return c.OrgAPID, nil - } - - if cfg.Org.APID != "" { - drv.Activate(ctx, &componentmodels.ConfigVia{ - Config: cfg, - ConfigFetchFn: func(cfg *cli.Config) any { return cfg.Org.APID }, - Flag: "--org", - Singular: "organization", - }) - return cfg.Org.APID, nil - } - - selector := &component.Selector[api.Organization]{ - Prompt: "Which organization do you want to manage your local development environment for?", - Flag: "--org", - - Fetcher: &component.Fetcher[api.Organization]{ - FetchFn: func() ([]api.Organization, error) { return c.anc.GetOrgs(ctx) }, - }, - } - - org, err := selector.Choice(ctx, drv) - if err != nil { - return "", err - } - return org.Apid, nil -} - -func (c *Command) realmAPID(ctx context.Context, cfg *cli.Config, drv *ui.Driver, orgAPID string) (string, error) { - if c.RealmAPID != "" { - return c.RealmAPID, nil - } - - if cfg.Lcl.RealmAPID != "" { - drv.Activate(ctx, &componentmodels.ConfigVia{ - Config: cfg, - ConfigFetchFn: func(cfg *cli.Config) any { return cfg.Lcl.RealmAPID }, - Flag: "--realm", - Singular: "realm", - }) - return cfg.Lcl.RealmAPID, nil - } - - selector := &component.Selector[api.Realm]{ - Prompt: fmt.Sprintf("Which %s realm do you want to manage your local development environment for?", ui.Emphasize(orgAPID)), - Flag: "--realm", - - Fetcher: &component.Fetcher[api.Realm]{ - FetchFn: func() ([]api.Realm, error) { return c.anc.GetOrgRealms(ctx, orgAPID) }, - }, - } - - realm, err := selector.Choice(ctx, drv) - if err != nil { - return "", err - } - return realm.Apid, nil -} - func checkLoopbackDomain(ctx context.Context, drv *ui.Driver, domain string) error { drv.Activate(ctx, &models.DomainResolver{ Domain: domain, @@ -257,6 +177,12 @@ func checkLoopbackDomain(ctx context.Context, drv *ui.Driver, domain string) err addrs, err := new(net.Resolver).LookupHost(ctx, domain) if err != nil { drv.Send(models.DomainStatusMsg(false)) + + var dnserr *net.DNSError + if errors.As(err, &dnserr) { + return cli.UserError{Err: errors.New("no such host")} + } + return err } diff --git a/lcl/lcl_test.go b/lcl/lcl_test.go index e3d30dd..c30c615 100644 --- a/lcl/lcl_test.go +++ b/lcl/lcl_test.go @@ -168,6 +168,8 @@ func TestLcl(t *testing.T) { errc <- tm.Quit() }() + tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) // select first option, "lcl" + uitest.WaitForGoldenContains(t, drv, errc, "? What lcl.host domain would you like to use for diagnostics?", ) @@ -217,15 +219,18 @@ func TestLcl(t *testing.T) { // setup uitest.WaitForGoldenContains(t, drv, errc, - "? What application server type?", + "? Which organization's lcl.host local development environment do you want to setup?", ) + tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) // select first option, "lcl_setup" + uitest.WaitForGoldenContains(t, drv, errc, + "? What application server type?", + ) tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) uitest.WaitForGoldenContains(t, drv, errc, "? What is the application name?", ) - tm.Type("test-app") tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) @@ -286,11 +291,11 @@ func TestLcl(t *testing.T) { }() uitest.WaitForGoldenContains(t, drv, errc, - "? Which lcl/localhost service's lcl.host local development environment do you want to setup?", + "? Which organization's lcl.host local development environment do you want to setup?", ) - uitest.TestGolden(t, drv.Golden()) // just focus on initial portion to check for skip + uitest.TestGolden(t, drv.Golden()) }) t.Run(fmt.Sprintf("non-personal-cas-missing-%s", uitest.TestTagOS()), func(t *testing.T) { @@ -354,7 +359,7 @@ func TestLcl(t *testing.T) { tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) uitest.WaitForGoldenContains(t, drv, errc, - "? Which organization do you want to manage your local development environment for?", + "? Which organization's lcl.host local development environment do you want to setup?", ) tm.Send(tea.KeyMsg{Type: tea.KeyDown}) diff --git a/lcl/models/setup.go b/lcl/models/setup.go index 2bd748e..95d74ef 100644 --- a/lcl/models/setup.go +++ b/lcl/models/setup.go @@ -166,7 +166,62 @@ func (m *SetupCategory) View() string { return b.String() } -type SetupName struct { +type SetupOrgName struct { + InputCh chan<- string + + input *textinput.Model + choice string +} + +func (m *SetupOrgName) Init() tea.Cmd { + ti := textinput.New() + ti.Prompt = "" + ti.Cursor.Style = ui.Prompt + ti.Focus() + + m.input = &ti + + return textinput.Blink +} + +func (m *SetupOrgName) Update(msg tea.Msg) (tea.Model, tea.Cmd) { + switch msg := msg.(type) { + case tea.KeyMsg: + switch msg.Type { + case tea.KeyEnter: + if m.InputCh != nil { + value := m.input.Value() + + m.choice = value + m.InputCh <- value + m.InputCh = nil + } + return m, nil + case tea.KeyEsc: + return m, ui.Exit + } + } + + ti, cmd := m.input.Update(msg) + m.input = &ti + return m, cmd +} + +func (m *SetupOrgName) View() string { + var b strings.Builder + + if m.InputCh != nil { + fmt.Fprintln(&b, ui.StepPrompt("What is the organization name?")) + fmt.Fprintln(&b, ui.StepPrompt(m.input.View())) + return b.String() + } + + fmt.Fprintln(&b, ui.StepDone(fmt.Sprintf("Entered %s organization name.", ui.Emphasize(m.choice)))) + + return b.String() +} + +type SetupServiceName struct { InputCh chan<- string Default string @@ -175,7 +230,7 @@ type SetupName struct { choice string } -func (m *SetupName) Init() tea.Cmd { +func (m *SetupServiceName) Init() tea.Cmd { ti := textinput.New() ti.Prompt = "" ti.Cursor.Style = ui.Prompt @@ -190,7 +245,7 @@ func (m *SetupName) Init() tea.Cmd { return textinput.Blink } -func (m *SetupName) Update(msg tea.Msg) (tea.Model, tea.Cmd) { +func (m *SetupServiceName) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyMsg: switch msg.Type { @@ -216,7 +271,7 @@ func (m *SetupName) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, cmd } -func (m *SetupName) View() string { +func (m *SetupServiceName) View() string { var b strings.Builder if m.InputCh != nil { diff --git a/lcl/setup.go b/lcl/setup.go index 83e03b5..cc06582 100644 --- a/lcl/setup.go +++ b/lcl/setup.go @@ -220,6 +220,8 @@ func (c *Setup) orgAPID(ctx context.Context, cfg *cli.Config, drv *ui.Driver) (s Prompt: "Which organization's lcl.host local development environment do you want to setup?", Flag: "--org", + Creatable: true, + Fetcher: &component.Fetcher[api.Organization]{ FetchFn: func() ([]api.Organization, error) { return c.anc.GetOrgs(ctx) }, }, @@ -229,7 +231,38 @@ func (c *Setup) orgAPID(ctx context.Context, cfg *cli.Config, drv *ui.Driver) (s if err != nil { return "", err } + if org == nil || (*org == api.Organization{}) { + orgName, err := c.orgName(ctx, cfg, drv) + if err != nil { + return "", err + } + + if org, err = c.anc.CreateOrg(ctx, orgName); err != nil { + return "", err + } + // FIXME: provide nicer output about using newly created value, and hint flag? + return org.Apid, nil + } return org.Apid, nil + +} + +func (c *Setup) orgName(ctx context.Context, cfg *cli.Config, drv *ui.Driver) (string, error) { + if cfg.Org.Name != "" { + return cfg.Org.Name, nil + } + + inputc := make(chan string) + drv.Activate(ctx, &models.SetupOrgName{ + InputCh: inputc, + }) + + select { + case orgName := <-inputc: + return orgName, nil + case <-ctx.Done(): + return "", ctx.Err() + } } func (c *Setup) realmAPID(ctx context.Context, cfg *cli.Config, drv *ui.Driver, orgAPID string) (string, error) { @@ -293,7 +326,7 @@ func (c *Setup) serviceAPID(ctx context.Context, cfg *cli.Config, drv *ui.Driver if err != nil { return "", err } - if service == nil { + if service == nil || (*service == api.Service{}) { return "", nil } return service.Slug, nil @@ -310,7 +343,7 @@ func (c *Setup) serviceName(ctx context.Context, cfg *cli.Config, drv *ui.Driver } inputc := make(chan string) - drv.Activate(ctx, &models.SetupName{ + drv.Activate(ctx, &models.SetupServiceName{ InputCh: inputc, Default: defaultName, }) diff --git a/lcl/setup_test.go b/lcl/setup_test.go index f85cb39..dceaf2e 100644 --- a/lcl/setup_test.go +++ b/lcl/setup_test.go @@ -93,6 +93,11 @@ func TestSetup(t *testing.T) { errc <- tm.Quit() }() + uitest.WaitForGoldenContains(t, drv, errc, + "? Which organization's lcl.host local development environment do you want to setup?", + ) + tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) // select first option, "lcl_setup" + uitest.WaitForGoldenContains(t, drv, errc, "? What application server type?", ) @@ -168,6 +173,11 @@ func TestSetup(t *testing.T) { errc <- tm.Quit() }() + uitest.WaitForGoldenContains(t, drv, errc, + "? Which organization's lcl.host local development environment do you want to setup?", + ) + tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) // select first option, "lcl_setup" + uitest.WaitForGoldenContains(t, drv, errc, "? Which lcl_setup/localhost service's lcl.host local development environment do you want to setup?", ) @@ -229,6 +239,11 @@ func TestSetup(t *testing.T) { errc <- tm.Quit() }() + uitest.WaitForGoldenContains(t, drv, errc, + "? Which organization's lcl.host local development environment do you want to setup?", + ) + tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) // select first option, "org-solo" + uitest.WaitForGoldenContains(t, drv, errc, "? Which org-slug/realm-slug service's lcl.host local development environment do you want to setup?", ) @@ -268,6 +283,11 @@ func TestSetup(t *testing.T) { errc <- tm.Quit() }() + uitest.WaitForGoldenContains(t, drv, errc, + "? Which organization's lcl.host local development environment do you want to setup?", + ) + tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) // select first option, "lcl_setup" + uitest.WaitForGoldenContains(t, drv, errc, "? Which lcl_setup/localhost service's lcl.host local development environment do you want to setup?", ) @@ -329,6 +349,11 @@ func TestSetup(t *testing.T) { errc <- tm.Quit() }() + uitest.WaitForGoldenContains(t, drv, errc, + "? Which organization's lcl.host local development environment do you want to setup?", + ) + tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) // select first option, "lcl_setup" + uitest.WaitForGoldenContains(t, drv, errc, "? Which lcl_setup/localhost service's lcl.host local development environment do you want to setup?", ) diff --git a/lcl/testdata/TestBootstrap/basics.golden b/lcl/testdata/TestBootstrap/basics.golden index 532d1a6..2c1b448 100644 --- a/lcl/testdata/TestBootstrap/basics.golden +++ b/lcl/testdata/TestBootstrap/basics.golden @@ -228,7 +228,7 @@ | Now, we'll add your personal CA certificates to your system's trust stores. # Manage CA Certificates in your Local Trust Store(s) `anchor trust` - * Updating Mock: installing lcl_config/localhost - AnchorCA ECDSA… ⠋ + * [1/2] Updating Mock: installing lcl_config/localhost - AnchorCA ECDSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Initial System Configuration for lcl.host Local HTTPS Development `anchor lcl bootstrap` @@ -257,7 +257,7 @@ # Manage CA Certificates in your Local Trust Store(s) `anchor trust` - Updated Mock: installed lcl_config/localhost - AnchorCA [ECDSA] - * Updating Mock: installing lcl_config/localhost - AnchorCA RSA… ⠋ + * [2/2] Updating Mock: installing lcl_config/localhost - AnchorCA RSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Initial System Configuration for lcl.host Local HTTPS Development `anchor lcl bootstrap` diff --git a/lcl/testdata/TestLcl/basics.golden b/lcl/testdata/TestLcl/basics.golden index 8e02a5b..00dc308 100644 --- a/lcl/testdata/TestLcl/basics.golden +++ b/lcl/testdata/TestLcl/basics.golden @@ -488,7 +488,7 @@ | Now, we'll add your personal CA certificates to your system's trust stores. # Manage CA Certificates in your Local Trust Store(s) `anchor trust` - * Updating Mock: installing lcl/localhost - AnchorCA ECDSA… ⠋ + * [1/2] Updating Mock: installing lcl/localhost - AnchorCA ECDSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -533,7 +533,7 @@ # Manage CA Certificates in your Local Trust Store(s) `anchor trust` - Updated Mock: installed lcl/localhost - AnchorCA [ECDSA] - * Updating Mock: installing lcl/localhost - AnchorCA RSA… ⠋ + * [2/2] Updating Mock: installing lcl/localhost - AnchorCA RSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -735,7 +735,64 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── +| Let's set up fast and totally free lcl.host HTTPS! + +# Setup lcl.host HTTPS Local Development Environment `anchor lcl` + | We'll set you up to use HTTPS locally in your browsers and other programs. + +# Audit lcl.host HTTPS Local Development Environment `anchor lcl audit` + | We'll compare your local development CA certificates from Anchor and your local trust stores. + - Compared local and expected CA certificates: need to install 2 missing certificates. + +# Initial System Configuration for lcl.host Local HTTPS Development `anchor lcl bootstrap` + | We'll configure your browsers and OS to trust your local development certificates. + - Checked diagnostic service on Anchor.dev: need to provision service. + - Entered hello-world.lcl.host domain for lcl.host diagnostic certificate. + - Resolved hello-world.lcl.host domain: success! + | Now we'll provision Anchor.dev resources and HTTPS certificates for you. + - Created hello-world [hello-world.lcl.host, hello-world.localhost] diagnostic resources on Anchor.dev. + - Great, http://hello-world.lcl.host:4433 works as expected (without HTTPS). + | Now, we'll add your personal CA certificates to your system's trust stores. + +# Manage CA Certificates in your Local Trust Store(s) `anchor trust` + - Updated Mock: installed lcl/localhost - AnchorCA [ECDSA, RSA] + | Before we move on, let's test HTTPS. + - Success! https://hello-world.lcl.host:4433 works as expected (encrypted with HTTPS). + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + ? Which organization's lcl.host local development environment do you want to setup? + > lcl (lcl) + Create New Organization +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── +| Let's set up fast and totally free lcl.host HTTPS! + +# Setup lcl.host HTTPS Local Development Environment `anchor lcl` + | We'll set you up to use HTTPS locally in your browsers and other programs. + +# Audit lcl.host HTTPS Local Development Environment `anchor lcl audit` + | We'll compare your local development CA certificates from Anchor and your local trust stores. + - Compared local and expected CA certificates: need to install 2 missing certificates. + +# Initial System Configuration for lcl.host Local HTTPS Development `anchor lcl bootstrap` + | We'll configure your browsers and OS to trust your local development certificates. + - Checked diagnostic service on Anchor.dev: need to provision service. + - Entered hello-world.lcl.host domain for lcl.host diagnostic certificate. + - Resolved hello-world.lcl.host domain: success! + | Now we'll provision Anchor.dev resources and HTTPS certificates for you. + - Created hello-world [hello-world.lcl.host, hello-world.localhost] diagnostic resources on Anchor.dev. + - Great, http://hello-world.lcl.host:4433 works as expected (without HTTPS). + | Now, we'll add your personal CA certificates to your system's trust stores. + +# Manage CA Certificates in your Local Trust Store(s) `anchor trust` + - Updated Mock: installed lcl/localhost - AnchorCA [ECDSA, RSA] + | Before we move on, let's test HTTPS. + - Success! https://hello-world.lcl.host:4433 works as expected (encrypted with HTTPS). + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + - Selected lcl organization. You can also use `--org lcl`. ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -763,7 +820,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. * Fetching realms…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -792,7 +849,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -821,7 +878,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. * Fetching services…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── @@ -851,7 +908,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. ─── SetupScan ────────────────────────────────────────────────────────────────── @@ -881,7 +938,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. * Scanning current directory for local application…⠋ @@ -912,7 +969,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -943,7 +1000,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -980,12 +1037,12 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -1012,14 +1069,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? lcl -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -1046,14 +1103,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? t -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -1080,14 +1137,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? te -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -1114,14 +1171,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? tes -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -1148,14 +1205,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -1182,14 +1239,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test- -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -1216,14 +1273,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-a -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -1250,14 +1307,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-ap -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -1284,14 +1341,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-app -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -1318,7 +1375,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1351,7 +1408,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1387,7 +1444,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1421,7 +1478,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1456,7 +1513,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1491,7 +1548,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1528,7 +1585,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1565,7 +1622,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1605,7 +1662,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1643,7 +1700,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1684,7 +1741,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1725,7 +1782,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -1770,7 +1827,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. + - Selected lcl organization. You can also use `--org lcl`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. diff --git a/lcl/testdata/TestLcl/non-personal-cas-missing-unix.golden b/lcl/testdata/TestLcl/non-personal-cas-missing-unix.golden index 2e0dcde..d189072 100644 --- a/lcl/testdata/TestLcl/non-personal-cas-missing-unix.golden +++ b/lcl/testdata/TestLcl/non-personal-cas-missing-unix.golden @@ -107,7 +107,7 @@ # Manage CA Certificates in your Local Trust Store(s) `anchor lcl trust` | We'll check your local trust stores and make any needed updates. - * Updating Mock: installing ankyco/development - AnchorCA ECDSA… ⠋ + * [1/2] Updating Mock: installing ankyco/development - AnchorCA ECDSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -134,7 +134,7 @@ # Manage CA Certificates in your Local Trust Store(s) `anchor lcl trust` | We'll check your local trust stores and make any needed updates. - Updated Mock: installed ankyco/development - AnchorCA [ECDSA] - * Updating Mock: installing ankyco/development - AnchorCA RSA… ⠋ + * [2/2] Updating Mock: installing ankyco/development - AnchorCA RSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -228,9 +228,10 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - ? Which organization do you want to manage your local development environment for? + ? Which organization's lcl.host local development environment do you want to setup? > anky@anchor.dev (ankydotdev) AnkyCo (ankyco) + Create New Organization ─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -247,9 +248,10 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - ? Which organization do you want to manage your local development environment for? + ? Which organization's lcl.host local development environment do you want to setup? anky@anchor.dev (ankydotdev) > AnkyCo (ankyco) + Create New Organization ─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── | Let's set up fast and totally free lcl.host HTTPS! diff --git a/lcl/testdata/TestLcl/non-personal-cas-missing-windows.golden b/lcl/testdata/TestLcl/non-personal-cas-missing-windows.golden index c865ab3..7285d68 100644 --- a/lcl/testdata/TestLcl/non-personal-cas-missing-windows.golden +++ b/lcl/testdata/TestLcl/non-personal-cas-missing-windows.golden @@ -108,7 +108,7 @@ # Manage CA Certificates in your Local Trust Store(s) `anchor lcl trust` | We'll check your local trust stores and make any needed updates. | "ankyco/development - AnchorCA" Thumbprint (sha1): 0FC20F8F F8491310 6CC5441B FAE07B26 B4A036F7 - * Updating Mock: installing ankyco/development - AnchorCA ECDSA… ⠋ + * [1/2] Updating Mock: installing ankyco/development - AnchorCA ECDSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -136,7 +136,7 @@ | We'll check your local trust stores and make any needed updates. - Updated Mock: installed ankyco/development - AnchorCA [ECDSA] | "ankyco/development - AnchorCA" Thumbprint (sha1): 5710728A A336B3F0 4A4E96E6 F3E12932 A7FCAC72 - * Updating Mock: installing ankyco/development - AnchorCA RSA… ⠋ + * [2/2] Updating Mock: installing ankyco/development - AnchorCA RSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -230,9 +230,10 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - ? Which organization do you want to manage your local development environment for? + ? Which organization's lcl.host local development environment do you want to setup? > anky@anchor.dev (ankydotdev) AnkyCo (ankyco) + Create New Organization ─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── | Let's set up fast and totally free lcl.host HTTPS! @@ -249,9 +250,10 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - ? Which organization do you want to manage your local development environment for? + ? Which organization's lcl.host local development environment do you want to setup? anky@anchor.dev (ankydotdev) > AnkyCo (ankyco) + Create New Organization ─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── | Let's set up fast and totally free lcl.host HTTPS! diff --git a/lcl/testdata/TestLcl/skip-diagnostic.golden b/lcl/testdata/TestLcl/skip-diagnostic.golden index c15c7ce..72df6ad 100644 --- a/lcl/testdata/TestLcl/skip-diagnostic.golden +++ b/lcl/testdata/TestLcl/skip-diagnostic.golden @@ -113,8 +113,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. -─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── | Let's set up fast and totally free lcl.host HTTPS! # Setup lcl.host HTTPS Local Development Environment `anchor lcl` @@ -128,73 +127,6 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. - * Fetching realms…⠋ -─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── -| Let's set up fast and totally free lcl.host HTTPS! - -# Setup lcl.host HTTPS Local Development Environment `anchor lcl` - | We'll set you up to use HTTPS locally in your browsers and other programs. - -# Audit lcl.host HTTPS Local Development Environment `anchor lcl audit` - | We'll compare your local development CA certificates from Anchor and your local trust stores. - - Compared local and expected CA certificates: no updates needed. - -# Skipped: Initial System Configuration for lcl.host Local HTTPS Development `anchor lcl bootstrap` - -# Setup lcl.host Application `anchor lcl setup` - | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. - - Using localhost, the only available realm. You can also use `--realm localhost`. -─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── -| Let's set up fast and totally free lcl.host HTTPS! - -# Setup lcl.host HTTPS Local Development Environment `anchor lcl` - | We'll set you up to use HTTPS locally in your browsers and other programs. - -# Audit lcl.host HTTPS Local Development Environment `anchor lcl audit` - | We'll compare your local development CA certificates from Anchor and your local trust stores. - - Compared local and expected CA certificates: no updates needed. - -# Skipped: Initial System Configuration for lcl.host Local HTTPS Development `anchor lcl bootstrap` - -# Setup lcl.host Application `anchor lcl setup` - | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. - - Using localhost, the only available realm. You can also use `--realm localhost`. - * Fetching services…⠋ -─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── -| Let's set up fast and totally free lcl.host HTTPS! - -# Setup lcl.host HTTPS Local Development Environment `anchor lcl` - | We'll set you up to use HTTPS locally in your browsers and other programs. - -# Audit lcl.host HTTPS Local Development Environment `anchor lcl audit` - | We'll compare your local development CA certificates from Anchor and your local trust stores. - - Compared local and expected CA certificates: no updates needed. - -# Skipped: Initial System Configuration for lcl.host Local HTTPS Development `anchor lcl bootstrap` - -# Setup lcl.host Application `anchor lcl setup` - | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. - - Using localhost, the only available realm. You can also use `--realm localhost`. -─── Selector[github.com/anchordotdev/cli/api.Service] ────────────────────────── -| Let's set up fast and totally free lcl.host HTTPS! - -# Setup lcl.host HTTPS Local Development Environment `anchor lcl` - | We'll set you up to use HTTPS locally in your browsers and other programs. - -# Audit lcl.host HTTPS Local Development Environment `anchor lcl audit` - | We'll compare your local development CA certificates from Anchor and your local trust stores. - - Compared local and expected CA certificates: no updates needed. - -# Skipped: Initial System Configuration for lcl.host Local HTTPS Development `anchor lcl bootstrap` - -# Setup lcl.host Application `anchor lcl setup` - | We'll integrate your application and system for HTTPS local development. - - Using lcl, the only available organization. You can also use `--org lcl`. - - Using localhost, the only available realm. You can also use `--realm localhost`. - ? Which lcl/localhost service's lcl.host local development environment do you want to setup? - > test-app (test-app) - Create New Service + ? Which organization's lcl.host local development environment do you want to setup? + > lcl (lcl) + Create New Organization diff --git a/lcl/testdata/TestSetup/create-service-automated-basics.golden b/lcl/testdata/TestSetup/create-service-automated-basics.golden index 7067b78..e733199 100644 --- a/lcl/testdata/TestSetup/create-service-automated-basics.golden +++ b/lcl/testdata/TestSetup/create-service-automated-basics.golden @@ -18,38 +18,49 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + ? Which organization's lcl.host local development environment do you want to setup? + > lcl_setup (lcl_setup) + Create New Organization +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. * Fetching realms…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. * Fetching services…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. ─── SetupScan ────────────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. * Scanning current directory for local application…⠋ @@ -57,7 +68,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -65,7 +76,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -79,115 +90,115 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? lcl -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? t -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? te -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? tes -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test- -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-a -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-ap -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-app -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -197,7 +208,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -210,7 +221,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -221,7 +232,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -233,7 +244,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -245,7 +256,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -259,7 +270,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -273,7 +284,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -290,7 +301,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -305,7 +316,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -323,7 +334,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -341,7 +352,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. @@ -363,7 +374,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - No services found, so we'll create one. - Scanned current directory. diff --git a/lcl/testdata/TestSetup/create-service-manual-basics.golden b/lcl/testdata/TestSetup/create-service-manual-basics.golden index cc69eec..94000b7 100644 --- a/lcl/testdata/TestSetup/create-service-manual-basics.golden +++ b/lcl/testdata/TestSetup/create-service-manual-basics.golden @@ -18,37 +18,48 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + ? Which organization's lcl.host local development environment do you want to setup? + > lcl_setup (lcl_setup) + Create New Organization +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. * Fetching realms…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. * Fetching services…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ─── Selector[github.com/anchordotdev/cli/api.Service] ────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ? Which lcl_setup/localhost service's lcl.host local development environment do you want to setup? > test-app (test-app) @@ -57,7 +68,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ? Which lcl_setup/localhost service's lcl.host local development environment do you want to setup? test-app (test-app) @@ -66,14 +77,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. ─── SetupScan ────────────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. * Scanning current directory for local application…⠋ @@ -81,7 +92,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -89,7 +100,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -103,115 +114,115 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? lcl -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? t -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? te -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? tes -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test- -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-a -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-ap -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-app -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -221,7 +232,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -234,7 +245,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -245,7 +256,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -257,7 +268,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -269,7 +280,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -283,7 +294,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -297,7 +308,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -314,7 +325,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -331,7 +342,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -346,7 +357,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -364,7 +375,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -389,7 +400,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. diff --git a/lcl/testdata/TestSetup/create-service-with-custom-domain.golden b/lcl/testdata/TestSetup/create-service-with-custom-domain.golden index cd487a6..980320b 100644 --- a/lcl/testdata/TestSetup/create-service-with-custom-domain.golden +++ b/lcl/testdata/TestSetup/create-service-with-custom-domain.golden @@ -18,37 +18,48 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + ? Which organization's lcl.host local development environment do you want to setup? + > lcl_setup (lcl_setup) + Create New Organization +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. * Fetching realms…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. * Fetching services…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ─── Selector[github.com/anchordotdev/cli/api.Service] ────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ? Which lcl_setup/localhost service's lcl.host local development environment do you want to setup? > test-app (test-app) @@ -57,7 +68,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ? Which lcl_setup/localhost service's lcl.host local development environment do you want to setup? test-app (test-app) @@ -66,14 +77,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. ─── SetupScan ────────────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. * Scanning current directory for local application…⠋ @@ -81,7 +92,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -89,7 +100,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -103,324 +114,324 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? lcl -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? t -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? te -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? tes -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test- -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-e -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-ex -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-exp -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-expl -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-expli -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explic -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explici -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit- -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-s -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-su -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-sub -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-subd -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-subdo -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-subdom -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-subdoma -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-subdomai -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-subdomain -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-subdomain- -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-subdomain-a -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-subdomain-ap -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? test-explicit-subdomain-app -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -430,7 +441,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -443,7 +454,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -456,7 +467,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -469,7 +480,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -482,7 +493,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -495,7 +506,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -508,7 +519,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -521,7 +532,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -534,7 +545,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -547,7 +558,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -560,7 +571,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -573,7 +584,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -586,7 +597,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -599,7 +610,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -612,7 +623,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -625,7 +636,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -638,7 +649,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -651,7 +662,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -664,7 +675,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -677,7 +688,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -690,7 +701,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -703,7 +714,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -716,7 +727,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -729,7 +740,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -742,7 +753,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -755,7 +766,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -768,7 +779,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -781,7 +792,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -792,7 +803,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -804,7 +815,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -816,7 +827,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -830,7 +841,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -844,7 +855,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -861,7 +872,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -878,7 +889,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -893,7 +904,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -911,7 +922,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -936,7 +947,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. diff --git a/lcl/testdata/TestSetup/create-service-with-parameterized-name.golden b/lcl/testdata/TestSetup/create-service-with-parameterized-name.golden index c2ab532..551f4fe 100644 --- a/lcl/testdata/TestSetup/create-service-with-parameterized-name.golden +++ b/lcl/testdata/TestSetup/create-service-with-parameterized-name.golden @@ -18,37 +18,48 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + ? Which organization's lcl.host local development environment do you want to setup? + > lcl_setup (lcl_setup) + Create New Organization +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. * Fetching realms…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. * Fetching services…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ─── Selector[github.com/anchordotdev/cli/api.Service] ────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ? Which lcl_setup/localhost service's lcl.host local development environment do you want to setup? > test-app (test-app) @@ -57,7 +68,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. ? Which lcl_setup/localhost service's lcl.host local development environment do you want to setup? test-app (test-app) @@ -66,14 +77,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. ─── SetupScan ────────────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. * Scanning current directory for local application…⠋ @@ -81,7 +92,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -89,7 +100,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -103,115 +114,115 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? lcl -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? T -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? Te -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? Tes -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? Test -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? Test -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? Test A -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? Test Ap -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. - Entered go application server type. ? What is the application name? ? Test App -─── SetupName ────────────────────────────────────────────────────────────────── +─── SetupServiceName ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -221,7 +232,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -234,7 +245,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -245,7 +256,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -257,7 +268,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -269,7 +280,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -283,7 +294,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -297,7 +308,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -314,7 +325,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -331,7 +342,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -346,7 +357,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -364,7 +375,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. @@ -389,7 +400,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using lcl_setup, the only available organization. You can also use `--org lcl_setup`. + - Selected lcl_setup organization. You can also use `--org lcl_setup`. - Using localhost, the only available realm. You can also use `--realm localhost`. - Selected Create New Service. - Scanned current directory. diff --git a/lcl/testdata/TestSetup/existing-service-basics-unix.golden b/lcl/testdata/TestSetup/existing-service-basics-unix.golden index 483c439..dcda2b8 100644 --- a/lcl/testdata/TestSetup/existing-service-basics-unix.golden +++ b/lcl/testdata/TestSetup/existing-service-basics-unix.golden @@ -18,37 +18,48 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + ? Which organization's lcl.host local development environment do you want to setup? + > Org Slug (org-slug) + Create New Organization +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + - Selected org-slug organization. You can also use `--org org-slug`. ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. * Fetching realms…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. * Fetching services…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. ─── Selector[github.com/anchordotdev/cli/api.Service] ────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. ? Which org-slug/realm-slug service's lcl.host local development environment do you want to setup? > service-name (service-name) @@ -57,14 +68,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. ─── ServiceEnvHeader ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -73,7 +84,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -83,7 +94,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -94,7 +105,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -104,7 +115,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -118,7 +129,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -129,7 +140,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -142,7 +153,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. diff --git a/lcl/testdata/TestSetup/existing-service-basics-windows.golden b/lcl/testdata/TestSetup/existing-service-basics-windows.golden index 483c439..dcda2b8 100644 --- a/lcl/testdata/TestSetup/existing-service-basics-windows.golden +++ b/lcl/testdata/TestSetup/existing-service-basics-windows.golden @@ -18,37 +18,48 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + ? Which organization's lcl.host local development environment do you want to setup? + > Org Slug (org-slug) + Create New Organization +─── Selector[github.com/anchordotdev/cli/api.Organization] ───────────────────── + +# Setup lcl.host Application `anchor lcl setup` + | We'll integrate your application and system for HTTPS local development. + - Selected org-slug organization. You can also use `--org org-slug`. ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. * Fetching realms…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Realm] ───────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. * Fetching services…⠋ ─── Fetcher[github.com/anchordotdev/cli/api.Service] ─────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. ─── Selector[github.com/anchordotdev/cli/api.Service] ────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. ? Which org-slug/realm-slug service's lcl.host local development environment do you want to setup? > service-name (service-name) @@ -57,14 +68,14 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. ─── ServiceEnvHeader ─────────────────────────────────────────────────────────── # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -73,7 +84,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -83,7 +94,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -94,7 +105,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -104,7 +115,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -118,7 +129,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -129,7 +140,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. @@ -142,7 +153,7 @@ # Setup lcl.host Application `anchor lcl setup` | We'll integrate your application and system for HTTPS local development. - - Using org-slug, the only available organization. You can also use `--org org-slug`. + - Selected org-slug organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Selected service-name service. You can also use `--service service-name`. diff --git a/lcl/testdata/TestTrust/basics-unix.golden b/lcl/testdata/TestTrust/basics-unix.golden index 3d723e5..363f283 100644 --- a/lcl/testdata/TestTrust/basics-unix.golden +++ b/lcl/testdata/TestTrust/basics-unix.golden @@ -36,7 +36,7 @@ # Manage CA Certificates in your Local Trust Store(s) `anchor lcl trust` | We'll check your local trust stores and make any needed updates. - Compared local and expected CA certificates: need to install 2 missing certificates. - * Updating Mock: installing oas-examples - AnchorCA ECDSA… ⠋ + * [1/2] Updating Mock: installing oas-examples - AnchorCA ECDSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Manage CA Certificates in your Local Trust Store(s) `anchor lcl trust` @@ -49,7 +49,7 @@ | We'll check your local trust stores and make any needed updates. - Compared local and expected CA certificates: need to install 2 missing certificates. - Updated Mock: installed oas-examples - AnchorCA [ECDSA] - * Updating Mock: installing oas-examples - AnchorCA RSA… ⠋ + * [2/2] Updating Mock: installing oas-examples - AnchorCA RSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Manage CA Certificates in your Local Trust Store(s) `anchor lcl trust` diff --git a/lcl/testdata/TestTrust/basics-windows.golden b/lcl/testdata/TestTrust/basics-windows.golden index ae16513..06fbff2 100644 --- a/lcl/testdata/TestTrust/basics-windows.golden +++ b/lcl/testdata/TestTrust/basics-windows.golden @@ -37,7 +37,7 @@ | We'll check your local trust stores and make any needed updates. - Compared local and expected CA certificates: need to install 2 missing certificates. | "oas-examples - AnchorCA" Thumbprint (sha1): BA470EAC 5067C499 99F3F5A1 ACE9E8CA 48E2731C - * Updating Mock: installing oas-examples - AnchorCA ECDSA… ⠋ + * [1/2] Updating Mock: installing oas-examples - AnchorCA ECDSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Manage CA Certificates in your Local Trust Store(s) `anchor lcl trust` @@ -51,7 +51,7 @@ - Compared local and expected CA certificates: need to install 2 missing certificates. - Updated Mock: installed oas-examples - AnchorCA [ECDSA] | "oas-examples - AnchorCA" Thumbprint (sha1): E1CE91B0 FC124890 24F7583B 8F0844EE 2291BE47 - * Updating Mock: installing oas-examples - AnchorCA RSA… ⠋ + * [2/2] Updating Mock: installing oas-examples - AnchorCA RSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Manage CA Certificates in your Local Trust Store(s) `anchor lcl trust` diff --git a/trust/models/trust.go b/trust/models/trust.go index 1bab54d..38ff6bc 100644 --- a/trust/models/trust.go +++ b/trust/models/trust.go @@ -68,8 +68,10 @@ func (m *TrustUpdateConfirm) View() string { type TrustUpdateStore struct { Config *cli.Config - Store truststore.Store + MissingCount int + Store truststore.Store + index int installing *truststore.CA installed map[string][]string commonNames []string @@ -78,6 +80,7 @@ type TrustUpdateStore struct { } func (m *TrustUpdateStore) Init() tea.Cmd { + m.index = 1 m.installed = make(map[string][]string) m.spinner = ui.WaitingSpinner() @@ -85,6 +88,10 @@ func (m *TrustUpdateStore) Init() tea.Cmd { } type ( + TrustStoreExistingCAMsg struct { + truststore.CA + } + TrustStoreInstallingCAMsg struct { truststore.CA } @@ -96,12 +103,16 @@ type ( func (m *TrustUpdateStore) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { + case TrustStoreExistingCAMsg: + m.index += 1 + return m, nil case TrustStoreInstallingCAMsg: m.installing = &msg.CA return m, nil case TrustStoreInstalledCAMsg: m.installing = nil m.installed[msg.CA.Subject.CommonName] = append(m.installed[msg.CA.Subject.CommonName], msg.CA.PublicKeyAlgorithm.String()) + m.index += 1 if !slices.Contains(m.commonNames, msg.CA.Subject.CommonName) { m.commonNames = append(m.commonNames, msg.CA.Subject.CommonName) @@ -145,7 +156,9 @@ func (m *TrustUpdateStore) View() string { ))) } - fmt.Fprintln(&b, ui.StepInProgress(fmt.Sprintf("Updating %s: installing %s %s… %s", + fmt.Fprintln(&b, ui.StepInProgress(fmt.Sprintf("[%d/%d] Updating %s: installing %s %s… %s", + m.index, + m.MissingCount, ui.Emphasize(m.Store.Description()), ui.Underline(m.installing.Subject.CommonName), ui.Whisper(m.installing.PublicKeyAlgorithm.String()), diff --git a/trust/testdata/TestTrust/basics-unix.golden b/trust/testdata/TestTrust/basics-unix.golden index 05795a2..eed1785 100644 --- a/trust/testdata/TestTrust/basics-unix.golden +++ b/trust/testdata/TestTrust/basics-unix.golden @@ -68,7 +68,7 @@ - Using org-slug, the only available organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Compared local and expected CA certificates: need to install 2 missing certificates. - * Updating Mock: installing oas-examples - AnchorCA ECDSA… ⠋ + * [1/2] Updating Mock: installing oas-examples - AnchorCA ECDSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Manage CA Certificates in your Local Trust Store(s) `anchor trust` @@ -85,7 +85,7 @@ - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Compared local and expected CA certificates: need to install 2 missing certificates. - Updated Mock: installed oas-examples - AnchorCA [ECDSA] - * Updating Mock: installing oas-examples - AnchorCA RSA… ⠋ + * [2/2] Updating Mock: installing oas-examples - AnchorCA RSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Manage CA Certificates in your Local Trust Store(s) `anchor trust` diff --git a/trust/testdata/TestTrust/basics-windows.golden b/trust/testdata/TestTrust/basics-windows.golden index eb3efa8..652341f 100644 --- a/trust/testdata/TestTrust/basics-windows.golden +++ b/trust/testdata/TestTrust/basics-windows.golden @@ -69,7 +69,7 @@ - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Compared local and expected CA certificates: need to install 2 missing certificates. | "oas-examples - AnchorCA" Thumbprint (sha1): BA470EAC 5067C499 99F3F5A1 ACE9E8CA 48E2731C - * Updating Mock: installing oas-examples - AnchorCA ECDSA… ⠋ + * [1/2] Updating Mock: installing oas-examples - AnchorCA ECDSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Manage CA Certificates in your Local Trust Store(s) `anchor trust` @@ -87,7 +87,7 @@ - Compared local and expected CA certificates: need to install 2 missing certificates. - Updated Mock: installed oas-examples - AnchorCA [ECDSA] | "oas-examples - AnchorCA" Thumbprint (sha1): E1CE91B0 FC124890 24F7583B 8F0844EE 2291BE47 - * Updating Mock: installing oas-examples - AnchorCA RSA… ⠋ + * [2/2] Updating Mock: installing oas-examples - AnchorCA RSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Manage CA Certificates in your Local Trust Store(s) `anchor trust` diff --git a/trust/testdata/TestTrust/wsl-vm.golden b/trust/testdata/TestTrust/wsl-vm.golden index 015bdbd..2915316 100644 --- a/trust/testdata/TestTrust/wsl-vm.golden +++ b/trust/testdata/TestTrust/wsl-vm.golden @@ -102,7 +102,7 @@ - Using org-slug, the only available organization. You can also use `--org org-slug`. - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Compared local and expected CA certificates: need to install 2 missing certificates. - * Updating Mock: installing oas-examples - AnchorCA ECDSA… ⠋ + * [1/2] Updating Mock: installing oas-examples - AnchorCA ECDSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Manage CA Certificates in your Local Trust Store(s) `anchor trust` @@ -125,7 +125,7 @@ - Using realm-slug, the only available realm. You can also use `--realm realm-slug`. - Compared local and expected CA certificates: need to install 2 missing certificates. - Updated Mock: installed oas-examples - AnchorCA [ECDSA] - * Updating Mock: installing oas-examples - AnchorCA RSA… ⠋ + * [2/2] Updating Mock: installing oas-examples - AnchorCA RSA… ⠋ ─── TrustUpdateStore ─────────────────────────────────────────────────────────── # Manage CA Certificates in your Local Trust Store(s) `anchor trust` diff --git a/trust/trust.go b/trust/trust.go index 13f3051..34ff084 100644 --- a/trust/trust.go +++ b/trust/trust.go @@ -114,11 +114,13 @@ func (c *Command) Perform(ctx context.Context, drv *ui.Driver) error { for _, store := range stores { drv.Activate(ctx, &models.TrustUpdateStore{ - Config: cfg, - Store: store, + Config: cfg, + MissingCount: len(auditInfo.Missing), + Store: store, }) for _, ca := range auditInfo.Missing { if auditInfo.IsPresent(ca, store) { + drv.Send(models.TrustStoreExistingCAMsg{CA: *ca}) continue } drv.Send(models.TrustStoreInstallingCAMsg{CA: *ca}) diff --git a/truststore/brew.go b/truststore/brew.go index 6fb634d..3d0236f 100644 --- a/truststore/brew.go +++ b/truststore/brew.go @@ -87,7 +87,7 @@ func (s *Brew) ListCAs() ([]*CA, error) { var cas []*CA for p, buf := pem.Decode(buf); p != nil; p, buf = pem.Decode(buf) { - cert, err := x509.ParseCertificate(p.Bytes) + cert, err := parseCertificate(p.Bytes) if err != nil { return nil, err } diff --git a/truststore/nss.go b/truststore/nss.go index 5f03c82..847635d 100644 --- a/truststore/nss.go +++ b/truststore/nss.go @@ -2,7 +2,6 @@ package truststore import ( "bytes" - "crypto/x509" "encoding/pem" "errors" "fmt" @@ -289,7 +288,7 @@ func (s *NSS) ListCAs() ([]*CA, error) { } for p, buf := pem.Decode(out); p != nil; p, buf = pem.Decode(buf) { - cert, err := x509.ParseCertificate(p.Bytes) + cert, err := parseCertificate(p.Bytes) if err != nil { return err } diff --git a/truststore/platform.go b/truststore/platform.go index 99ccfba..b0a85c5 100644 --- a/truststore/platform.go +++ b/truststore/platform.go @@ -1,10 +1,5 @@ package truststore -import ( - "crypto/x509" - "strings" -) - func (s *Platform) Check() (bool, error) { ok, err := s.check() if err != nil { @@ -95,20 +90,3 @@ func (s *Platform) UninstallCA(ca *CA) (uninstalled bool, err error) { return s.uninstallCA(ca) } - -func parseCertificate(der []byte) (*x509.Certificate, error) { - cert, err := x509.ParseCertificate(der) - if err != nil { - if strings.HasPrefix(err.Error(), "x509: certificate contains duplicate extension") { - return nil, nil - } - if strings.HasPrefix(err.Error(), "x509: inner and outer signature algorithm identifiers don't match") { - return nil, nil - } - if strings.HasPrefix(err.Error(), "x509: negative serial number") { - return nil, nil - } - return nil, err - } - return cert, nil -} diff --git a/truststore/platform_test.go b/truststore/platform_test.go index 5f596b2..9988c07 100644 --- a/truststore/platform_test.go +++ b/truststore/platform_test.go @@ -8,17 +8,6 @@ import ( "testing" ) -func TestParseCertificate(t *testing.T) { - cert, err := parseCertificate(validCA.Raw) - if err != nil { - t.Fatal(err) - } - if cert == nil { - t.Fatal("expect parse certificate with valid certificate to return certificate") - } - -} - func TestParseInvalidCerts(t *testing.T) { tests := []struct { name string diff --git a/truststore/truststore.go b/truststore/truststore.go index 448b68a..ef11755 100644 --- a/truststore/truststore.go +++ b/truststore/truststore.go @@ -60,3 +60,20 @@ func pathExists(sfs fs.StatFS, path string) bool { _, err := sfs.Stat(strings.Trim(path, string(os.PathSeparator))) return err == nil } + +func parseCertificate(der []byte) (*x509.Certificate, error) { + cert, err := x509.ParseCertificate(der) + if err != nil { + if strings.HasPrefix(err.Error(), "x509: certificate contains duplicate extension") { + return nil, nil + } + if strings.HasPrefix(err.Error(), "x509: inner and outer signature algorithm identifiers don't match") { + return nil, nil + } + if strings.HasPrefix(err.Error(), "x509: negative serial number") { + return nil, nil + } + return nil, err + } + return cert, nil +} diff --git a/truststore/truststore_test.go b/truststore/truststore_test.go index 501434e..6846061 100644 --- a/truststore/truststore_test.go +++ b/truststore/truststore_test.go @@ -15,6 +15,16 @@ import ( _ "github.com/anchordotdev/cli/testflags" ) +func TestParseCertificate(t *testing.T) { + cert, err := parseCertificate(validCA.Raw) + if err != nil { + t.Fatal(err) + } + if cert == nil { + t.Fatal("expect parse certificate with valid certificate to return certificate") + } +} + func testStore(t *testing.T, store Store) { if ok, err := store.Check(); err != nil { t.Fatal(err)