From fec62aa78ef64c8e3d9b3f38f3377040f20748a4 Mon Sep 17 00:00:00 2001 From: Andriy Knysh Date: Wed, 21 Aug 2024 23:38:07 -0400 Subject: [PATCH] Update Atmos UX (#679) * updates * updates * updates * updates * updates * updates --- cmd/cmd_utils.go | 23 ++++--- examples/quick-start-advanced/Dockerfile | 4 +- go.mod | 13 ++-- go.sum | 28 ++++----- internal/exec/atmos.go | 3 +- internal/tui/atmos/column.go | 4 +- internal/tui/workflow/column.go | 4 +- pkg/config/config.go | 1 + pkg/logger/logger.go | 3 +- pkg/logger/logger_test.go | 3 +- pkg/pro/api_client.go | 2 +- pkg/pro/api_client_test.go | 3 +- pkg/schema/schema.go | 1 + website/docs/integrations/atlantis.mdx | 2 +- .../github-actions/setup-atmos.mdx | 2 +- website/package-lock.json | 60 +++++++++---------- website/package.json | 6 +- 17 files changed, 84 insertions(+), 78 deletions(-) diff --git a/cmd/cmd_utils.go b/cmd/cmd_utils.go index 2987e2d3d..5504a3cf7 100644 --- a/cmd/cmd_utils.go +++ b/cmd/cmd_utils.go @@ -348,15 +348,22 @@ func printMessageForMissingAtmosConfig(cliConfig schema.CliConfiguration) { u.LogErrorAndExit(err) } - fmt.Print("Atmos CLI config ") - u.PrintMessageInColor("stacks.base_path ", c1) - fmt.Print("points to the ") - u.PrintMessageInColor(path.Join(cliConfig.BasePath, cliConfig.Stacks.BasePath), c1) - fmt.Println(" directory.") - - u.PrintMessage("The directory does not exist or has no Atmos stack configurations.\n") + if cliConfig.Default { + // If Atmos did not find an `atmos.yaml` config file and is using the default config + u.PrintMessageInColor("atmos.yaml", c1) + fmt.Println(" CLI config file was not found.") + fmt.Print("\nThe default Atmos stacks directory is set to ") + u.PrintMessageInColor(path.Join(cliConfig.BasePath, cliConfig.Stacks.BasePath), c1) + fmt.Println(",\nbut the directory does not exist in the current path.") + } else { + // If Atmos found an `atmos.yaml` config file, but it defines invalid paths to Atmos stacks and components + u.PrintMessageInColor("atmos.yaml", c1) + fmt.Print(" CLI config file specifies the directory for Atmos stacks as ") + u.PrintMessageInColor(path.Join(cliConfig.BasePath, cliConfig.Stacks.BasePath), c1) + fmt.Println(",\nbut the directory does not exist.") + } - u.PrintMessage("To configure and start using Atmos, refer to the following documents:\n") + u.PrintMessage("\nTo configure and start using Atmos, refer to the following documents:\n") u.PrintMessageInColor("Atmos CLI Configuration:\n", c2) u.PrintMessage("https://atmos.tools/cli/configuration\n") diff --git a/examples/quick-start-advanced/Dockerfile b/examples/quick-start-advanced/Dockerfile index cc81ab67f..387316ccd 100644 --- a/examples/quick-start-advanced/Dockerfile +++ b/examples/quick-start-advanced/Dockerfile @@ -6,10 +6,10 @@ ARG GEODESIC_OS=debian # https://atmos.tools/ # https://github.com/cloudposse/atmos # https://github.com/cloudposse/atmos/releases -ARG ATMOS_VERSION=1.86.2 +ARG ATMOS_VERSION=1.87.0 # Terraform: https://github.com/hashicorp/terraform/releases -ARG TF_VERSION=1.9.4 +ARG TF_VERSION=1.9.5 FROM cloudposse/geodesic:${GEODESIC_VERSION}-${GEODESIC_OS} diff --git a/go.mod b/go.mod index 1a8bbfa45..74e9e16d6 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,14 @@ module github.com/cloudposse/atmos go 1.23 require ( - dario.cat/mergo v1.0.0 + dario.cat/mergo v1.0.1 github.com/Masterminds/sprig/v3 v3.2.3 github.com/alecthomas/chroma v0.10.0 github.com/arsham/figurine v1.3.0 github.com/bmatcuk/doublestar/v4 v4.6.1 - github.com/charmbracelet/bubbles v0.18.0 + github.com/charmbracelet/bubbles v0.19.0 github.com/charmbracelet/bubbletea v0.27.0 - github.com/charmbracelet/lipgloss v0.12.1 + github.com/charmbracelet/lipgloss v0.13.0 github.com/elewis787/boa v0.1.2 github.com/fatih/color v1.17.0 github.com/go-git/go-git/v5 v5.12.0 @@ -27,7 +27,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/jwalton/go-supportscolor v1.2.0 github.com/kubescape/go-git-url v0.0.30 - github.com/lrstanley/bubblezone v0.0.0-20240817020358-d328142f33b6 + github.com/lrstanley/bubblezone v0.0.0-20240820044643-3964e2111228 github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/mapstructure v1.5.0 github.com/open-policy-agent/opa v0.67.1 @@ -169,7 +169,7 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.0 // indirect @@ -179,7 +179,6 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect - github.com/muesli/reflow v0.3.0 // indirect github.com/muesli/termenv v0.15.2 // indirect github.com/oklog/run v1.1.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -198,7 +197,7 @@ require ( github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f // indirect + github.com/sahilm/fuzzy v0.1.1 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect diff --git a/go.sum b/go.sum index 10b7335e5..597ebffb8 100644 --- a/go.sum +++ b/go.sum @@ -200,8 +200,8 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS contrib.go.opencensus.io/exporter/aws v0.0.0-20200617204711-c478e41e60e9/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= contrib.go.opencensus.io/exporter/stackdriver v0.13.10/go.mod h1:I5htMbyta491eUxufwwZPQdcKvvgzMB4O9ni41YnIM8= contrib.go.opencensus.io/integrations/ocsql v0.1.7/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= -dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= -dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= @@ -383,12 +383,12 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chainguard-dev/git-urls v1.0.2 h1:pSpT7ifrpc5X55n4aTTm7FFUE+ZQHKiqpiwNkJrVcKQ= github.com/chainguard-dev/git-urls v1.0.2/go.mod h1:rbGgj10OS7UgZlbzdUQIQpT0k/D4+An04HJY7Ol+Y/o= -github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= -github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw= +github.com/charmbracelet/bubbles v0.19.0 h1:gKZkKXPP6GlDk6EcfujDK19PCQqRjaJZQ7QRERx1UF0= +github.com/charmbracelet/bubbles v0.19.0/go.mod h1:WILteEqZ+krG5c3ntGEMeG99nCupcuIk7V0/zOP0tOA= github.com/charmbracelet/bubbletea v0.27.0 h1:Mznj+vvYuYagD9Pn2mY7fuelGvP0HAXtZYGgRBCbHvU= github.com/charmbracelet/bubbletea v0.27.0/go.mod h1:5MdP9XH6MbQkgGhnlxUqCNmBXf9I74KRQ8HIidRxV1Y= -github.com/charmbracelet/lipgloss v0.12.1 h1:/gmzszl+pedQpjCOH+wFkZr/N90Snz40J/NR7A0zQcs= -github.com/charmbracelet/lipgloss v0.12.1/go.mod h1:V2CiwIuhx9S1S1ZlADfOj9HmxeMAORuz5izHb0zGbB8= +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.1.4 h1:IEU3D6+dWwPSgZ6HBH+v6oUuZ/nVawMiWj5831KfiLM= github.com/charmbracelet/x/ansi v0.1.4/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= github.com/charmbracelet/x/input v0.1.2 h1:QJAZr33eOhDowkkEQ24rsJy4Llxlm+fRDf/cQrmqJa0= @@ -922,8 +922,8 @@ github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lrstanley/bubblezone v0.0.0-20240817020358-d328142f33b6 h1:coWht02TW9iOIozHexiFxJQAw5LoTCl7FYBe/araEOM= -github.com/lrstanley/bubblezone v0.0.0-20240817020358-d328142f33b6/go.mod h1:fMHACHXouhQO+NLAFvHEeKdVSzG7L/O1khqsvswCTmk= +github.com/lrstanley/bubblezone v0.0.0-20240820044643-3964e2111228 h1:XYsJHGSdg54uDr465T4Ta1yDIE9TfxPHE9GXN52zmfw= +github.com/lrstanley/bubblezone v0.0.0-20240820044643-3964e2111228/go.mod h1:zfTU1cXexU7r0A0YgjxjoT6ZXPFHQeD4EebE2Nb0uq0= 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/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -954,9 +954,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= -github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= @@ -1000,8 +999,6 @@ github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= -github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= -github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -1062,7 +1059,6 @@ github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 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= @@ -1087,8 +1083,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f h1:MvTmaQdww/z0Q4wrYjDSCcZ78NoftLQyHBSLW/Cx79Y= -github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= +github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA= +github.com/sahilm/fuzzy v0.1.1/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/samber/lo v1.47.0 h1:z7RynLwP5nbyRscyvcD043DWYoOcYRv3mV8lBeqOCLc= github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= diff --git a/internal/exec/atmos.go b/internal/exec/atmos.go index 477ce4029..7a9f543d3 100644 --- a/internal/exec/atmos.go +++ b/internal/exec/atmos.go @@ -40,7 +40,8 @@ func ExecuteAtmosCmd() error { } // Get a map of stacks and components in the stacks - stacksMap, err := ExecuteDescribeStacks(cliConfig, "", nil, nil, nil, false, true) + // Don't process `Go` templates in Atmos stack manifests since we just need to display the stack and component names in the TUI + stacksMap, err := ExecuteDescribeStacks(cliConfig, "", nil, nil, nil, false, false) if err != nil { return err } diff --git a/internal/tui/atmos/column.go b/internal/tui/atmos/column.go index f20b506c2..59cc80611 100644 --- a/internal/tui/atmos/column.go +++ b/internal/tui/atmos/column.go @@ -72,9 +72,9 @@ func (c *columnView) getStyle() lipgloss.Style { s := lipgloss.NewStyle().Padding(1, 2).Height(c.height).Width(c.width) if c.Focused() { - s.Border(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color("62")) + s = s.Border(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color("62")) } else { - s.Border(lipgloss.HiddenBorder()) + s = s.Border(lipgloss.HiddenBorder()) } return s diff --git a/internal/tui/workflow/column.go b/internal/tui/workflow/column.go index 3e6b89b68..2f5094f2b 100644 --- a/internal/tui/workflow/column.go +++ b/internal/tui/workflow/column.go @@ -142,9 +142,9 @@ func (c *columnView) getStyle() lipgloss.Style { s := lipgloss.NewStyle().Padding(0).Margin(2).Height(c.height).Width(c.width) if c.Focused() { - s.Border(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color("62")) + s = s.Border(lipgloss.RoundedBorder()).BorderForeground(lipgloss.Color("62")) } else { - s.Border(lipgloss.HiddenBorder()) + s = s.Border(lipgloss.HiddenBorder()) } return s diff --git a/pkg/config/config.go b/pkg/config/config.go index 93f89eb21..60e8f38cf 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -25,6 +25,7 @@ var ( "https://raw.githubusercontent.com/cloudposse/atmos/main/examples/quick-start-advanced/atmos.yaml") defaultCliConfig = schema.CliConfiguration{ + Default: true, BasePath: ".", Stacks: schema.Stacks{ BasePath: "stacks", diff --git a/pkg/logger/logger.go b/pkg/logger/logger.go index 4b539aa46..971ba18f8 100644 --- a/pkg/logger/logger.go +++ b/pkg/logger/logger.go @@ -4,8 +4,9 @@ import ( "fmt" "os" - "github.com/cloudposse/atmos/pkg/schema" "github.com/fatih/color" + + "github.com/cloudposse/atmos/pkg/schema" ) type LogLevel string diff --git a/pkg/logger/logger_test.go b/pkg/logger/logger_test.go index a5b84927e..3904a41fc 100644 --- a/pkg/logger/logger_test.go +++ b/pkg/logger/logger_test.go @@ -7,9 +7,10 @@ import ( "os" "testing" - "github.com/cloudposse/atmos/pkg/schema" "github.com/fatih/color" "github.com/stretchr/testify/assert" + + "github.com/cloudposse/atmos/pkg/schema" ) func captureOutput(f func()) string { diff --git a/pkg/pro/api_client.go b/pkg/pro/api_client.go index 3ff4d12fe..ee6afee31 100644 --- a/pkg/pro/api_client.go +++ b/pkg/pro/api_client.go @@ -33,7 +33,7 @@ func NewAtmosProAPIClient(logger *logger.Logger, baseURL, baseAPIEndpoint, apiTo } } -// NewAtmosProAPIClientFromEnv creates a new AtmosProAPIClient from environment variables +// NewAtmosProAPIClientFromEnv creates a new AtmosProAPIClient from environment variables func NewAtmosProAPIClientFromEnv(logger *logger.Logger) (*AtmosProAPIClient, error) { baseURL := os.Getenv(cfg.AtmosProBaseUrlEnvVarName) if baseURL == "" { diff --git a/pkg/pro/api_client_test.go b/pkg/pro/api_client_test.go index 08126b2e8..24d0b05a4 100644 --- a/pkg/pro/api_client_test.go +++ b/pkg/pro/api_client_test.go @@ -6,9 +6,10 @@ import ( "net/http" "testing" - "github.com/cloudposse/atmos/pkg/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + + "github.com/cloudposse/atmos/pkg/logger" ) // MockRoundTripper is an implementation of http.RoundTripper for testing purposes. diff --git a/pkg/schema/schema.go b/pkg/schema/schema.go index b7385f948..821cd3c89 100644 --- a/pkg/schema/schema.go +++ b/pkg/schema/schema.go @@ -22,6 +22,7 @@ type CliConfiguration struct { StackConfigFilesRelativePaths []string `yaml:"stackConfigFilesRelativePaths,omitempty" json:"stackConfigFilesRelativePaths,omitempty" mapstructure:"stackConfigFilesRelativePaths"` StackConfigFilesAbsolutePaths []string `yaml:"stackConfigFilesAbsolutePaths,omitempty" json:"stackConfigFilesAbsolutePaths,omitempty" mapstructure:"stackConfigFilesAbsolutePaths"` StackType string `yaml:"stackType,omitempty" json:"StackType,omitempty" mapstructure:"stackType"` + Default bool `yaml:"default" json:"default" mapstructure:"default"` } type CliSettings struct { diff --git a/website/docs/integrations/atlantis.mdx b/website/docs/integrations/atlantis.mdx index 18797f5d6..ff63e1c97 100644 --- a/website/docs/integrations/atlantis.mdx +++ b/website/docs/integrations/atlantis.mdx @@ -673,7 +673,7 @@ on: branches: [ main ] env: - ATMOS_VERSION: 1.86.2 + ATMOS_VERSION: 1.87.0 ATMOS_CLI_CONFIG_PATH: ./ jobs: diff --git a/website/docs/integrations/github-actions/setup-atmos.mdx b/website/docs/integrations/github-actions/setup-atmos.mdx index ecef22edb..167129959 100644 --- a/website/docs/integrations/github-actions/setup-atmos.mdx +++ b/website/docs/integrations/github-actions/setup-atmos.mdx @@ -33,6 +33,6 @@ jobs: uses: cloudposse/github-action-setup-atmos with: # Make sure to pin to the latest version of atmos - atmos_version: 1.86.2 + atmos_version: 1.87.0 ``` diff --git a/website/package-lock.json b/website/package-lock.json index 11654ec58..99ddf1d13 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -13,7 +13,7 @@ "@docusaurus/plugin-client-redirects": "^3.5.2", "@docusaurus/plugin-google-tag-manager": "^3.5.2", "@docusaurus/preset-classic": "^3.5.2", - "@docusaurus/theme-mermaid": "^3.5.1", + "@docusaurus/theme-mermaid": "^3.5.2", "@excalidraw/excalidraw": "^0.17.6", "@fortawesome/fontawesome-svg-core": "^6.6.0", "@fortawesome/free-brands-svg-icons": "^6.6.0", @@ -30,7 +30,7 @@ "marked": "^14.0.0", "node-fetch": "^3.3.2", "posthog-docusaurus": "^2.0.1", - "posthog-js": "^1.155.0", + "posthog-js": "^1.157.2", "prism-react-renderer": "^2.3.1", "raw-loader": "^4.0.2", "react": "^18.3.1", @@ -45,7 +45,7 @@ "unified": "^11.0.5" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.5.1" + "@docusaurus/module-type-aliases": "^3.5.2" }, "engines": { "node": ">=20.10" @@ -186,9 +186,9 @@ } }, "node_modules/@algolia/client-common": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.1.1.tgz", - "integrity": "sha512-jkQNQbGY+XQB3Eln7wqqdUZKBzG8lETcsaUk5gcMc6iIwyN/qW0v0fhpKPH+Kli+BImLxo0CWk12CvVvx2exWA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.1.0.tgz", + "integrity": "sha512-/PUtnEKpI9opioNfVKA5cBGQr0yulE3OWJCf9xWjJRFn+CvTAWkIecBWF9R+GpxeoaTqf3lWqDwYt8zEBXU11Q==", "license": "MIT", "peer": true, "engines": { @@ -217,15 +217,15 @@ } }, "node_modules/@algolia/client-search": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.1.1.tgz", - "integrity": "sha512-SFpb3FI/VouGou/vpuS7qeCA5Y/KpV42P6CEA/1MZQtl/xJkl6PVjikb+Q9YadeHi2jtDV/aQ6PyiVDnX4PQcw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.1.0.tgz", + "integrity": "sha512-zPMO+iX+PnrQAX2tzW7ViletvkDNqLG1CI0k+9wXZtyVuQrPI6pxho/mANlC9QHmiMH3eR2KibQCOBMifOd61w==", "license": "MIT", "peer": true, "dependencies": { - "@algolia/client-common": "5.1.1", - "@algolia/requester-browser-xhr": "5.1.1", - "@algolia/requester-node-http": "5.1.1" + "@algolia/client-common": "5.1.0", + "@algolia/requester-browser-xhr": "5.1.0", + "@algolia/requester-node-http": "5.1.0" }, "engines": { "node": ">= 14.0.0" @@ -311,13 +311,13 @@ } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.1.1.tgz", - "integrity": "sha512-NXmN1ujJCj5GlJQaMK6DbdiXdcf6nhRef/X40lu9TYi71q9xTo/5RPMI0K2iOp6g07S26BrXFOz6RSV3Ny4LLw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.1.0.tgz", + "integrity": "sha512-q2HpJBxVnvmk9UfphzjGgYSKDX/qXeuPmKlybYAX1dZ1/b8LBOt066JjS5L9CXuxW26Igi/PrdbzA9tL8jD3QQ==", "license": "MIT", "peer": true, "dependencies": { - "@algolia/client-common": "5.1.1" + "@algolia/client-common": "5.1.0" }, "engines": { "node": ">= 14.0.0" @@ -330,13 +330,13 @@ "license": "MIT" }, "node_modules/@algolia/requester-node-http": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.1.1.tgz", - "integrity": "sha512-xwrgnNTIzgxDEx6zuCKSKTPzQLA8fL/WZiVB6fRpIu5agLMjoAi0cWA5YSDbo+2FFxqVgLqKY/Jz6mKmWtY15Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.1.0.tgz", + "integrity": "sha512-P51ZDjoswq6OLVY+vES+EekkC0OPABKrJ9s4S1UKNTvggDIn38BoM9L25K7TEWEmjCG68EKDGSPUAt1q/dS0Uw==", "license": "MIT", "peer": true, "dependencies": { - "@algolia/client-common": "5.1.1" + "@algolia/client-common": "5.1.0" }, "engines": { "node": ">= 14.0.0" @@ -13649,9 +13649,9 @@ } }, "node_modules/posthog-js": { - "version": "1.155.0", - "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.155.0.tgz", - "integrity": "sha512-gxi72Qcp7Vnq6efe5gNxsq84zyEFd33NUmoLSgcbMPhxU30qgc89Aw/N2mRB4mGrD3Mq0rCnDJUzGFdN59nR0g==", + "version": "1.157.2", + "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.157.2.tgz", + "integrity": "sha512-ATYKGs+Q51u26nHHhrhWNh1whqFm7j/rwQQYw+y6/YzNmRlo+YsqrGZji9nqXb9/4fo0ModDr+ZmuOI3hKkUXA==", "license": "MIT", "dependencies": { "fflate": "^0.4.8", @@ -17316,10 +17316,9 @@ } }, "node_modules/webpack-dev-server/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "license": "MIT", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", + "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", "engines": { "node": ">=10.0.0" }, @@ -17561,10 +17560,9 @@ } }, "node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "license": "MIT", + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "engines": { "node": ">=8.3.0" }, diff --git a/website/package.json b/website/package.json index ebfb17c14..bdb2a9b7a 100644 --- a/website/package.json +++ b/website/package.json @@ -19,7 +19,7 @@ "@docusaurus/plugin-client-redirects": "^3.5.2", "@docusaurus/plugin-google-tag-manager": "^3.5.2", "@docusaurus/preset-classic": "^3.5.2", - "@docusaurus/theme-mermaid": "^3.5.1", + "@docusaurus/theme-mermaid": "^3.5.2", "@excalidraw/excalidraw": "^0.17.6", "@fortawesome/fontawesome-svg-core": "^6.6.0", "@fortawesome/free-brands-svg-icons": "^6.6.0", @@ -36,7 +36,7 @@ "marked": "^14.0.0", "node-fetch": "^3.3.2", "posthog-docusaurus": "^2.0.1", - "posthog-js": "^1.155.0", + "posthog-js": "^1.157.2", "prism-react-renderer": "^2.3.1", "raw-loader": "^4.0.2", "react": "^18.3.1", @@ -51,7 +51,7 @@ "unified": "^11.0.5" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.5.1" + "@docusaurus/module-type-aliases": "^3.5.2" }, "browserslist": { "production": [