From 7226c941d5922fe6ddaa487cc37e7aba7e14d539 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 17 Jun 2022 08:11:47 +0000 Subject: [PATCH 001/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 5907f9ec..120d4fa5 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -736,7 +736,7 @@ var Commands = []*console.Command{ {Name: "cloud:environment:deactivate"}, {Name: "environment:deactivate", Hidden: true}, }, - Usage: "Delete an environment", + Usage: "Delete one or more environments", Flags: []console.Flag{ &console.BoolFlag{Name: "delete-branch",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -747,6 +747,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "merged",}, &console.BoolFlag{Name: "no-delete-branch",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, + &console.StringFlag{Name: "only-type", Aliases: []string{"t"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "type",}, &console.BoolFlag{Name: "wait",}, From 0b8e9543c2f41946a237fff96ce6c1e45d71d9c2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Jun 2022 08:12:49 +0000 Subject: [PATCH 002/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index b9309f0b..9200e912 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -146,7 +146,7 @@ var availableServices = []*service{ Type: "influxdb", Versions: serviceVersions{ Deprecated: []string{}, - Supported: []string{"1.2", "1.3", "1.7", "1.8"}, + Supported: []string{"1.2", "1.3", "1.7", "1.8", "2.2"}, }, }, { @@ -160,7 +160,7 @@ var availableServices = []*service{ Type: "mariadb", Versions: serviceVersions{ Deprecated: []string{"5.5"}, - Supported: []string{"10.0", "10.1", "10.2", "10.3", "10.4", "10.5"}, + Supported: []string{"10.0", "10.1", "10.2", "10.3", "10.4", "10.5", "10.6"}, }, }, { @@ -188,7 +188,7 @@ var availableServices = []*service{ Type: "mysql", Versions: serviceVersions{ Deprecated: []string{"5.5"}, - Supported: []string{"10.0", "10.1", "10.2", "10.3", "10.4", "10.5"}, + Supported: []string{"10.0", "10.1", "10.2", "10.3", "10.4", "10.5", "10.6"}, }, }, { @@ -237,7 +237,7 @@ var availableServices = []*service{ Type: "solr", Versions: serviceVersions{ Deprecated: []string{"3.6", "4.10", "6.3", "6.6", "7.6"}, - Supported: []string{"7.7", "8.0", "8.4", "8.6"}, + Supported: []string{"7.7", "8.0", "8.4", "8.6", "8.11"}, }, }, { From 43710aee1756e5b3218c0e262442d6a604472837 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 12:17:35 +0000 Subject: [PATCH 003/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 9200e912..d10468f1 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -202,7 +202,7 @@ var availableServices = []*service{ Type: "opensearch", Versions: serviceVersions{ Deprecated: []string{}, - Supported: []string{"1.1", "1.2"}, + Supported: []string{"1.1", "1.2", "2.0"}, }, }, { From 35035d306b165e60236d841530a6fe0a9059cbbe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 16:13:42 +0000 Subject: [PATCH 004/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index d10468f1..6de95a93 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -132,7 +132,7 @@ var availableServices = []*service{ Type: "chrome-headless", Versions: serviceVersions{ Deprecated: []string{}, - Supported: []string{"73", "80", "81", "83", "84", "86", "91"}, + Supported: []string{"73", "80", "81", "83", "84", "86", "91", "95"}, }, }, { From 77e4e0f1775da4bbff2a5ff6a712c009f190e922 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 7 Jul 2022 09:26:56 -0400 Subject: [PATCH 005/466] Append a trailing slash to Elasticsearch URL, fix #154 --- envs/docker.go | 1 + envs/envs.go | 9 +++++++- envs/envs_test.go | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 1 deletion(-) diff --git a/envs/docker.go b/envs/docker.go index 94048ed5..a94edbe9 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -375,6 +375,7 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ "host": host, "ip": host, "port": formatDockerPort(p.PublicPort), + "path": "/", "rel": "elasticsearch", "scheme": "http", } diff --git a/envs/envs.go b/envs/envs.go index 50e99240..e12b2d57 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -211,7 +211,11 @@ func extractRelationshipsEnvs(env Environment) Envs { values[fmt.Sprintf("%sNAME", prefix)] = endpoint["path"].(string) values[fmt.Sprintf("%sDATABASE", prefix)] = endpoint["path"].(string) } else if rel == "elasticsearch" { - values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s", endpoint["scheme"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) + path, hasPath := endpoint["path"] + if !hasPath || path == nil { + path = "" + } + values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s%s", endpoint["scheme"].(string), endpoint["host"].(string), formatInt(endpoint["port"]), path) values[fmt.Sprintf("%sHOST", prefix)] = endpoint["host"].(string) values[fmt.Sprintf("%sPORT", prefix)] = formatInt(endpoint["port"]) values[fmt.Sprintf("%sSCHEME", prefix)] = endpoint["scheme"].(string) @@ -318,6 +322,9 @@ func formatInt(val interface{}) string { if s, ok := val.(string); ok { return s } + if i, ok := val.(int); ok { + return strconv.Itoa(i) + } return strconv.FormatInt(int64(val.(float64)), 10) } diff --git a/envs/envs_test.go b/envs/envs_test.go index 3edaf3b5..0694dd44 100644 --- a/envs/envs_test.go +++ b/envs/envs_test.go @@ -37,3 +37,60 @@ func (s *ScenvSuite) TestAppID(c *C) { c.Assert(appID("testdata/project_without_composer"), Equals, "") c.Assert(appID("testdata/project_with_borked_composer"), Equals, "") } + +type fakeEnv struct { + Rels Relationships +} + +func (f fakeEnv) Path() string { + return "/dev/null" +} + +func (f fakeEnv) Mailer() Envs { + return nil +} + +func (f fakeEnv) Language() string { + return "php" +} + +func (f fakeEnv) Relationships() Relationships { + return f.Rels +} + +func (f fakeEnv) Extra() Envs { + return nil +} + +func (f fakeEnv) Local() bool { + return true +} + +func (s *ScenvSuite) TestElasticsearchURLEndsWithTrailingSlash(c *C) { + env := fakeEnv{ + Rels: map[string][]map[string]interface{}{ + "elasticsearch": { + map[string]interface{}{ + "host": "localhost", + "ip": "localhost", + "port": 9200, + "path": "/", + "rel": "elasticsearch", + "scheme": "http", + }, + }, + }, + } + + rels := extractRelationshipsEnvs(env) + c.Assert(rels["ELASTICSEARCH_URL"], Equals, "http://localhost:9200/") + + // We want to stay backward compatible with Platform.sh/SymfonyCloud + env.Rels["elasticsearch"][0]["path"] = nil + rels = extractRelationshipsEnvs(env) + c.Assert(rels["ELASTICSEARCH_URL"], Equals, "http://localhost:9200") + + delete(env.Rels["elasticsearch"][0], "path") + rels = extractRelationshipsEnvs(env) + c.Assert(rels["ELASTICSEARCH_URL"], Equals, "http://localhost:9200") +} From 1dc46f1ffcbb08efaf4e12ae8b67bd7e6e4ad463 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 12 Jun 2022 21:59:56 +0200 Subject: [PATCH 006/466] Fix typo --- .github/workflows/releaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 4f44ae49..251f65c7 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -115,5 +115,5 @@ jobs: cloudsmith push rpm symfony/stable/any-distro/any-version $filename done for filename in dist/*.apk; do - cloudsmith push alpine symfony/stable/any-distro/any-version $filename + cloudsmith push alpine symfony/stable/alpine/any-version $filename done From 229591fac9a4a5ac15d705740ed3eae43d70ec70 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 7 Jul 2022 19:10:36 +0200 Subject: [PATCH 007/466] Bump deps --- go.mod | 48 +++++----- go.sum | 286 ++++++++++----------------------------------------------- 2 files changed, 72 insertions(+), 262 deletions(-) diff --git a/go.mod b/go.mod index 15088f05..54e83612 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,12 @@ module github.com/symfony-cli/symfony-cli require ( - github.com/compose-spec/compose-go v1.2.4 - github.com/docker/docker v20.10.14+incompatible - github.com/elazarl/goproxy v0.0.0-20220417044921-416226498f94 - github.com/fabpot/local-php-security-checker/v2 v2.0.3 + github.com/compose-spec/compose-go v1.2.8 + github.com/docker/docker v20.10.17+incompatible + github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021 + github.com/fabpot/local-php-security-checker/v2 v2.0.4 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 - github.com/hashicorp/go-version v1.4.0 + github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru v0.5.4 github.com/hpcloud/tail v1.0.0 github.com/joho/godotenv v1.4.0 @@ -14,35 +14,33 @@ require ( github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 github.com/rs/xid v1.4.0 - github.com/rs/zerolog v1.26.1 + github.com/rs/zerolog v1.27.0 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 - github.com/spf13/viper v1.11.0 + github.com/spf13/viper v1.12.0 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.1 github.com/symfony-cli/console v1.0.2 github.com/symfony-cli/phpstore v1.0.5 - github.com/symfony-cli/terminal v1.0.3 + github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c + golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/containerd/containerd v1.6.3 // indirect - github.com/distribution/distribution/v3 v3.0.0-20220427074907-edf5aa3c399f // indirect + github.com/distribution/distribution/v3 v3.0.0-20220702071910-8857a1948739 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/btree v1.0.1 // indirect + github.com/google/btree v1.1.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/imdario/mergo v0.3.13 // indirect github.com/kr/pretty v0.3.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/magiconair/properties v1.8.6 // indirect @@ -56,31 +54,29 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.0 // indirect + github.com/pelletier/go-toml/v2 v2.0.2 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/afero v1.8.2 // indirect - github.com/spf13/cast v1.4.1 // indirect + github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.2.0 // indirect + github.com/subosito/gotenv v1.4.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect - golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32 // indirect - golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect + golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect + golang.org/x/net v0.0.0-20220706163947-c90051bbdb60 // indirect + golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e // indirect + golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect golang.org/x/text v0.3.7 // indirect - google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e // indirect - google.golang.org/grpc v1.46.0 // indirect - google.golang.org/protobuf v1.28.0 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect - gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.0 // indirect software.sslmate.com/src/go-pkcs12 v0.2.0 // indirect ) diff --git a/go.sum b/go.sum index 801ee202..6d383757 100644 --- a/go.sum +++ b/go.sum @@ -36,39 +36,13 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v56.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.24/go.mod h1:G6kyRlFnTuSbEYkQGawPfsCswgme4iYf6rfSKUDzbCc= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aws/aws-sdk-go v1.43.16/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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= @@ -76,46 +50,26 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/compose-spec/compose-go v1.2.4 h1:nzTFqM8+2J7Veao5Pq5U451thinv3U1wChIvcjX59/A= -github.com/compose-spec/compose-go v1.2.4/go.mod h1:pAy7Mikpeft4pxkFU565/DRHEbDfR84G6AQuiL+Hdg8= -github.com/containerd/containerd v1.6.3 h1:JfgUEIAH07xDWk6kqz0P3ArZt+KJ9YeihSC9uyFtSKg= -github.com/containerd/containerd v1.6.3/go.mod h1:gCVGrYRYFm2E8GmuUIbj/NGD7DLZQLzSJQazjVKDOig= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/compose-spec/compose-go v1.2.8 h1:ImPy82xn+rJKL5xmgEyesZEfqJmrzJ1WuZSHEhxMEFI= +github.com/compose-spec/compose-go v1.2.8/go.mod h1:813WrDd7NtOl9ZVqswlJ5iCQy3lxI3KYxKkY8EeHQ7w= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/distribution/distribution/v3 v3.0.0-20220427074907-edf5aa3c399f h1:J0z4EUo8YMjvTSQm0OHRkV9Bdwm3gQZu4KlyjvfpxE8= -github.com/distribution/distribution/v3 v3.0.0-20220427074907-edf5aa3c399f/go.mod h1:qLi7jGj1b5TUaYTB3ekkHiocxHJi8+3CFhXM54MGKBs= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/distribution/distribution/v3 v3.0.0-20220702071910-8857a1948739 h1:fOBqIwS8s+ircSm/N6VQcIZPaFoomoAWgxwG2Ssp15I= +github.com/distribution/distribution/v3 v3.0.0-20220702071910-8857a1948739/go.mod h1:28YO/VJk9/64+sTGNuYaBjWxrXTPrj0C0XmgTIOjxX4= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.14+incompatible h1:+T9/PRYWNDo5SZl5qS1r9Mo/0Q8AwxKKPtu9S1yxM0w= -github.com/docker/docker v20.10.14+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/elazarl/goproxy v0.0.0-20220417044921-416226498f94 h1:VIy7cdK7ufs7ctpTFkXJHm1uP3dJSnCGSPysEICB1so= -github.com/elazarl/goproxy v0.0.0-20220417044921-416226498f94/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021 h1:EbF0UihnxWRcIMOwoVtqnAylsqcjzqpSvMdjF2Ud4rA= +github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -123,35 +77,21 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fabpot/local-php-security-checker/v2 v2.0.3 h1:VSwl7Lz3M+8sSKkDbvEi0dtMPCMhHct8EeS7MPzetys= -github.com/fabpot/local-php-security-checker/v2 v2.0.3/go.mod h1:YOYs9Zbva+kkuQB8EjBj+lgdgf5+CkyT4xfc3mP1oLc= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fabpot/local-php-security-checker/v2 v2.0.4 h1:pCP5LPW+6jTXvtaLef07x6W8NLo6tuSih616mQ9I3PA= +github.com/fabpot/local-php-security-checker/v2 v2.0.4/go.mod h1:YOYs9Zbva+kkuQB8EjBj+lgdgf5+CkyT4xfc3mP1oLc= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 h1:R2K7yLHPmwoTdmNuQ5Wfm0/evh/+QFdoI6EbW3OSMKw= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76/go.mod h1:jr1MMO0KsDD+PQ57K7oJGk97TLYtbhLUOjCS577Ddm4= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -176,14 +116,10 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 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= @@ -193,10 +129,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/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.4/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.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -215,18 +148,10 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/go-version v1.4.0 h1:aAQzgqIrRKRa7w75CKpbBxYsmUoPjzVm1W59ca1L0J4= -github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= @@ -237,26 +162,16 @@ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -265,7 +180,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= @@ -277,66 +191,36 @@ github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.0 h1:P7Bq0SaI8nsexyay5UAyDo+ICWy5MQPgEZ5+l8JQTKo= -github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw= +github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= @@ -345,61 +229,48 @@ github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4 github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc= -github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= +github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 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/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= -github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 h1:vEf6LukDDCcMnRXnIMy5XRo/MR4+3lNTAhXxM+x0ZXI= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081/go.mod h1:mXF6uSYLo1a2BZPcVHpP8RstMYoQnCaFF+dmIY726NY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= +github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= github.com/symfony-cli/cert v1.0.1 h1:ETYVBshgY+SaydBJmMkU0PaoDrWm6zsGNB/799ZQYCE= github.com/symfony-cli/cert v1.0.1/go.mod h1:g4WrLT6EQsEPmA19xh5Jv9Jnpg5EvtFqArJf2AG2S+w= github.com/symfony-cli/console v1.0.2 h1:u8KJm9jFbfzmN0y7fcfjjal3wWOLflNomu29PLgYQjQ= github.com/symfony-cli/console v1.0.2/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= github.com/symfony-cli/phpstore v1.0.5 h1:e1J+FcztiSSAVuD4gwatPwMpeqQy3SGNdhd6Vtuncy8= github.com/symfony-cli/phpstore v1.0.5/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= -github.com/symfony-cli/terminal v1.0.3 h1:0/Vc6uY1UaHBOkB5ft/OZHHy/zMOPutTmGXtnqyDkPQ= -github.com/symfony-cli/terminal v1.0.3/go.mod h1:+OxxnU05wyRHKYyQkTzTaCSSxmmIBcvAHLcQ099odj4= +github.com/symfony-cli/terminal v1.0.4 h1:jam7aN7g7WQ9uOwV9UC+iVGBLTlzK8kAC5EKcxq21Z8= +github.com/symfony-cli/terminal v1.0.4/go.mod h1:+OxxnU05wyRHKYyQkTzTaCSSxmmIBcvAHLcQ099odj4= github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 h1:F4snRP//nIuTTW9LYEzVH4HVwDG9T3M4t8y/2nqMbiY= github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2/go.mod h1:J0q59IWjLtpRIJulohwqEZvjzwOfTEPp8SVhDJl+y0Y= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -407,41 +278,26 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f h1:OeJjE6G4dgCY4PIXvIRQbE8+RX+uXZyGhUy/ksMGJoc= -golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -475,20 +331,15 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -512,12 +363,9 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220706163947-c90051bbdb60 h1:8NSylCMxLW4JvserAndSgFL7aPli6A68yf0bYFTcWCM= +golang.org/x/net v0.0.0-20220706163947-c90051bbdb60/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -537,13 +385,10 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -552,7 +397,6 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -578,30 +422,24 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/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-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32 h1:Js08h5hqB5xyWR789+QqueR6sDE8mk+YvpETZ+F6X9Y= -golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e h1:CsOuNlbOuf0mzxJIefr6Q4uAUetRUwZE4qt7VfzP+xo= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8= -golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -609,7 +447,7 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -660,13 +498,10 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= -google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -693,7 +528,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -717,7 +551,6 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -731,11 +564,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e h1:gMjH4zLGs9m+dGzR7qHCHaXMOwsJHJKKkHtyXhtOrJk= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -747,14 +577,9 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= 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= @@ -765,12 +590,6 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -778,25 +597,20 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= -gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 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.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -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.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/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-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/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= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk= +gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 7c74df17ace48a56c656e80c4f38a9f6a86cb695 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 27 Jul 2022 08:11:44 +0000 Subject: [PATCH 008/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 6de95a93..285e93db 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -118,7 +118,7 @@ var availablePHPExts = map[string][]string{ "xhprof": {"5.4", "5.5", "5.6"}, "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.1"}, + "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, From 6f197c333f6fb35d3ac03197c3a0c28ec1ab706c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 08:12:18 +0000 Subject: [PATCH 009/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 120d4fa5..87237c4e 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -218,6 +218,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, &console.StringFlag{Name: "header", Aliases: []string{"H"},}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, + &console.StringFlag{Name: "json",}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, }, @@ -318,6 +319,10 @@ var Commands = []*console.Command{ }, Usage: "Obtain an OAuth 2 access token for requests to Platform.sh APIs", Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "header", Aliases: []string{"H"},}, + &console.BoolFlag{Name: "no-warn", Aliases: []string{"W"},}, + }, }, { Category: "cloud:backup", @@ -724,6 +729,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"},}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, + &console.StringFlag{Name: "json",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, @@ -1396,6 +1402,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, &console.StringFlag{Name: "header", Aliases: []string{"H"},}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, + &console.StringFlag{Name: "json",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, @@ -1582,6 +1589,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"},}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, + &console.StringFlag{Name: "json",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, From c9b85eed3d19b5278e61c5df74a71952f5d84b72 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 3 Aug 2022 14:59:06 -0400 Subject: [PATCH 010/466] Fix version check in local:new when cloning the book --- commands/local_new.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/commands/local_new.go b/commands/local_new.go index f652895c..b7f1c0f5 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -108,26 +108,26 @@ var localNewCmd = &console.Command{ } } + symfonyVersion := c.String("version") + if c.Bool("book") { + if symfonyVersion == "" { + return console.Exit("The --version flag is required for the Symfony book", 1) + } + book := &book.Book{ Dir: dir, Debug: c.Bool("debug"), Force: false, AutoConfirm: true, } - if err := book.Clone(c.String("version")); err != nil { - return err - } - return nil + + return book.Clone(symfonyVersion) } - symfonyVersion := c.String("version") if symfonyVersion != "" && c.Bool("demo") { return console.Exit("The --version flag is not supported for the Symfony Demo", 1) } - if symfonyVersion == "" && c.Bool("book") { - return console.Exit("The --version flag is required for the Symfony book", 1) - } if c.Bool("webapp") && c.Bool("no-git") { return console.Exit("The --webapp flag cannot be used with --no-git", 1) } From 3417491b4e2e1938a2e1d38068caa1cf06c14a10 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 3 Aug 2022 16:32:03 -0400 Subject: [PATCH 011/466] Fix Composer detection when composer.phar is present in the current directory, fix #150 --- local/php/executor.go | 47 +++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/local/php/executor.go b/local/php/executor.go index 1e472711..28fc58f6 100644 --- a/local/php/executor.go +++ b/local/php/executor.go @@ -136,6 +136,33 @@ func (e *Executor) lookupPHP(cliDir string, forceReload bool) (*phpstore.Version return v, path, phpiniArgs, nil } +// DetectScriptDir detects the script dir based on the current configuration +func (e *Executor) DetectScriptDir() (string, error) { + if e.scriptDir != "" { + return e.scriptDir, nil + } + + if e.SkipNbArgs == 0 { + e.SkipNbArgs = 1 + } + + if e.SkipNbArgs < 0 { + wd, err := os.Getwd() + if err != nil { + return "", errors.WithStack(err) + } + e.scriptDir = wd + } else { + if len(e.Args) < 1 { + return "", errors.New("args cannot be empty") + } + + e.scriptDir = detectScriptDir(e.Args[e.SkipNbArgs:]) + } + + return e.scriptDir, nil +} + // Config determines the right version of PHP depending on the configuration (+ its configuration) func (e *Executor) Config(loadDotEnv bool) error { // reset environment @@ -144,19 +171,9 @@ func (e *Executor) Config(loadDotEnv bool) error { if len(e.Args) < 1 { return errors.New("args cannot be empty") } - if e.scriptDir == "" { - if e.SkipNbArgs == 0 { - e.SkipNbArgs = 1 - } - if e.SkipNbArgs < 0 { - wd, err := os.Getwd() - if err != nil { - return err - } - e.scriptDir = wd - } else { - e.scriptDir = detectScriptDir(e.Args[e.SkipNbArgs:]) - } + + if _, err := e.DetectScriptDir(); err != nil { + return err } vars := make(map[string]string) @@ -269,9 +286,9 @@ func (e *Executor) Config(loadDotEnv bool) error { // Find composer depending on the configuration func (e *Executor) findComposer(extraBin string) (string, error) { - if e.Config(false) == nil { + if scriptDir, err := e.DetectScriptDir(); err == nil { for _, file := range []string{extraBin, "composer.phar", "composer"} { - path := filepath.Join(e.scriptDir, file) + path := filepath.Join(scriptDir, file) d, err := os.Stat(path) if err != nil { continue From 9c08418f8e0898a3eaf21c63b1ba11c76053bb40 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 4 Aug 2022 15:02:38 -0400 Subject: [PATCH 012/466] Import previous closed source installer --- installer/bash-installer | 229 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 installer/bash-installer diff --git a/installer/bash-installer b/installer/bash-installer new file mode 100644 index 00000000..ce52b699 --- /dev/null +++ b/installer/bash-installer @@ -0,0 +1,229 @@ +#!/usr/bin/env bash +# Symfony CLI installer. +set -euo pipefail + +CLI_LATEST_VERSION_URL="https://get.symfony.com/cli/LATEST" +CLI_CONFIG_DIR=".symfony" +CLI_EXECUTABLE="symfony" +CLI_TMP_NAME="$CLI_EXECUTABLE-"$(date +"%s") +CLI_NAME="Symfony CLI" +CLI_DOWNLOAD_URL_PATTERN="https://github.com/symfony/cli/releases/download/v~latest_version~/symfony_~platform~.gz" + +function output { + style_start="" + style_end="" + if [ "${2:-}" != "" ]; then + case $2 in + "success") + style_start="\033[0;32m" + style_end="\033[0m" + ;; + "error") + style_start="\033[31;31m" + style_end="\033[0m" + ;; + "info"|"warning") + style_start="\033[33m" + style_end="\033[39m" + ;; + "heading") + style_start="\033[1;33m" + style_end="\033[22;39m" + ;; + esac + fi + + builtin echo -e "${style_start}${1}${style_end}" +} + +output "${CLI_NAME} installer" "heading" + +binary_dest="${HOME}/${CLI_CONFIG_DIR}/bin" +custom_dir="false" + +# Getops does not support long option names +while [[ $# -gt 0 ]]; do +case $1 in + --install-dir=*) + binary_dest="${1#*=}" + custom_dir="true" + shift # past argument=value + ;; + --install-dir) + binary_dest="${2:-}" + custom_dir="true" + shift # past argument + shift # past value + ;; + --channel=*) + channel="${1#*=}" + shift # past argument=value + CLI_DOWNLOAD_URL_PATTERN="${channel}/v~latest_version~/symfony_~platform~" + CLI_LATEST_VERSION_URL="${channel}/LATEST" + ;; + *) + output "Unknown option $1" "error" + output "Usage: ${0} [--install-dir=dir]" + exit 1 + ;; +esac +done + +# Run environment checks. +output "\nEnvironment check" "heading" + +# Check that cURL or wget is installed. +downloader="" +if command -v curl >/dev/null 2>&1; then + downloader="curl" + output " [*] cURL is installed" "success" +elif command -v wget >/dev/null 2>&1; then + downloader="wget" + output " [*] wget is installed" "success" +else + output " [ ] ERROR: cURL or wget is required for installation." "error" + exit 1 +fi + +# Check that gzip is installed. +if command -v gzip >/dev/null 2>&1; then + output " [*] Gzip is installed" "success" +else + output " [ ] ERROR: Gzip is required for installation." "error" + exit 1 +fi + +# Check that Git is installed. +if command -v git >/dev/null 2>&1; then + output " [*] Git is installed" "success" +else + output " [ ] Warning: Git will be needed." "warning" +fi + +kernel=$(uname -s 2>/dev/null || /usr/bin/uname -s) +case ${kernel} in + "Linux"|"linux") + kernel="linux" + ;; + "Darwin"|"darwin") + kernel="darwin" + ;; + *) + output "OS '${kernel}' not supported" "error" + exit 1 + ;; +esac + +machine=$(uname -m 2>/dev/null || /usr/bin/uname -m) +case ${machine} in + arm|armv7*) + machine="arm" + ;; + aarch64*|armv8*|arm64) + machine="arm64" + ;; + i[36]86) + machine="386" + ;; + x86_64) + machine="amd64" + ;; + *) + output " [ ] Your architecture (${machine}) is not currently supported" "error" + exit 1 + ;; +esac + +platform="${kernel}_${machine}" + +if [ "darwin_386" = "${platform}" ]; then + output " [ ] Your architecture (${machine}) is not supported anymore" "error" + exit 1 +fi + +if [ "darwin_arm64" = "${platform}" ]; then + platform="darwin_amd64" +fi + +output " [*] Your architecture (${machine}) is supported" "success" + +# The necessary checks have passed. Start downloading the right version. +output "\nDownload" "heading" + +output " Finding the latest version (platform: \"${platform}\")..."; + +case ${downloader} in + "curl") + latest_version=$(curl --fail "${CLI_LATEST_VERSION_URL}" -s) + ;; + "wget") + latest_version=$(wget -q "${CLI_LATEST_VERSION_URL}" -O - 2>/dev/null) + ;; +esac +# shellcheck disable=SC2181 +if [ $? != 0 ]; then + output " Failed to download LATEST version file: ${CLI_LATEST_VERSION_URL}" "error" + exit 1 +fi + +latest_url=${CLI_DOWNLOAD_URL_PATTERN/~latest_version~/${latest_version}} +latest_url=${latest_url/~platform~/${platform}} +output " Downloading version ${latest_version} (${latest_url})..."; +case $downloader in + "curl") + curl --fail --location "${latest_url}" > "/tmp/${CLI_TMP_NAME}.gz" + ;; + "wget") + wget -q --show-progress "${latest_url}" -O "/tmp/${CLI_TMP_NAME}.gz" + ;; +esac + +# shellcheck disable=SC2181 +if [ $? != 0 ]; then + output " The download failed." "error" + exit 1 +fi + +output " Uncompress binary..." +gzip -d "/tmp/${CLI_TMP_NAME}.gz" + +output " Making the binary executable..." +chmod 755 "/tmp/${CLI_TMP_NAME}" + +if [ ! -d "${binary_dest}" ]; then + if ! mkdir -p "${binary_dest}"; then + binary_dest="." + fi +fi + +if [ "${custom_dir}" == "true" ]; then + output " Installing the binary into ${binary_dest} ..." +else + output " Installing the binary into your home directory..." +fi + +if mv "/tmp/${CLI_TMP_NAME}" "${binary_dest}/${CLI_EXECUTABLE}"; then + output " The binary was saved to: ${binary_dest}/${CLI_EXECUTABLE}" +else + output " Failed to move the binary to ${binary_dest}." "error" + rm "/tmp/${CLI_TMP_NAME}" + exit 1 +fi + +#output " Installing the shell auto-completion..." +#"${binary_dest}/${CLI_EXECUTABLE}" self:shell-setup --silent +#if [ $? != 0 ]; then +# output " Failed to install the shell auto-completion." "warning" +#fi + +output "\nThe ${CLI_NAME} v${latest_version} was installed successfully!" "success" + +if [ "${custom_dir}" == "false" ]; then + output "\nUse it as a local file:" "info" + output " ${binary_dest}/${CLI_EXECUTABLE}" + output "\nOr add the following line to your shell configuration file:" "info" + output " export PATH=\"\$HOME/${CLI_CONFIG_DIR}/bin:\$PATH\"" + output "\nOr install it globally on your system:" "info" + output " mv ${binary_dest}/${CLI_EXECUTABLE} /usr/local/bin/${CLI_EXECUTABLE}" + output "\nThen start a new shell and run '${CLI_EXECUTABLE}'" "info" +fi From 5301ebfa8f5918cae7fa0bf63c86f84dbd70f599 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 4 Aug 2022 15:20:12 -0400 Subject: [PATCH 013/466] Adapt installer for Symfony CLI v5 Please note we have two BC break here: - We now require `tar` instead of `gzip` - The installer now puts the installer into `$HOME/.symfony5` --- installer/bash-installer | 91 ++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 51 deletions(-) mode change 100644 => 100755 installer/bash-installer diff --git a/installer/bash-installer b/installer/bash-installer old mode 100644 new mode 100755 index ce52b699..61e7ee87 --- a/installer/bash-installer +++ b/installer/bash-installer @@ -1,13 +1,28 @@ #!/usr/bin/env bash -# Symfony CLI installer. +# Copyright (c) 2021-present Fabien Potencier +# +# Symfony CLI installer: this file is part of Symfony CLI project. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# set -euo pipefail -CLI_LATEST_VERSION_URL="https://get.symfony.com/cli/LATEST" -CLI_CONFIG_DIR=".symfony" +CLI_CONFIG_DIR=".symfony5" CLI_EXECUTABLE="symfony" CLI_TMP_NAME="$CLI_EXECUTABLE-"$(date +"%s") CLI_NAME="Symfony CLI" -CLI_DOWNLOAD_URL_PATTERN="https://github.com/symfony/cli/releases/download/v~latest_version~/symfony_~platform~.gz" +CLI_DOWNLOAD_URL_PATTERN="https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_~platform~.tar.gz" function output { style_start="" @@ -55,12 +70,6 @@ case $1 in shift # past argument shift # past value ;; - --channel=*) - channel="${1#*=}" - shift # past argument=value - CLI_DOWNLOAD_URL_PATTERN="${channel}/v~latest_version~/symfony_~platform~" - CLI_LATEST_VERSION_URL="${channel}/LATEST" - ;; *) output "Unknown option $1" "error" output "Usage: ${0} [--install-dir=dir]" @@ -85,11 +94,11 @@ else exit 1 fi -# Check that gzip is installed. -if command -v gzip >/dev/null 2>&1; then - output " [*] Gzip is installed" "success" +# Check that tar is installed. +if command -v tar >/dev/null 2>&1; then + output " [*] Tar is installed" "success" else - output " [ ] ERROR: Gzip is required for installation." "error" + output " [ ] ERROR: Tar is required for installation." "error" exit 1 fi @@ -124,6 +133,10 @@ case ${machine} in ;; i[36]86) machine="386" + if [ "darwin" = "${kernel}" ]; then + output " [ ] Your architecture (${machine}) is not supported anymore" "error" + exit 1 + fi ;; x86_64) machine="amd64" @@ -134,47 +147,25 @@ case ${machine} in ;; esac -platform="${kernel}_${machine}" - -if [ "darwin_386" = "${platform}" ]; then - output " [ ] Your architecture (${machine}) is not supported anymore" "error" - exit 1 -fi +output " [*] Your architecture (${machine}) is supported" "success" -if [ "darwin_arm64" = "${platform}" ]; then - platform="darwin_amd64" +if [ "darwin" = "${kernel}" ]; then + machine="all" fi -output " [*] Your architecture (${machine}) is supported" "success" +platform="${kernel}_${machine}" # The necessary checks have passed. Start downloading the right version. output "\nDownload" "heading" -output " Finding the latest version (platform: \"${platform}\")..."; - -case ${downloader} in - "curl") - latest_version=$(curl --fail "${CLI_LATEST_VERSION_URL}" -s) - ;; - "wget") - latest_version=$(wget -q "${CLI_LATEST_VERSION_URL}" -O - 2>/dev/null) - ;; -esac -# shellcheck disable=SC2181 -if [ $? != 0 ]; then - output " Failed to download LATEST version file: ${CLI_LATEST_VERSION_URL}" "error" - exit 1 -fi - -latest_url=${CLI_DOWNLOAD_URL_PATTERN/~latest_version~/${latest_version}} -latest_url=${latest_url/~platform~/${platform}} -output " Downloading version ${latest_version} (${latest_url})..."; +latest_url=${CLI_DOWNLOAD_URL_PATTERN/~platform~/${platform}} +output " Downloading ${latest_url}..."; case $downloader in "curl") - curl --fail --location "${latest_url}" > "/tmp/${CLI_TMP_NAME}.gz" + curl --fail --location "${latest_url}" > "/tmp/${CLI_TMP_NAME}.tar.gz" ;; "wget") - wget -q --show-progress "${latest_url}" -O "/tmp/${CLI_TMP_NAME}.gz" + wget -q --show-progress "${latest_url}" -O "/tmp/${CLI_TMP_NAME}.tar.gz" ;; esac @@ -185,10 +176,8 @@ if [ $? != 0 ]; then fi output " Uncompress binary..." -gzip -d "/tmp/${CLI_TMP_NAME}.gz" - -output " Making the binary executable..." -chmod 755 "/tmp/${CLI_TMP_NAME}" +tar -xz --directory "/tmp" -f "/tmp/${CLI_TMP_NAME}.tar.gz" +rm "/tmp/${CLI_TMP_NAME}.tar.gz" if [ ! -d "${binary_dest}" ]; then if ! mkdir -p "${binary_dest}"; then @@ -202,11 +191,11 @@ else output " Installing the binary into your home directory..." fi -if mv "/tmp/${CLI_TMP_NAME}" "${binary_dest}/${CLI_EXECUTABLE}"; then +if mv "/tmp/${CLI_EXECUTABLE}" "${binary_dest}/${CLI_EXECUTABLE}"; then output " The binary was saved to: ${binary_dest}/${CLI_EXECUTABLE}" else output " Failed to move the binary to ${binary_dest}." "error" - rm "/tmp/${CLI_TMP_NAME}" + rm "/tmp/${CLI_EXECUTABLE}" exit 1 fi @@ -216,7 +205,7 @@ fi # output " Failed to install the shell auto-completion." "warning" #fi -output "\nThe ${CLI_NAME} v${latest_version} was installed successfully!" "success" +output "\nThe ${CLI_NAME} was installed successfully!" "success" if [ "${custom_dir}" == "false" ]; then output "\nUse it as a local file:" "info" From 5410fb3b07ecfa00087524c2b0c66c4b194609c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 11 Aug 2022 08:11:27 +0000 Subject: [PATCH 014/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 285e93db..b7d46d83 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -61,7 +61,7 @@ var availablePHPExts = map[string][]string{ "mbstring": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "mcrypt": {"5.4", "5.5", "5.6", "7.0", "7.1"}, "memcache": {"5.4", "5.5", "5.6"}, - "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "mongo": {"5.4", "5.5", "5.6"}, "mongodb": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, From 960373a00e9af305c7fe7275995f28b00de2ae69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Lengemann=20Garc=C3=A9s?= Date: Mon, 15 Aug 2022 17:56:32 -0500 Subject: [PATCH 015/466] Validate the versions of the supported services --- commands/local_new.go | 6 ++- commands/local_new_test.go | 49 +++++++++++++++++++ .../testdata/postgresql/10/docker-compose.yml | 7 +++ .../testdata/postgresql/14/docker-compose.yml | 7 +++ .../postgresql/noversion/docker-compose.yml | 7 +++ 5 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 commands/local_new_test.go create mode 100644 commands/testdata/postgresql/10/docker-compose.yml create mode 100644 commands/testdata/postgresql/14/docker-compose.yml create mode 100644 commands/testdata/postgresql/noversion/docker-compose.yml diff --git a/commands/local_new.go b/commands/local_new.go index f652895c..c807f42e 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -302,8 +302,12 @@ func parseDockerComposeServices(dir string) []*CloudService { s.Name = service.Name parts := strings.Split(service.Image, ":") s.Version = regexp.MustCompile(`\d+(\.\d+)?`).FindString(parts[len(parts)-1]) + serviceLastVersion := platformsh.ServiceLastVersion(s.Type) if s.Version == "" { - s.Version = platformsh.ServiceLastVersion(s.Type) + s.Version = serviceLastVersion + } else if s.Version > serviceLastVersion { + terminal.Printf("Unsupported %s version %s using version %s\n", s.Type, s.Version, serviceLastVersion) + s.Version = serviceLastVersion } cloudServices = append(cloudServices, s) } diff --git a/commands/local_new_test.go b/commands/local_new_test.go new file mode 100644 index 00000000..f19d3a85 --- /dev/null +++ b/commands/local_new_test.go @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +import ( + "testing" +) + +func TestParseDockerComposeServices(t *testing.T) { + for dir, expected := range map[string]CloudService{ + "testdata/postgresql/noversion/": { + Name: "database", + Type: "postgresql", + Version: "13", + }, + "testdata/postgresql/10/": { + Name: "database", + Type: "postgresql", + Version: "10", + }, + "testdata/postgresql/14/": { + Name: "database", + Type: "postgresql", + Version: "13", + }, + } { + result := parseDockerComposeServices(dir) + if result[0].Version != expected.Version { + t.Errorf("parseDockerComposeServices(none/%q): got %v, expected %v", dir, result[0].Version, expected.Version) + } + } +} diff --git a/commands/testdata/postgresql/10/docker-compose.yml b/commands/testdata/postgresql/10/docker-compose.yml new file mode 100644 index 00000000..c310679e --- /dev/null +++ b/commands/testdata/postgresql/10/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3' + +services: + database: + image: postgres:${POSTGRES_VERSION:-10}-alpine + ports: + - "5432" diff --git a/commands/testdata/postgresql/14/docker-compose.yml b/commands/testdata/postgresql/14/docker-compose.yml new file mode 100644 index 00000000..6865a169 --- /dev/null +++ b/commands/testdata/postgresql/14/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3' + +services: + database: + image: postgres:${POSTGRES_VERSION:-14}-alpine + ports: + - "5432" diff --git a/commands/testdata/postgresql/noversion/docker-compose.yml b/commands/testdata/postgresql/noversion/docker-compose.yml new file mode 100644 index 00000000..939c77c2 --- /dev/null +++ b/commands/testdata/postgresql/noversion/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3' + +services: + database: + image: postgres + ports: + - "5432" From 913c0b64147d2e8dc8f4b99f0242ad52a4d5ee38 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 16 Aug 2022 09:59:34 +0200 Subject: [PATCH 016/466] Update deps --- go.mod | 32 +++++++++++++-------------- go.sum | 68 ++++++++++++++++++++++++++++++++-------------------------- 2 files changed, 53 insertions(+), 47 deletions(-) diff --git a/go.mod b/go.mod index 54e83612..1c23c4b9 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/symfony-cli/symfony-cli require ( - github.com/compose-spec/compose-go v1.2.8 + github.com/compose-spec/compose-go v1.4.0 github.com/docker/docker v20.10.17+incompatible github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021 github.com/fabpot/local-php-security-checker/v2 v2.0.4 @@ -24,14 +24,14 @@ require ( github.com/symfony-cli/phpstore v1.0.5 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 - golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/distribution/distribution/v3 v3.0.0-20220702071910-8857a1948739 // indirect + github.com/distribution/distribution/v3 v3.0.0-20220729163034-26163d82560f // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect @@ -44,22 +44,22 @@ require ( github.com/kr/pretty v0.3.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/magiconair/properties v1.8.6 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect + github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.2 // indirect + github.com/pelletier/go-toml/v2 v2.0.3 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/rivo/uniseg v0.2.0 // indirect + github.com/rivo/uniseg v0.3.4 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect - github.com/spf13/afero v1.8.2 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect + github.com/spf13/afero v1.9.2 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect @@ -67,14 +67,14 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect - golang.org/x/net v0.0.0-20220706163947-c90051bbdb60 // indirect - golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e // indirect - golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect + golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect + golang.org/x/net v0.0.0-20220812174116-3211cb980234 // indirect + golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect + golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect - gopkg.in/ini.v1 v1.66.6 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.0 // indirect diff --git a/go.sum b/go.sum index 6d383757..bfbc861e 100644 --- a/go.sum +++ b/go.sum @@ -50,16 +50,16 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/compose-spec/compose-go v1.2.8 h1:ImPy82xn+rJKL5xmgEyesZEfqJmrzJ1WuZSHEhxMEFI= -github.com/compose-spec/compose-go v1.2.8/go.mod h1:813WrDd7NtOl9ZVqswlJ5iCQy3lxI3KYxKkY8EeHQ7w= +github.com/compose-spec/compose-go v1.4.0 h1:zaYVAZ6lIByr7Jffi20AabfeUwcTrdXfH3X1R5HEm+g= +github.com/compose-spec/compose-go v1.4.0/go.mod h1:l7RUULbFFLzlQHuxtJr7SVLyWdqEpbJEGTWCgcu6Eqw= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20220702071910-8857a1948739 h1:fOBqIwS8s+ircSm/N6VQcIZPaFoomoAWgxwG2Ssp15I= -github.com/distribution/distribution/v3 v3.0.0-20220702071910-8857a1948739/go.mod h1:28YO/VJk9/64+sTGNuYaBjWxrXTPrj0C0XmgTIOjxX4= +github.com/distribution/distribution/v3 v3.0.0-20220729163034-26163d82560f h1:3NCYdjXycNd/Xn/iICZzmxkiDX1e1cjTHjbMAz+wRVk= +github.com/distribution/distribution/v3 v3.0.0-20220729163034-26163d82560f/go.mod h1:28YO/VJk9/64+sTGNuYaBjWxrXTPrj0C0XmgTIOjxX4= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= @@ -182,10 +182,12 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -195,8 +197,8 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -207,8 +209,8 @@ github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3 github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw= -github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= +github.com/pelletier/go-toml/v2 v2.0.3 h1:h9JoA60e1dVEOpp0PFwJSmt1Htu057NUq9/bUwaO61s= +github.com/pelletier/go-toml/v2 v2.0.3/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -219,8 +221,9 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw= +github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= @@ -232,14 +235,14 @@ github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= @@ -252,13 +255,15 @@ github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiu github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 h1:vEf6LukDDCcMnRXnIMy5XRo/MR4+3lNTAhXxM+x0ZXI= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081/go.mod h1:mXF6uSYLo1a2BZPcVHpP8RstMYoQnCaFF+dmIY726NY= 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/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= github.com/symfony-cli/cert v1.0.1 h1:ETYVBshgY+SaydBJmMkU0PaoDrWm6zsGNB/799ZQYCE= @@ -296,8 +301,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -364,8 +369,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220706163947-c90051bbdb60 h1:8NSylCMxLW4JvserAndSgFL7aPli6A68yf0bYFTcWCM= -golang.org/x/net v0.0.0-20220706163947-c90051bbdb60/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220812174116-3211cb980234 h1:RDqmgfe7SvlMWoqC3xwQ2blLO3fcWcxMa3eBLRdRW7E= +golang.org/x/net v0.0.0-20220812174116-3211cb980234/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -385,8 +390,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -429,11 +434,12 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e h1:CsOuNlbOuf0mzxJIefr6Q4uAUetRUwZE4qt7VfzP+xo= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= -golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -446,8 +452,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -597,8 +603,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= -gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 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= From c362f6576624dacb3e0cac0ee36b8039e0cc7600 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 17 Aug 2022 14:33:19 +0200 Subject: [PATCH 017/466] Remove support for Fury --- .github/workflows/releaser.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 251f65c7..d91b096c 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -84,21 +84,6 @@ jobs: with: retention-days: 5 path: dist - - - name: Fury Uploads - env: - FURY_PUSH_TOKEN: ${{ secrets.FURY_PUSH_TOKEN }} - if: startsWith(github.ref, 'refs/tags/v') - run: | - URLS=`curl -fsSL "https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest" | jq -r '.assets[] | select(.name | match("(deb|rpm)$")).browser_download_url'` - for URL in $URLS - do - readarray -d "/" -t arr <<< "$URL" - NAME=${arr[-1]} - curl -fsSL $URL > /tmp/$NAME - curl https://$FURY_PUSH_TOKEN@push.fury.io/symfony/ -F package=@/tmp/$NAME - unlink /tmp/$NAME - done - name: Install Cloudsmith CLI run: pip install --upgrade cloudsmith-cli From fd73111bb5462b2aa88c763e974aa6bfbebe9663 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 12:19:19 +0000 Subject: [PATCH 018/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 87237c4e..098d0f10 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1464,9 +1464,11 @@ var Commands = []*console.Command{ Usage: "List subscriptions within an organization", Flags: []console.Flag{ &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "page",}, }, }, { @@ -1658,14 +1660,14 @@ var Commands = []*console.Command{ Usage: "Get a list of all active projects", Flags: []console.Flag{ &console.StringFlag{Name: "columns",}, - &console.StringFlag{Name: "count",}, + &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "my",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "page", DefaultValue: "1",}, + &console.StringFlag{Name: "page",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "refresh",}, &console.BoolFlag{Name: "reverse",}, From 4a6ca3b26c6a1dcc2ab48834569dbebdb3590ce7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 08:14:05 +0000 Subject: [PATCH 019/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index b7d46d83..c00cd940 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -44,7 +44,7 @@ var availablePHPExts = map[string][]string{ "ftp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "gd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "gearman": {"5.4", "5.5", "5.6"}, - "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, + "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "gmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "http": {"5.4", "5.5", "7.3", "7.4", "8.0", "8.1"}, From 18d0d05e3a7c97f079c9e51d7804f6f1c203e6a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 16:13:56 +0000 Subject: [PATCH 020/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index c00cd940..b62f4162 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -89,6 +89,7 @@ var availablePHPExts = map[string][]string{ "pspell": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "pthreads": {"7.1"}, "raphf": {"5.6", "7.4", "8.0", "8.1"}, + "rdkafka": {"8.1"}, "readline": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "recode": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3"}, "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, From fc4dd0cdcc5100fe7ee944ef20df4e29147a66cc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 16:14:00 +0000 Subject: [PATCH 021/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index b62f4162..c31e6026 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -181,8 +181,8 @@ var availableServices = []*service{ { Type: "mongodb-enterprise", Versions: serviceVersions{ - Deprecated: []string{}, - Supported: []string{"5.0"}, + Deprecated: []string{"4.0"}, + Supported: []string{"5.0", "4.4", "4.2"}, }, }, { From cf21be016415f864173c69a5935d30a79fe638c2 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 28 Sep 2022 11:13:38 -0400 Subject: [PATCH 022/466] Bump Go to 1.19 --- .github/workflows/go_generate_update.yml | 2 +- .github/workflows/releaser.yml | 2 +- go.mod | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go_generate_update.yml b/.github/workflows/go_generate_update.yml index 15f1567e..df171cb1 100644 --- a/.github/workflows/go_generate_update.yml +++ b/.github/workflows/go_generate_update.yml @@ -17,7 +17,7 @@ jobs: name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.19 - uses: actions/cache@v3 with: path: | diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index d91b096c..33f7e973 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -22,7 +22,7 @@ jobs: name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.19 - uses: actions/cache@v3 with: path: | diff --git a/go.mod b/go.mod index 1c23c4b9..c63a2a03 100644 --- a/go.mod +++ b/go.mod @@ -81,4 +81,4 @@ require ( software.sslmate.com/src/go-pkcs12 v0.2.0 // indirect ) -go 1.18 +go 1.19 From 6b86a57d113834429dbce099fbed2017c9699c37 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 30 Sep 2022 08:10:45 +0200 Subject: [PATCH 023/466] Fix psh service sorting --- local/platformsh/config.go | 4 ++-- local/platformsh/generator/config.go | 36 ++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index c31e6026..95be7b4d 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -147,7 +147,7 @@ var availableServices = []*service{ Type: "influxdb", Versions: serviceVersions{ Deprecated: []string{}, - Supported: []string{"1.2", "1.3", "1.7", "1.8", "2.2"}, + Supported: []string{"1.2", "1.3", "1.7", "1.8", "2.2", "2.3"}, }, }, { @@ -182,7 +182,7 @@ var availableServices = []*service{ Type: "mongodb-enterprise", Versions: serviceVersions{ Deprecated: []string{"4.0"}, - Supported: []string{"5.0", "4.4", "4.2"}, + Supported: []string{"4.2", "4.4", "5.0"}, }, }, { diff --git a/local/platformsh/generator/config.go b/local/platformsh/generator/config.go index fe7a18f9..32b59d8d 100644 --- a/local/platformsh/generator/config.go +++ b/local/platformsh/generator/config.go @@ -12,6 +12,8 @@ import ( "sort" "strings" "text/template" + + "github.com/hashicorp/go-version" ) type service struct { @@ -107,16 +109,25 @@ func parseServices() (string, error) { for _, name := range serviceNames { s := services[name] if !s.Runtime { + deprecatedVersions, err := sortVersions(s.Versions.Deprecated) + if err != nil { + return "", err + } + supportedVersions, err := sortVersions(s.Versions.Supported) + if err != nil { + return "", err + } + servicesAsString += "\t{\n" servicesAsString += fmt.Sprintf("\t\tType: \"%s\",\n", s.Type) servicesAsString += "\t\tVersions: serviceVersions{\n" - if len(s.Versions.Deprecated) > 0 { - servicesAsString += fmt.Sprintf("\t\t\tDeprecated: []string{\"%s\"},\n", strings.Join(s.Versions.Deprecated, "\", \"")) + if len(deprecatedVersions) > 0 { + servicesAsString += fmt.Sprintf("\t\t\tDeprecated: []string{\"%s\"},\n", strings.Join(deprecatedVersions, "\", \"")) } else { servicesAsString += "\t\t\tDeprecated: []string{},\n" } - if len(s.Versions.Supported) > 0 { - servicesAsString += fmt.Sprintf("\t\t\tSupported: []string{\"%s\"},\n", strings.Join(s.Versions.Supported, "\", \"")) + if len(supportedVersions) > 0 { + servicesAsString += fmt.Sprintf("\t\t\tSupported: []string{\"%s\"},\n", strings.Join(supportedVersions, "\", \"")) } else { servicesAsString += "\t\t\tSupported: []string{},\n" } @@ -211,3 +222,20 @@ func parseLine(line string) (string, []string) { } return name, versions } + +func sortVersions(versions []string) ([]string, error) { + parsedVersions := make([]*version.Version, len(versions)) + for i, raw := range versions { + v, err := version.NewVersion(raw) + if err != nil { + return nil, err + } + parsedVersions[i] = v + } + sort.Sort(version.Collection(parsedVersions)) + versionsAsStrings := make([]string, len(versions)) + for i, version := range parsedVersions { + versionsAsStrings[i] = version.Original() + } + return versionsAsStrings, nil +} From 3a9420f1226bf08b9a64f83e549416bf6ac75097 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 30 Sep 2022 08:03:16 +0200 Subject: [PATCH 024/466] Bump deps --- go.mod | 42 +++++++++++++++------------- go.sum | 88 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 66 insertions(+), 64 deletions(-) diff --git a/go.mod b/go.mod index c63a2a03..bce193b8 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/symfony-cli/symfony-cli require ( - github.com/compose-spec/compose-go v1.4.0 - github.com/docker/docker v20.10.17+incompatible - github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021 + github.com/compose-spec/compose-go v1.6.0 + github.com/docker/docker v20.10.18+incompatible + github.com/elazarl/goproxy v0.0.0-20220901064549-fbd10ff4f5a1 github.com/fabpot/local-php-security-checker/v2 v2.0.4 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 @@ -14,27 +14,27 @@ require ( github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 github.com/rs/xid v1.4.0 - github.com/rs/zerolog v1.27.0 + github.com/rs/zerolog v1.28.0 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 - github.com/spf13/viper v1.12.0 + github.com/spf13/viper v1.13.0 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.1 github.com/symfony-cli/console v1.0.2 github.com/symfony-cli/phpstore v1.0.5 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 + golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) require ( - github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/distribution/distribution/v3 v3.0.0-20220729163034-26163d82560f // indirect + github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.4.0 // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -46,33 +46,35 @@ require ( github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect + github.com/opencontainers/image-spec v1.1.0-rc1 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.3 // indirect + github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/rivo/uniseg v0.3.4 // indirect - github.com/rogpeppe/go-internal v1.8.1 // indirect + github.com/rivo/uniseg v0.4.2 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/spf13/afero v1.9.2 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.4.0 // indirect + github.com/subosito/gotenv v1.4.1 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect - golang.org/x/net v0.0.0-20220812174116-3211cb980234 // indirect - golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect - golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect + golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect + golang.org/x/net v0.0.0-20220927171203-f486391704dc // indirect + golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect + golang.org/x/term v0.0.0-20220919170432-7a66f970e087 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect + golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect + golang.org/x/tools v0.1.12 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect diff --git a/go.sum b/go.sum index bfbc861e..8661a738 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,8 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 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= @@ -50,26 +50,26 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/compose-spec/compose-go v1.4.0 h1:zaYVAZ6lIByr7Jffi20AabfeUwcTrdXfH3X1R5HEm+g= -github.com/compose-spec/compose-go v1.4.0/go.mod h1:l7RUULbFFLzlQHuxtJr7SVLyWdqEpbJEGTWCgcu6Eqw= +github.com/compose-spec/compose-go v1.6.0 h1:7Ol/UULMUtbPmB0EYrETASRoum821JpOh/XaEf+hN+Q= +github.com/compose-spec/compose-go v1.6.0/go.mod h1:os+Ulh2jlZxY1XT1hbciERadjSUU/BtZ6+gcN7vD7J0= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20220729163034-26163d82560f h1:3NCYdjXycNd/Xn/iICZzmxkiDX1e1cjTHjbMAz+wRVk= -github.com/distribution/distribution/v3 v3.0.0-20220729163034-26163d82560f/go.mod h1:28YO/VJk9/64+sTGNuYaBjWxrXTPrj0C0XmgTIOjxX4= +github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31 h1:AqcwAyaSEkILnr/bLybFnM2i/+EW67JJIRs/4dWmzxo= +github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31/go.mod h1:XrR+08YQxO57vT8gtNmhLfHy/YIutMmmEeKMhU7zXqY= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= -github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.18+incompatible h1:SN84VYXTBNGn92T/QwIRPlum9zfemfitN7pbsp26WSc= +github.com/docker/docker v20.10.18+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021 h1:EbF0UihnxWRcIMOwoVtqnAylsqcjzqpSvMdjF2Ud4rA= -github.com/elazarl/goproxy v0.0.0-20220529153421-8ea89ba92021/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/elazarl/goproxy v0.0.0-20220901064549-fbd10ff4f5a1 h1:ecIiM5NYeEOhy5trm8xel6wpUhYH+QWteUKnwcbCMl4= +github.com/elazarl/goproxy v0.0.0-20220901064549-fbd10ff4f5a1/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -189,8 +189,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -205,15 +205,14 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0-rc1 h1:lfG+OTa7V8PD3PKvkocSG9KAcA9MANqJn53m31Fvwkc= +github.com/opencontainers/image-spec v1.1.0-rc1/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.3 h1:h9JoA60e1dVEOpp0PFwJSmt1Htu057NUq9/bUwaO61s= -github.com/pelletier/go-toml/v2 v2.0.3/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= +github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -222,19 +221,17 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw= -github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= +github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= -github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= +github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -250,8 +247,8 @@ github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0 github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 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/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= -github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= +github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 h1:vEf6LukDDCcMnRXnIMy5XRo/MR4+3lNTAhXxM+x0ZXI= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081/go.mod h1:mXF6uSYLo1a2BZPcVHpP8RstMYoQnCaFF+dmIY726NY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -264,8 +261,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= -github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/symfony-cli/cert v1.0.1 h1:ETYVBshgY+SaydBJmMkU0PaoDrWm6zsGNB/799ZQYCE= github.com/symfony-cli/cert v1.0.1/go.mod h1:g4WrLT6EQsEPmA19xh5Jv9Jnpg5EvtFqArJf2AG2S+w= github.com/symfony-cli/console v1.0.2 h1:u8KJm9jFbfzmN0y7fcfjjal3wWOLflNomu29PLgYQjQ= @@ -301,8 +298,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be h1:fmw3UbQh+nxngCAHrDCCztao/kbYFnWjoqop8dHx05A= +golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -336,6 +333,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -369,8 +368,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220812174116-3211cb980234 h1:RDqmgfe7SvlMWoqC3xwQ2blLO3fcWcxMa3eBLRdRW7E= -golang.org/x/net v0.0.0-20220812174116-3211cb980234/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20220927171203-f486391704dc h1:FxpXZdoBqT8RjqTy6i1E8nXHhW21wK7ptQ/EPIGxzPQ= +golang.org/x/net v0.0.0-20220927171203-f486391704dc/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -390,8 +389,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 h1:cu5kTvlzcw1Q5S9f5ip1/cpiB4nXvw1XYzFPGgzLUOY= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -403,7 +402,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -425,7 +423,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -435,11 +432,12 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI= +golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc= -golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220919170432-7a66f970e087 h1:tPwmk4vmvVCMdr98VgL4JH+qZxPL8fqlUOHnyOM8N3w= +golang.org/x/term v0.0.0-20220919170432-7a66f970e087/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -452,8 +450,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= -golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -504,6 +502,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 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= From 550b40f4fb799e5ea3eef8598ad5e9a212e7f2d8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 30 Sep 2022 09:34:47 +0200 Subject: [PATCH 025/466] Bump cosign dep --- .github/workflows/releaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 33f7e973..ab2c0c1e 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -56,7 +56,7 @@ jobs: run: go test -v ./... - name: Set up cosign - uses: sigstore/cosign-installer@v2.0.0 + uses: sigstore/cosign-installer@v2.7.0 - name: Run GoReleaser for snapshot uses: goreleaser/goreleaser-action@v2 From c29105eade316dde82e41909ca85fd7e9bca8290 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 12:19:46 +0000 Subject: [PATCH 026/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 95be7b4d..d2acca49 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -146,22 +146,22 @@ var availableServices = []*service{ { Type: "influxdb", Versions: serviceVersions{ - Deprecated: []string{}, - Supported: []string{"1.2", "1.3", "1.7", "1.8", "2.2", "2.3"}, + Deprecated: []string{"1.2", "1.3", "1.7", "1.8", "2.2"}, + Supported: []string{"2.3"}, }, }, { Type: "kafka", Versions: serviceVersions{ - Deprecated: []string{}, - Supported: []string{"2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7"}, + Deprecated: []string{"2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7"}, + Supported: []string{"3.2"}, }, }, { Type: "mariadb", Versions: serviceVersions{ - Deprecated: []string{"5.5"}, - Supported: []string{"10.0", "10.1", "10.2", "10.3", "10.4", "10.5", "10.6"}, + Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6"}, }, }, { @@ -216,29 +216,29 @@ var availableServices = []*service{ { Type: "postgresql", Versions: serviceVersions{ - Deprecated: []string{"9.3", "9.4", "9.5"}, - Supported: []string{"9.6", "10", "11", "12", "13"}, + Deprecated: []string{"9.3", "9.4", "9.5", "9.6"}, + Supported: []string{"10", "11", "12", "13"}, }, }, { Type: "rabbitmq", Versions: serviceVersions{ - Deprecated: []string{}, - Supported: []string{"3.5", "3.6", "3.7", "3.8", "3.9"}, + Deprecated: []string{"3.5", "3.6", "3.7", "3.8"}, + Supported: []string{"3.9"}, }, }, { Type: "redis", Versions: serviceVersions{ - Deprecated: []string{"2.8", "3.0"}, - Supported: []string{"3.2", "4.0", "5.0", "6.0", "6.2", "7.0"}, + Deprecated: []string{"2.8", "3.0", "3.2", "4.0", "5.0", "6.0"}, + Supported: []string{"6.2", "7.0"}, }, }, { Type: "solr", Versions: serviceVersions{ - Deprecated: []string{"3.6", "4.10", "6.3", "6.6", "7.6"}, - Supported: []string{"7.7", "8.0", "8.4", "8.6", "8.11"}, + Deprecated: []string{"3.6", "4.10", "6.3", "6.6", "7.6", "7.7", "8.0", "8.4", "8.6"}, + Supported: []string{"8.11"}, }, }, { From 87b047699b25c26d66bb37116fbe9b74f52cbc98 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 5 Oct 2022 12:02:10 -0400 Subject: [PATCH 027/466] Enable the local proxy as a service on macOS --- .goreleaser.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 45133383..44f34202 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -95,6 +95,9 @@ brews: type: optional install: |- bin.install "symfony" + service: |- + run ["#{bin}/symfony", "local:proxy:start", "--foreground"] + keep_alive true nfpms: - file_name_template: '{{ .ConventionalFileName }}' From ec17e2a78e919d9ed3f2b6a6ecb9f563d27b69f9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 8 Oct 2022 10:48:27 +0200 Subject: [PATCH 028/466] Use the first configured domain when available with local:open --- commands/openers.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/commands/openers.go b/commands/openers.go index ac90be00..43ae262b 100644 --- a/commands/openers.go +++ b/commands/openers.go @@ -27,6 +27,8 @@ import ( "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/envs" "github.com/symfony-cli/symfony-cli/local/pid" + "github.com/symfony-cli/symfony-cli/local/proxy" + "github.com/symfony-cli/symfony-cli/util" "github.com/symfony-cli/terminal" ) @@ -60,9 +62,16 @@ var projectLocalOpenCmd = &console.Command{ if !pidFile.IsRunning() { return console.Exit("Local web server is down.", 1) } - abstractOpenCmd(fmt.Sprintf("%s://127.0.0.1:%d/%s", + host := fmt.Sprintf("127.0.0.1:%d", pidFile.Port) + if proxyConf, err := proxy.Load(util.GetHomeDir()); err == nil { + domains := proxyConf.GetDomains(projectDir) + if len(domains) > 0 { + host = domains[0] + } + } + abstractOpenCmd(fmt.Sprintf("%s://%s/%s", pidFile.Scheme, - pidFile.Port, + host, strings.TrimLeft(c.String("path"), "/"), )) return nil From ed9f8f8e434798ec7e1ee85370b5dc6ce9bdfb1a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 8 Oct 2022 11:07:18 +0200 Subject: [PATCH 029/466] Add more builds --- .goreleaser.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 44f34202..b399536c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,7 +20,12 @@ builds: goarch: - 386 - amd64 + - arm - arm64 + goarm: + - 5 + - 6 + - 7 ignore: - goos: windows goarch: arm64 From 64487345cb4808fb525d151d7cd2ec51d1112a14 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 9 Oct 2022 08:31:23 +0200 Subject: [PATCH 030/466] Fix archive name --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index b399536c..cf0e4272 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -38,7 +38,7 @@ builds: - -trimpath archives: - - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + - format_overrides: - goos: windows format: zip From 6b1ce2a5773f03289b69c9e826b6cc57a30c4191 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 9 Oct 2022 12:20:49 +0200 Subject: [PATCH 031/466] Revert "Merge pull request #193 from symfony-cli/more-builds" This reverts commit fbd787343b807640593bde4a0b9bd17d96df8e2a, reversing changes made to 6c9ba88d0c86fdd8c7e31e366b48872afc819b97. --- .goreleaser.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index cf0e4272..4ca29d87 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,12 +20,7 @@ builds: goarch: - 386 - amd64 - - arm - arm64 - goarm: - - 5 - - 6 - - 7 ignore: - goos: windows goarch: arm64 From f7722612f972ad3cb733e4cc4ec4462c5b0480f8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 10 Oct 2022 11:11:46 +0200 Subject: [PATCH 032/466] Revert "Fix archive name" This reverts commit 64487345cb4808fb525d151d7cd2ec51d1112a14. --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 4ca29d87..44f34202 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -33,7 +33,7 @@ builds: - -trimpath archives: - - + - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' format_overrides: - goos: windows format: zip From 364ecc34284df590bb76c46a7ade13f0f4df9af4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 10 Oct 2022 11:13:20 +0200 Subject: [PATCH 033/466] Update Platform.sh service versions --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index d2acca49..07717868 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -188,8 +188,8 @@ var availableServices = []*service{ { Type: "mysql", Versions: serviceVersions{ - Deprecated: []string{"5.5"}, - Supported: []string{"10.0", "10.1", "10.2", "10.3", "10.4", "10.5", "10.6"}, + Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6"}, }, }, { From d65bb39a495308b60fc0242c2dee19c6080b0c26 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Tue, 11 Oct 2022 20:52:46 +0000 Subject: [PATCH 034/466] feat: add gzip for local webserver --- go.mod | 1 + go.sum | 2 ++ local/http/http.go | 22 ++++++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index bce193b8..ab61cc3d 100644 --- a/go.mod +++ b/go.mod @@ -31,6 +31,7 @@ require ( require ( github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/NYTimes/gziphandler v1.1.1 github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect diff --git a/go.sum b/go.sum index 8661a738..08f8d291 100644 --- a/go.sum +++ b/go.sum @@ -42,6 +42,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 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= diff --git a/local/http/http.go b/local/http/http.go index f70f2eab..0f7496a2 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -30,6 +30,7 @@ import ( "strconv" "strings" + "github.com/NYTimes/gziphandler" "github.com/pkg/errors" "github.com/rs/zerolog" "github.com/soheilhy/cmux" @@ -58,6 +59,17 @@ type Server struct { serverPort string } +var gzipContentTypes = []string{ + "text/html", + "text/plain", + "text/csv", + "text/javascript", + "text/css", + "application/json", + "application/javascript", + "application/vnd.api+json", +} + // Start starts the server func (s *Server) Start(errChan chan error) (int, error) { ln, port, err := process.CreateListener(s.Port, s.PreferredPort) @@ -66,8 +78,14 @@ func (s *Server) Start(errChan chan error) (int, error) { } s.serverPort = strconv.Itoa(port) + gzipWrapper, err := gziphandler.GzipHandlerWithOpts(gziphandler.ContentTypes(gzipContentTypes)) + + if err != nil { + return port, err + } + s.httpserver = &http.Server{ - Handler: http.HandlerFunc(s.ProxyHandler), + Handler: gzipWrapper(http.HandlerFunc(s.ProxyHandler)), } if s.PKCS12 == "" { go func() { @@ -83,7 +101,7 @@ func (s *Server) Start(errChan chan error) (int, error) { } s.httpsserver = &http.Server{ - Handler: http.HandlerFunc(s.ProxyHandler), + Handler: gzipWrapper(http.HandlerFunc(s.ProxyHandler)), TLSConfig: &tls.Config{ PreferServerCipherSuites: true, CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256}, From 1a134189fdb8930e5c41296b277b6f33fe049ef2 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Thu, 13 Oct 2022 23:14:57 +0000 Subject: [PATCH 035/466] add gzip option using cli option --- commands/local_server_start.go | 1 + local/http/http.go | 13 +++++++++++-- local/project/config.go | 6 ++++++ local/project/project.go | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 222e7a1f..ceb47892 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -67,6 +67,7 @@ var localServerStartCmd = &console.Command{ &console.BoolFlag{Name: "no-humanize", Usage: "Do not format JSON logs"}, &console.StringFlag{Name: "p12", Usage: "Name of the file containing the TLS certificate to use in p12 format"}, &console.BoolFlag{Name: "no-tls", Usage: "Use HTTP instead of HTTPS"}, + &console.BoolFlag{Name: "use-gzip", Usage: "Use GZIP", DefaultValue: false}, }, Action: func(c *console.Context) error { ui := terminal.SymfonyStyle(terminal.Stdout, terminal.Stdin) diff --git a/local/http/http.go b/local/http/http.go index 0f7496a2..7853f6dc 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -52,6 +52,7 @@ type Server struct { AllowHTTP bool Logger zerolog.Logger Appversion string + UseGzip bool httpserver *http.Server httpsserver *http.Server @@ -84,8 +85,16 @@ func (s *Server) Start(errChan chan error) (int, error) { return port, err } + var proxyHandler http.Handler + + proxyHandler = http.HandlerFunc(s.ProxyHandler) + + if s.UseGzip { + proxyHandler = gzipWrapper(proxyHandler) + } + s.httpserver = &http.Server{ - Handler: gzipWrapper(http.HandlerFunc(s.ProxyHandler)), + Handler: proxyHandler, } if s.PKCS12 == "" { go func() { @@ -101,7 +110,7 @@ func (s *Server) Start(errChan chan error) (int, error) { } s.httpsserver = &http.Server{ - Handler: gzipWrapper(http.HandlerFunc(s.ProxyHandler)), + Handler: proxyHandler, TLSConfig: &tls.Config{ PreferServerCipherSuites: true, CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256}, diff --git a/local/project/config.go b/local/project/config.go index bcc61d23..175e1451 100644 --- a/local/project/config.go +++ b/local/project/config.go @@ -44,6 +44,7 @@ type Config struct { AllowHTTP bool `yaml:"allow_http"` NoTLS bool `yaml:"no_tls"` Daemon bool `yaml:"daemon"` + UseGzip bool `yaml:"use_gzip"` } type FileConfig struct { @@ -103,6 +104,11 @@ func NewConfigFromContext(c *console.Context, projectDir string) (*Config, *File if c.IsSet("daemon") { config.Daemon = c.Bool("daemon") } + + if c.IsSet("use-gzip") { + config.UseGzip = c.Bool("use-gzip") + } + return config, fileConfig, nil } diff --git a/local/project/project.go b/local/project/project.go index cd099862..6fcb0c88 100644 --- a/local/project/project.go +++ b/local/project/project.go @@ -60,6 +60,7 @@ func New(c *Config) (*Project, error) { Logger: c.Logger, PKCS12: c.PKCS12, AllowHTTP: c.AllowHTTP, + UseGzip: c.UseGzip, Appversion: c.AppVersion, }, } From ddda06880801fb2785b273e577f53b8b749a613d Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 14 Oct 2022 11:28:33 -0400 Subject: [PATCH 036/466] Allow environment expansion in Docker Compose file when running `local:new` --- commands/local_new.go | 2 +- commands/local_new_test.go | 6 ++++-- commands/testdata/postgresql/10/docker-compose.yml | 2 +- .../testdata/postgresql/{14 => next}/docker-compose.yml | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) rename commands/testdata/postgresql/{14 => next}/docker-compose.yml (54%) diff --git a/commands/local_new.go b/commands/local_new.go index 91e1a848..e1d8f9ed 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -270,7 +270,7 @@ func parseCLIServices(services []string) ([]*CloudService, error) { func parseDockerComposeServices(dir string) []*CloudService { var cloudServices []*CloudService - options, err := compose.NewProjectOptions(nil, compose.WithWorkingDirectory(dir), compose.WithDefaultConfigPath, compose.WithConfigFileEnv) + options, err := compose.NewProjectOptions(nil, compose.WithWorkingDirectory(dir), compose.WithDefaultConfigPath, compose.WithConfigFileEnv, compose.WithEnv(os.Environ())) if err != nil { return nil } diff --git a/commands/local_new_test.go b/commands/local_new_test.go index f19d3a85..12b4a8ea 100644 --- a/commands/local_new_test.go +++ b/commands/local_new_test.go @@ -21,6 +21,8 @@ package commands import ( "testing" + + "github.com/symfony-cli/symfony-cli/local/platformsh" ) func TestParseDockerComposeServices(t *testing.T) { @@ -28,7 +30,7 @@ func TestParseDockerComposeServices(t *testing.T) { "testdata/postgresql/noversion/": { Name: "database", Type: "postgresql", - Version: "13", + Version: platformsh.ServiceLastVersion("postgresql"), }, "testdata/postgresql/10/": { Name: "database", @@ -38,7 +40,7 @@ func TestParseDockerComposeServices(t *testing.T) { "testdata/postgresql/14/": { Name: "database", Type: "postgresql", - Version: "13", + Version: platformsh.ServiceLastVersion("postgresql"), }, } { result := parseDockerComposeServices(dir) diff --git a/commands/testdata/postgresql/10/docker-compose.yml b/commands/testdata/postgresql/10/docker-compose.yml index c310679e..aef31ffe 100644 --- a/commands/testdata/postgresql/10/docker-compose.yml +++ b/commands/testdata/postgresql/10/docker-compose.yml @@ -2,6 +2,6 @@ version: '3' services: database: - image: postgres:${POSTGRES_VERSION:-10}-alpine + image: postgres:10-alpine ports: - "5432" diff --git a/commands/testdata/postgresql/14/docker-compose.yml b/commands/testdata/postgresql/next/docker-compose.yml similarity index 54% rename from commands/testdata/postgresql/14/docker-compose.yml rename to commands/testdata/postgresql/next/docker-compose.yml index 6865a169..4decd7ae 100644 --- a/commands/testdata/postgresql/14/docker-compose.yml +++ b/commands/testdata/postgresql/next/docker-compose.yml @@ -2,6 +2,6 @@ version: '3' services: database: - image: postgres:${POSTGRES_VERSION:-14}-alpine + image: postgres:14-alpine ports: - "5432" From f7684986da3b4156b6968d04aa9d138b446ad4af Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 14 Oct 2022 11:29:48 -0400 Subject: [PATCH 037/466] Fix TestParseDockerComposeServices test by making it more resilient to PSH services upgrades --- commands/local_new_test.go | 19 +++++++++++++++---- .../postgresql/next/docker-compose.yml | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/commands/local_new_test.go b/commands/local_new_test.go index 12b4a8ea..55882710 100644 --- a/commands/local_new_test.go +++ b/commands/local_new_test.go @@ -20,27 +20,38 @@ package commands import ( + "os" + "strconv" "testing" - + "github.com/symfony-cli/symfony-cli/local/platformsh" ) func TestParseDockerComposeServices(t *testing.T) { + lastVersion := platformsh.ServiceLastVersion("postgresql") + + if n, err := strconv.Atoi(lastVersion); err != nil { + t.Error("Could not generate test cases:", err) + } else { + os.Setenv("POSTGRES_NEXT_VERSION", strconv.Itoa(n+1)) + defer os.Unsetenv("POSTGRES_NEXT_VERSION") + } + for dir, expected := range map[string]CloudService{ "testdata/postgresql/noversion/": { Name: "database", Type: "postgresql", - Version: platformsh.ServiceLastVersion("postgresql"), + Version: lastVersion, }, "testdata/postgresql/10/": { Name: "database", Type: "postgresql", Version: "10", }, - "testdata/postgresql/14/": { + "testdata/postgresql/next/": { Name: "database", Type: "postgresql", - Version: platformsh.ServiceLastVersion("postgresql"), + Version: lastVersion, }, } { result := parseDockerComposeServices(dir) diff --git a/commands/testdata/postgresql/next/docker-compose.yml b/commands/testdata/postgresql/next/docker-compose.yml index 4decd7ae..3653de2d 100644 --- a/commands/testdata/postgresql/next/docker-compose.yml +++ b/commands/testdata/postgresql/next/docker-compose.yml @@ -2,6 +2,6 @@ version: '3' services: database: - image: postgres:14-alpine + image: postgres:${POSTGRES_NEXT_VERSION}-alpine ports: - "5432" From 5616323dc5ef2049b920c030a99dffef43111cd2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Oct 2022 08:25:33 +0000 Subject: [PATCH 038/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 07717868..e061420f 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -217,7 +217,7 @@ var availableServices = []*service{ Type: "postgresql", Versions: serviceVersions{ Deprecated: []string{"9.3", "9.4", "9.5", "9.6"}, - Supported: []string{"10", "11", "12", "13"}, + Supported: []string{"10", "11", "12", "13", "14"}, }, }, { From 4da01301683d8a95b8f68d1e57187695f8e59bc6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Oct 2022 16:22:29 +0000 Subject: [PATCH 039/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 098d0f10..28a6b43f 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -857,6 +857,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "lines",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "tail",}, @@ -959,6 +960,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "recursive", Aliases: []string{"r"},}, &console.StringFlag{Name: "worker",}, @@ -988,6 +990,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "worker",}, @@ -1043,6 +1046,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "port",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "worker",}, @@ -1270,6 +1274,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "include",}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "mount", Aliases: []string{"m"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, @@ -1293,6 +1298,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.BoolFlag{Name: "no-header",}, &console.BoolFlag{Name: "paths",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -1315,6 +1321,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, @@ -1336,6 +1343,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "include",}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "mount", Aliases: []string{"m"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, From a6db613416b4ab7d971d0b0e879305a970b97c17 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:21:48 +0000 Subject: [PATCH 040/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 28a6b43f..73b0cfd8 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1121,24 +1121,32 @@ var Commands = []*console.Command{ }, Usage: "Add an integration to the project", Flags: []console.Flag{ + &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix",}, + &console.StringFlag{Name: "auth-token",}, &console.StringFlag{Name: "base-url",}, &console.BoolFlag{Name: "build-draft-pull-requests", DefaultValue: true,}, &console.BoolFlag{Name: "build-merge-requests", DefaultValue: true,}, &console.BoolFlag{Name: "build-pull-requests", DefaultValue: true,}, &console.BoolFlag{Name: "build-pull-requests-post-merge",}, &console.BoolFlag{Name: "build-wip-merge-requests", DefaultValue: true,}, + &console.StringFlag{Name: "category",}, &console.StringFlag{Name: "channel",}, &console.StringFlag{Name: "environments",}, &console.StringFlag{Name: "events",}, &console.StringFlag{Name: "excluded-environments",}, + &console.StringFlag{Name: "facility",}, &console.BoolFlag{Name: "fetch-branches", DefaultValue: true,}, &console.StringFlag{Name: "file",}, &console.StringFlag{Name: "from-address",}, &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "index",}, &console.StringFlag{Name: "key",}, + &console.StringFlag{Name: "license-key",}, &console.BoolFlag{Name: "merge-requests-clone-parent-data", DefaultValue: true,}, + &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "protocol", DefaultValue: "udp",}, &console.BoolFlag{Name: "prune-branches", DefaultValue: true,}, &console.BoolFlag{Name: "pull-requests-clone-parent-data", DefaultValue: true,}, &console.StringFlag{Name: "recipients",}, @@ -1148,11 +1156,15 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "secret",}, &console.StringFlag{Name: "server-project",}, &console.StringFlag{Name: "shared-key",}, + &console.StringFlag{Name: "sourcetype",}, &console.StringFlag{Name: "states",}, + &console.StringFlag{Name: "syslog-host", DefaultValue: "localhost",}, + &console.StringFlag{Name: "syslog-port",}, &console.StringFlag{Name: "token",}, &console.StringFlag{Name: "type",}, &console.StringFlag{Name: "url",}, &console.StringFlag{Name: "username",}, + &console.BoolFlag{Name: "verify-tls", DefaultValue: true,}, &console.BoolFlag{Name: "wait",}, }, }, @@ -1211,24 +1223,32 @@ var Commands = []*console.Command{ }, Usage: "Update an integration", Flags: []console.Flag{ + &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix",}, + &console.StringFlag{Name: "auth-token",}, &console.StringFlag{Name: "base-url",}, &console.BoolFlag{Name: "build-draft-pull-requests", DefaultValue: true,}, &console.BoolFlag{Name: "build-merge-requests", DefaultValue: true,}, &console.BoolFlag{Name: "build-pull-requests", DefaultValue: true,}, &console.BoolFlag{Name: "build-pull-requests-post-merge",}, &console.BoolFlag{Name: "build-wip-merge-requests", DefaultValue: true,}, + &console.StringFlag{Name: "category",}, &console.StringFlag{Name: "channel",}, &console.StringFlag{Name: "environments",}, &console.StringFlag{Name: "events",}, &console.StringFlag{Name: "excluded-environments",}, + &console.StringFlag{Name: "facility",}, &console.BoolFlag{Name: "fetch-branches", DefaultValue: true,}, &console.StringFlag{Name: "file",}, &console.StringFlag{Name: "from-address",}, &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "index",}, &console.StringFlag{Name: "key",}, + &console.StringFlag{Name: "license-key",}, &console.BoolFlag{Name: "merge-requests-clone-parent-data", DefaultValue: true,}, + &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "protocol", DefaultValue: "udp",}, &console.BoolFlag{Name: "prune-branches", DefaultValue: true,}, &console.BoolFlag{Name: "pull-requests-clone-parent-data", DefaultValue: true,}, &console.StringFlag{Name: "recipients",}, @@ -1238,11 +1258,15 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "secret",}, &console.StringFlag{Name: "server-project",}, &console.StringFlag{Name: "shared-key",}, + &console.StringFlag{Name: "sourcetype",}, &console.StringFlag{Name: "states",}, + &console.StringFlag{Name: "syslog-host", DefaultValue: "localhost",}, + &console.StringFlag{Name: "syslog-port",}, &console.StringFlag{Name: "token",}, &console.StringFlag{Name: "type",}, &console.StringFlag{Name: "url",}, &console.StringFlag{Name: "username",}, + &console.BoolFlag{Name: "verify-tls", DefaultValue: true,}, &console.BoolFlag{Name: "wait",}, }, }, @@ -1258,6 +1282,33 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, + { + Category: "cloud:metrics", + Name: "disk-usage", + Aliases: []*console.Alias{ + {Name: "metrics:disk-usage", Hidden: true}, + {Name: "cloud:disk"}, + {Name: "disk", Hidden: true}, + }, + Usage: "[ ALPHA ] Show disk usage on a service", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, + &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "range", Aliases: []string{"r"},}, + &console.StringFlag{Name: "service", Aliases: []string{"s"},}, + &console.StringFlag{Name: "to",}, + &console.StringFlag{Name: "type",}, + }, + }, { Category: "cloud:mount", Name: "download", From b54f0219c7175fd3f2110e4bad04797c73818399 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 27 Oct 2022 08:15:04 +0000 Subject: [PATCH 041/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index e061420f..07717868 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -217,7 +217,7 @@ var availableServices = []*service{ Type: "postgresql", Versions: serviceVersions{ Deprecated: []string{"9.3", "9.4", "9.5", "9.6"}, - Supported: []string{"10", "11", "12", "13", "14"}, + Supported: []string{"10", "11", "12", "13"}, }, }, { From 0d5967bf5ba78dfe8eda03b0847cd0d29ce895af Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Fri, 28 Oct 2022 07:15:09 +0000 Subject: [PATCH 042/466] fix: comments --- commands/local_server_start.go | 2 +- local/http/http.go | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index ceb47892..9b2e0fde 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -67,7 +67,7 @@ var localServerStartCmd = &console.Command{ &console.BoolFlag{Name: "no-humanize", Usage: "Do not format JSON logs"}, &console.StringFlag{Name: "p12", Usage: "Name of the file containing the TLS certificate to use in p12 format"}, &console.BoolFlag{Name: "no-tls", Usage: "Use HTTP instead of HTTPS"}, - &console.BoolFlag{Name: "use-gzip", Usage: "Use GZIP", DefaultValue: false}, + &console.BoolFlag{Name: "use-gzip", Usage: "Use GZIP"}, }, Action: func(c *console.Context) error { ui := terminal.SymfonyStyle(terminal.Stdout, terminal.Stdin) diff --git a/local/http/http.go b/local/http/http.go index 7853f6dc..dae7aed8 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -66,9 +66,13 @@ var gzipContentTypes = []string{ "text/csv", "text/javascript", "text/css", + "text/xml", "application/json", "application/javascript", "application/vnd.api+json", + "application/atom+xml", + "application/rss+xml", + "image/svg+xml", } // Start starts the server @@ -79,17 +83,17 @@ func (s *Server) Start(errChan chan error) (int, error) { } s.serverPort = strconv.Itoa(port) - gzipWrapper, err := gziphandler.GzipHandlerWithOpts(gziphandler.ContentTypes(gzipContentTypes)) - - if err != nil { - return port, err - } - var proxyHandler http.Handler proxyHandler = http.HandlerFunc(s.ProxyHandler) if s.UseGzip { + gzipWrapper, err := gziphandler.GzipHandlerWithOpts(gziphandler.ContentTypes(gzipContentTypes)) + + if err != nil { + return port, errors.WithStack(err) + } + proxyHandler = gzipWrapper(proxyHandler) } From 1cfd9767784713fa18446c812afafbf50179c190 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 28 Oct 2022 10:05:19 +0200 Subject: [PATCH 043/466] Bump deps --- go.mod | 32 +++++++++++----------- go.sum | 68 +++++++++++++++++++++++----------------------- local/http/http.go | 2 -- 3 files changed, 50 insertions(+), 52 deletions(-) diff --git a/go.mod b/go.mod index ab61cc3d..9e36f098 100644 --- a/go.mod +++ b/go.mod @@ -2,9 +2,9 @@ module github.com/symfony-cli/symfony-cli require ( github.com/compose-spec/compose-go v1.6.0 - github.com/docker/docker v20.10.18+incompatible - github.com/elazarl/goproxy v0.0.0-20220901064549-fbd10ff4f5a1 - github.com/fabpot/local-php-security-checker/v2 v2.0.4 + github.com/docker/docker v20.10.21+incompatible + github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 + github.com/fabpot/local-php-security-checker/v2 v2.0.5 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru v0.5.4 @@ -24,7 +24,7 @@ require ( github.com/symfony-cli/phpstore v1.0.5 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 - golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 + golang.org/x/sync v0.1.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) @@ -32,17 +32,17 @@ require ( require ( github.com/Microsoft/go-winio v0.6.0 // indirect github.com/NYTimes/gziphandler v1.1.1 - github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31 // indirect + github.com/distribution/distribution/v3 v3.0.0-20221028072015-7f9f86c4116f // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.13 // indirect - github.com/kr/pretty v0.3.0 // indirect + github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -53,7 +53,7 @@ require ( github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc1 // indirect + github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect @@ -68,14 +68,14 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.0.0-20220927171203-f486391704dc // indirect - golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect - golang.org/x/term v0.0.0-20220919170432-7a66f970e087 // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect - golang.org/x/tools v0.1.12 // indirect + golang.org/x/crypto v0.1.0 // indirect + golang.org/x/mod v0.6.0 // indirect + golang.org/x/net v0.1.0 // indirect + golang.org/x/sys v0.1.0 // indirect + golang.org/x/term v0.1.0 // indirect + golang.org/x/text v0.4.0 // indirect + golang.org/x/time v0.1.0 // indirect + golang.org/x/tools v0.2.0 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect diff --git a/go.sum b/go.sum index 08f8d291..89a7de8a 100644 --- a/go.sum +++ b/go.sum @@ -60,18 +60,18 @@ github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31 h1:AqcwAyaSEkILnr/bLybFnM2i/+EW67JJIRs/4dWmzxo= -github.com/distribution/distribution/v3 v3.0.0-20220907155224-78b9c98c5c31/go.mod h1:XrR+08YQxO57vT8gtNmhLfHy/YIutMmmEeKMhU7zXqY= +github.com/distribution/distribution/v3 v3.0.0-20221028072015-7f9f86c4116f h1:pKjrBVsV6tDvEQ47t6J69/K0ipsGqXbDXjrMSjVU1jI= +github.com/distribution/distribution/v3 v3.0.0-20221028072015-7f9f86c4116f/go.mod h1:6rIc5NMSjXjjnwzWWy3HAm9gDBu+X7aCzL8VrHIKgxM= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.18+incompatible h1:SN84VYXTBNGn92T/QwIRPlum9zfemfitN7pbsp26WSc= -github.com/docker/docker v20.10.18+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog= +github.com/docker/docker v20.10.21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20220901064549-fbd10ff4f5a1 h1:ecIiM5NYeEOhy5trm8xel6wpUhYH+QWteUKnwcbCMl4= -github.com/elazarl/goproxy v0.0.0-20220901064549-fbd10ff4f5a1/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0= +github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -80,13 +80,13 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fabpot/local-php-security-checker/v2 v2.0.4 h1:pCP5LPW+6jTXvtaLef07x6W8NLo6tuSih616mQ9I3PA= -github.com/fabpot/local-php-security-checker/v2 v2.0.4/go.mod h1:YOYs9Zbva+kkuQB8EjBj+lgdgf5+CkyT4xfc3mP1oLc= +github.com/fabpot/local-php-security-checker/v2 v2.0.5 h1:789JcXy4sZdgQNVFiMQvttkxEH5588HIUt1GGIqYlO4= +github.com/fabpot/local-php-security-checker/v2 v2.0.5/go.mod h1:YOYs9Zbva+kkuQB8EjBj+lgdgf5+CkyT4xfc3mP1oLc= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 h1:R2K7yLHPmwoTdmNuQ5Wfm0/evh/+QFdoI6EbW3OSMKw= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76/go.mod h1:jr1MMO0KsDD+PQ57K7oJGk97TLYtbhLUOjCS577Ddm4= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -176,8 +176,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -207,14 +207,15 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc1 h1:lfG+OTa7V8PD3PKvkocSG9KAcA9MANqJn53m31Fvwkc= -github.com/opencontainers/image-spec v1.1.0-rc1/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -227,7 +228,6 @@ github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= @@ -300,8 +300,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be h1:fmw3UbQh+nxngCAHrDCCztao/kbYFnWjoqop8dHx05A= -golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -335,8 +335,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -370,8 +370,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220927171203-f486391704dc h1:FxpXZdoBqT8RjqTy6i1E8nXHhW21wK7ptQ/EPIGxzPQ= -golang.org/x/net v0.0.0-20220927171203-f486391704dc/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -391,8 +391,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 h1:cu5kTvlzcw1Q5S9f5ip1/cpiB4nXvw1XYzFPGgzLUOY= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -432,14 +432,14 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI= -golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20220919170432-7a66f970e087 h1:tPwmk4vmvVCMdr98VgL4JH+qZxPL8fqlUOHnyOM8N3w= -golang.org/x/term v0.0.0-20220919170432-7a66f970e087/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -447,13 +447,13 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -504,8 +504,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= 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= diff --git a/local/http/http.go b/local/http/http.go index dae7aed8..a907d1d3 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -89,11 +89,9 @@ func (s *Server) Start(errChan chan error) (int, error) { if s.UseGzip { gzipWrapper, err := gziphandler.GzipHandlerWithOpts(gziphandler.ContentTypes(gzipContentTypes)) - if err != nil { return port, errors.WithStack(err) } - proxyHandler = gzipWrapper(proxyHandler) } From d12bcd4e129032943da03bf603a31f3fb0800ef8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 31 Oct 2022 16:37:17 +0100 Subject: [PATCH 044/466] Give more visibility to Cloudsmith --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 0039c10c..198d9965 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,16 @@ Security Issues If you discover a security vulnerability, please follow our [disclosure procedure][11]. +Sponsorship [](https://cloudsmith.io/) +----------- + +Package repository hosting is graciously provided by +[cloudsmith](https://cloudsmith.io/). Cloudsmith is the only fully hosted, +cloud-native, universal package management solution, that enables your +organization to create, store and share packages in any format, to any place, +with total confidence. We believe there’s a better way to manage software +assets and packages, and they're making it happen! + [1]: https://symfony.com/download [2]: https://symfony.com/doc/current/setup.html#creating-symfony-applications [3]: https://symfony.com/doc/current/setup/symfony_server.html From 67dd666e62835327ab5bf52966221d9bf88263ab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 08:14:17 +0000 Subject: [PATCH 045/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 73b0cfd8..ef1238fc 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1146,7 +1146,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "protocol", DefaultValue: "udp",}, + &console.StringFlag{Name: "protocol", DefaultValue: "tls",}, &console.BoolFlag{Name: "prune-branches", DefaultValue: true,}, &console.BoolFlag{Name: "pull-requests-clone-parent-data", DefaultValue: true,}, &console.StringFlag{Name: "recipients",}, @@ -1158,7 +1158,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "shared-key",}, &console.StringFlag{Name: "sourcetype",}, &console.StringFlag{Name: "states",}, - &console.StringFlag{Name: "syslog-host", DefaultValue: "localhost",}, + &console.StringFlag{Name: "syslog-host",}, &console.StringFlag{Name: "syslog-port",}, &console.StringFlag{Name: "token",}, &console.StringFlag{Name: "type",}, @@ -1248,7 +1248,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "protocol", DefaultValue: "udp",}, + &console.StringFlag{Name: "protocol", DefaultValue: "tls",}, &console.BoolFlag{Name: "prune-branches", DefaultValue: true,}, &console.BoolFlag{Name: "pull-requests-clone-parent-data", DefaultValue: true,}, &console.StringFlag{Name: "recipients",}, @@ -1260,7 +1260,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "shared-key",}, &console.StringFlag{Name: "sourcetype",}, &console.StringFlag{Name: "states",}, - &console.StringFlag{Name: "syslog-host", DefaultValue: "localhost",}, + &console.StringFlag{Name: "syslog-host",}, &console.StringFlag{Name: "syslog-port",}, &console.StringFlag{Name: "token",}, &console.StringFlag{Name: "type",}, From ac39841bbb4c3ef6023feb123aae37f995e0efc2 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 3 Nov 2022 16:22:34 -0400 Subject: [PATCH 046/466] ci: always run `gorelease build` except for tags --- .github/workflows/releaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index ab2c0c1e..400b62f2 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -61,7 +61,7 @@ jobs: name: Run GoReleaser for snapshot uses: goreleaser/goreleaser-action@v2 # only for PRs and push on branches - if: startsWith(github.ref, 'refs/heads/') + if: ${{ !startsWith(github.ref, 'refs/tags/v') }} with: version: latest args: build --rm-dist --snapshot From 2239ab20d6930b2c7d3050f4504a5325d8a70bc1 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 3 Nov 2022 17:23:53 -0400 Subject: [PATCH 047/466] ci: run `goreleaser release` instead of `build` for PR that way we also test packaging which is handy for PR updating it --- .github/workflows/releaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 400b62f2..92af8875 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -64,7 +64,7 @@ jobs: if: ${{ !startsWith(github.ref, 'refs/tags/v') }} with: version: latest - args: build --rm-dist --snapshot + args: release --rm-dist --snapshot --skip-publish --skip-sign env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From ace4129db8d03e8c57d488254e5266870539c033 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Nov 2022 12:19:37 +0000 Subject: [PATCH 048/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 07717868..20aff8e6 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -251,8 +251,8 @@ var availableServices = []*service{ { Type: "vault-kms", Versions: serviceVersions{ - Deprecated: []string{}, - Supported: []string{"1.6", "1.8"}, + Deprecated: []string{"1.6", "1.8"}, + Supported: []string{"1.12"}, }, }, } From 6ac1b44ea5a13de549f1e4e87ee92d488d6e9bdb Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Mon, 31 Oct 2022 13:06:24 +0000 Subject: [PATCH 049/466] Add Docker image releasing (ghcr.io/symfony-cli/symfony-cli) --- .github/workflows/releaser.yml | 5 +++++ .goreleaser.yml | 9 +++++++++ Dockerfile | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 92af8875..c404906e 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -7,6 +7,7 @@ on: permissions: contents: write id-token: write + packages: write jobs: releaser: @@ -18,6 +19,10 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + + - name: Login into Github Docker Registery + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Set up Go uses: actions/setup-go@v2 diff --git a/.goreleaser.yml b/.goreleaser.yml index 44f34202..d9a17c2d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -113,3 +113,12 @@ nfpms: - rpm recommends: - git + +dockers: + - image_templates: + - "ghcr.io/symfony-cli/symfony-cli:{{ .Tag }}" + - "ghcr.io/symfony-cli/symfony-cli:v{{ .Major }}" + - "ghcr.io/symfony-cli/symfony-cli:v{{ .Major }}.{{ .Minor }}" + - "ghcr.io/symfony-cli/symfony-cli:latest" + build_flag_templates: + - "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..c2383bc0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM scratch + +COPY symfony /usr/local/bin/ +ENTRYPOINT ["/usr/local/bin/symfony"] From cecd313c4a770d86bf1965ad7cfe57465dc69ceb Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 3 Nov 2022 15:32:12 -0400 Subject: [PATCH 050/466] Add multiarch (amd64/arm64) support for Docker images --- .github/workflows/releaser.yml | 10 +++++++++- .goreleaser.yml | 31 ++++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index c404906e..172da40f 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -13,6 +13,9 @@ jobs: releaser: name: Release runs-on: ubuntu-latest + env: + # We need to set DOCKER_CLI_EXPERIMENTAL=enabled for the docker manifest commands to work + DOCKER_CLI_EXPERIMENTAL: "enabled" steps: - name: Checkout @@ -20,8 +23,13 @@ jobs: with: fetch-depth: 0 - - name: Login into Github Docker Registery + # We need QEMU to use buildx and be able to build ARM Docker images + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Login into Github Docker Registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + if: startsWith(github.ref, 'refs/tags/v') - name: Set up Go diff --git a/.goreleaser.yml b/.goreleaser.yml index d9a17c2d..0a3f3b6b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -115,10 +115,31 @@ nfpms: - git dockers: - - image_templates: - - "ghcr.io/symfony-cli/symfony-cli:{{ .Tag }}" - - "ghcr.io/symfony-cli/symfony-cli:v{{ .Major }}" - - "ghcr.io/symfony-cli/symfony-cli:v{{ .Major }}.{{ .Minor }}" - - "ghcr.io/symfony-cli/symfony-cli:latest" + - image_templates: [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-amd64" ] + goarch: amd64 + use: buildx build_flag_templates: + - "--platform=linux/amd64" - "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - image_templates: [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm64" ] + goarch: arm64 + use: buildx + build_flag_templates: + - "--platform=linux/arm64" + - "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.version={{.Version}}" + +docker_manifests: + - name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }} + image_templates: &docker_images + - ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-amd64 + - ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm64 + - name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:v{{ .Major }} + image_templates: *docker_images + - name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }} + image_templates: *docker_images + - name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:latest + image_templates: *docker_images From ae3265017ba64d1a0b493dd7dc9db1df3844a323 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 3 Nov 2022 15:43:03 -0400 Subject: [PATCH 051/466] Allow `security:check` to work in Docker images --- .goreleaser.yml | 2 ++ Dockerfile | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 0a3f3b6b..2abfd22b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -119,6 +119,7 @@ dockers: goarch: amd64 use: buildx build_flag_templates: + - "--pull" - "--platform=linux/amd64" - "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli" - "--label=org.opencontainers.image.created={{.Date}}" @@ -127,6 +128,7 @@ dockers: goarch: arm64 use: buildx build_flag_templates: + - "--pull" - "--platform=linux/arm64" - "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli" - "--label=org.opencontainers.image.created={{.Date}}" diff --git a/Dockerfile b/Dockerfile index c2383bc0..156db0cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,11 @@ -FROM scratch +FROM scratch as build + +COPY --from=composer:latest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY symfony /usr/local/bin/ + +FROM scratch + ENTRYPOINT ["/usr/local/bin/symfony"] + +COPY --from=build . . From 6d0e50b31e618b48e696dc243f4ac0179b3d2da5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 9 Nov 2022 16:02:05 +0000 Subject: [PATCH 052/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 20aff8e6..91c478b6 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -217,7 +217,7 @@ var availableServices = []*service{ Type: "postgresql", Versions: serviceVersions{ Deprecated: []string{"9.3", "9.4", "9.5", "9.6"}, - Supported: []string{"10", "11", "12", "13"}, + Supported: []string{"10", "11", "12", "13", "14"}, }, }, { From 9874a9036c6cd87312c61e7a52c278f08cc52a75 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 15 Nov 2022 10:05:32 +0100 Subject: [PATCH 053/466] Fix local domains are removed if `.symfony.local.yaml` exists Fix #221 --- commands/local_server_start.go | 2 +- local/project/config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 9b2e0fde..dec9123a 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -131,7 +131,7 @@ var localServerStartCmd = &console.Command{ if err != nil { return errors.WithStack(err) } - if fileConfig != nil { + if fileConfig != nil && fileConfig.Proxy != nil { if err := proxyConfig.ReplaceDirDomains(projectDir, fileConfig.Proxy.Domains); err != nil { return errors.WithStack(err) } diff --git a/local/project/config.go b/local/project/config.go index 175e1451..35848e20 100644 --- a/local/project/config.go +++ b/local/project/config.go @@ -48,7 +48,7 @@ type Config struct { } type FileConfig struct { - Proxy struct { + Proxy *struct { Domains []string `yaml:"domains"` } `yaml:"proxy"` HTTP *Config `yaml:"http"` From 0c8eaabdd7c0de663d87439b295030df5c82ae4d Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 16 Nov 2022 12:41:57 +0100 Subject: [PATCH 054/466] Fix table formatting when ANSI terminal links are present in the table --- commands/tablewriter_patch_ansi.go | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 commands/tablewriter_patch_ansi.go diff --git a/commands/tablewriter_patch_ansi.go b/commands/tablewriter_patch_ansi.go new file mode 100644 index 00000000..04ce10ce --- /dev/null +++ b/commands/tablewriter_patch_ansi.go @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +import ( + "regexp" + _ "unsafe" +) + +// Temporary workaround allowing github.com/olekukonko/tablewriter to properly +// format tables with rows containing ANSI terminal links. A PR +// (https://github.com/olekukonko/tablewriter/pull/206) has been opened +// upstream, but we don't know if and when it will be merged. This Go +// compilation directive allows to access the unexported variable and update it +// with what we submitted upstream. +// To be removed once the PR is merged and released. +// +//go:linkname tableAnsiEscapingRegexp github.com/olekukonko/tablewriter.ansi +var tableAnsiEscapingRegexp = regexp.MustCompile("\033(?:\\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]|\\]8;;.*?\033\\\\)") From 3931ee364b9a1d034711ef7c71a8710fe589765a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Nov 2022 12:16:22 +0000 Subject: [PATCH 055/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 406 ++++++++++++++++++++++++++++++++++- 1 file changed, 404 insertions(+), 2 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index ef1238fc..4d66b0c0 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -45,6 +45,9 @@ var Commands = []*console.Command{ Usage: "The Platform.sh Bot", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "parrot",}, &console.BoolFlag{Name: "party",}, }, @@ -57,13 +60,21 @@ var Commands = []*console.Command{ {Name: "cloud:cc"}, }, Usage: "Clear the CLI cache", + Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, + }, }, { Category: "cloud", Name: "docs", Usage: "Open the online documentation", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "browser",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, }, }, @@ -73,7 +84,10 @@ var Commands = []*console.Command{ Usage: "Migrate from the legacy file structure", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-backup",}, + &console.BoolFlag{Name: "no-interaction",}, }, }, { @@ -81,7 +95,10 @@ var Commands = []*console.Command{ Name: "multi", Usage: "Execute a command on multiple projects", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "continue",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "projects", Aliases: []string{"p"},}, &console.BoolFlag{Name: "reverse",}, &console.StringFlag{Name: "sort", DefaultValue: "title",}, @@ -92,9 +109,12 @@ var Commands = []*console.Command{ Name: "web", Usage: "Open the Web UI", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "browser",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, @@ -104,12 +124,22 @@ var Commands = []*console.Command{ Name: "welcome", Usage: "Welcome to Platform.sh", Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, + }, }, { Category: "cloud", Name: "winky", Usage: "", Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, + }, }, { Category: "cloud:activity", @@ -120,9 +150,12 @@ var Commands = []*console.Command{ Usage: "Cancel an activity", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "type",}, }, @@ -136,6 +169,7 @@ var Commands = []*console.Command{ Usage: "View detailed information on a single activity", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -143,7 +177,9 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, &console.StringFlag{Name: "result",}, @@ -164,6 +200,7 @@ var Commands = []*console.Command{ Usage: "Get a list of activities for an environment or project", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -172,7 +209,9 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, &console.StringFlag{Name: "limit",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "result",}, &console.StringFlag{Name: "start",}, @@ -189,11 +228,14 @@ var Commands = []*console.Command{ Usage: "Display the log for an activity", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "refresh",}, &console.StringFlag{Name: "result",}, @@ -211,6 +253,7 @@ var Commands = []*console.Command{ Usage: "Run an authenticated cURL request on the Platform.sh API", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "data", Aliases: []string{"d"},}, &console.BoolFlag{Name: "disable-compression",}, &console.BoolFlag{Name: "enable-glob",}, @@ -219,6 +262,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"},}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, &console.StringFlag{Name: "json",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, }, @@ -230,10 +275,13 @@ var Commands = []*console.Command{ }, Usage: "View the configuration of an app", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, &console.BoolFlag{Name: "refresh",}, @@ -249,11 +297,14 @@ var Commands = []*console.Command{ }, Usage: "List apps in the project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, @@ -265,6 +316,11 @@ var Commands = []*console.Command{ {Name: "auth:api-token-login", Hidden: true}, }, Usage: "Log in to Platform.sh using an API token", + Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, + }, }, { Category: "cloud:auth", @@ -276,8 +332,11 @@ var Commands = []*console.Command{ }, Usage: "Log in to Platform.sh via a browser", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "browser",}, &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, }, }, @@ -289,10 +348,13 @@ var Commands = []*console.Command{ }, Usage: "Display your account information", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-auto-login",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, &console.BoolFlag{Name: "refresh",}, }, @@ -308,6 +370,9 @@ var Commands = []*console.Command{ Usage: "Log out of Platform.sh", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "other",}, }, }, @@ -320,7 +385,10 @@ var Commands = []*console.Command{ Usage: "Obtain an OAuth 2 access token for requests to Platform.sh APIs", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "header", Aliases: []string{"H"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-warn", Aliases: []string{"W"},}, }, }, @@ -338,9 +406,12 @@ var Commands = []*console.Command{ }, Usage: "Make a backup of an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "live",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "unsafe",}, @@ -361,13 +432,16 @@ var Commands = []*console.Command{ }, Usage: "List available backups of an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "limit",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "start",}, }, @@ -384,9 +458,12 @@ var Commands = []*console.Command{ }, Usage: "Restore an environment backup", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "branch-from",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "target",}, @@ -401,10 +478,13 @@ var Commands = []*console.Command{ }, Usage: "Add an SSL certificate to the project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -418,7 +498,10 @@ var Commands = []*console.Command{ }, Usage: "Delete a certificate from the project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -432,8 +515,11 @@ var Commands = []*console.Command{ }, Usage: "View a certificate", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -450,6 +536,7 @@ var Commands = []*console.Command{ }, Usage: "List project certificates", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "domain",}, @@ -458,9 +545,11 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "ignore-expiry",}, &console.StringFlag{Name: "issuer",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-auto",}, &console.BoolFlag{Name: "no-expired",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "only-auto",}, &console.BoolFlag{Name: "only-expired",}, &console.BoolFlag{Name: "pipe-domains",}, @@ -475,12 +564,15 @@ var Commands = []*console.Command{ }, Usage: "Show commit details", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -495,13 +587,16 @@ var Commands = []*console.Command{ }, Usage: "List commits", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "limit",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -517,6 +612,7 @@ var Commands = []*console.Command{ }, Usage: "Create a local dump of the remote database", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "charset",}, &console.StringFlag{Name: "directory", Aliases: []string{"d"},}, @@ -526,6 +622,8 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "gzip", Aliases: []string{"z"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, &console.StringFlag{Name: "schema",}, @@ -543,6 +641,7 @@ var Commands = []*console.Command{ }, Usage: "Estimate the disk usage of a database", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.BoolFlag{Name: "cleanup", Aliases: []string{"C"},}, @@ -551,7 +650,9 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -568,10 +669,13 @@ var Commands = []*console.Command{ }, Usage: "Run SQL on the remote database", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "raw",}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -586,10 +690,13 @@ var Commands = []*console.Command{ }, Usage: "Add a new domain to the project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -603,7 +710,10 @@ var Commands = []*console.Command{ }, Usage: "Delete a domain from the project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -617,11 +727,14 @@ var Commands = []*console.Command{ }, Usage: "Show detailed information for a domain", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -636,10 +749,13 @@ var Commands = []*console.Command{ }, Usage: "Get a list of all domains", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -651,10 +767,13 @@ var Commands = []*console.Command{ }, Usage: "Update a domain", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -668,8 +787,11 @@ var Commands = []*console.Command{ }, Usage: "Activate an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "parent",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -686,11 +808,14 @@ var Commands = []*console.Command{ }, Usage: "Branch an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "force",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-clone-parent",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "title",}, @@ -708,7 +833,10 @@ var Commands = []*console.Command{ }, Usage: "Check out an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, }, }, { @@ -720,6 +848,7 @@ var Commands = []*console.Command{ Usage: "Run an authenticated cURL request on an environment's API", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "data", Aliases: []string{"d"},}, &console.BoolFlag{Name: "disable-compression",}, &console.BoolFlag{Name: "enable-glob",}, @@ -730,6 +859,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, &console.StringFlag{Name: "json",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, @@ -744,6 +875,7 @@ var Commands = []*console.Command{ }, Usage: "Delete one or more environments", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "delete-branch",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude",}, @@ -751,7 +883,9 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "inactive",}, &console.BoolFlag{Name: "merged",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-delete-branch",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "only-type", Aliases: []string{"t"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -770,10 +904,13 @@ var Commands = []*console.Command{ Usage: "Update HTTP access settings for an environment", Flags: []console.Flag{ &console.StringFlag{Name: "access",}, + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "auth",}, &console.StringFlag{Name: "enabled",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -789,12 +926,15 @@ var Commands = []*console.Command{ }, Usage: "Read or set properties for an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, @@ -809,8 +949,11 @@ var Commands = []*console.Command{ }, Usage: "Initialize an environment from a public Git repository", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "profile",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -829,11 +972,14 @@ var Commands = []*console.Command{ }, Usage: "Get a list of environments", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, &console.BoolFlag{Name: "no-inactive", Aliases: []string{"I"},}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "refresh",}, @@ -854,11 +1000,14 @@ var Commands = []*console.Command{ }, Usage: "Read an environment's logs", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "lines",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "tail",}, &console.StringFlag{Name: "worker",}, @@ -874,8 +1023,11 @@ var Commands = []*console.Command{ }, Usage: "Merge an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -894,13 +1046,16 @@ var Commands = []*console.Command{ Usage: "Push code to an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "activate",}, + &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "branch",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, &console.BoolFlag{Name: "force-with-lease",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-clone-parent",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "parent",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -920,8 +1075,11 @@ var Commands = []*console.Command{ }, Usage: "Redeploy an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -937,10 +1095,13 @@ var Commands = []*console.Command{ }, Usage: "Show an environment's relationships", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, &console.BoolFlag{Name: "refresh",}, @@ -956,11 +1117,14 @@ var Commands = []*console.Command{ }, Usage: "Copy files to and from current environment using scp", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "recursive", Aliases: []string{"r"},}, &console.StringFlag{Name: "worker",}, @@ -974,6 +1138,11 @@ var Commands = []*console.Command{ }, Usage: "Set the remote environment to map to a branch", Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, + }, }, { Category: "cloud:environment", @@ -986,11 +1155,14 @@ var Commands = []*console.Command{ Usage: "SSH to the current environment", Flags: []console.Flag{ &console.BoolFlag{Name: "all",}, + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "worker",}, @@ -1006,8 +1178,11 @@ var Commands = []*console.Command{ }, Usage: "Synchronize an environment's code and/or data from its parent", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "rebase",}, @@ -1024,9 +1199,12 @@ var Commands = []*console.Command{ }, Usage: "Get the public URLs of an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "browser",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, &console.BoolFlag{Name: "primary", Aliases: []string{"1"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -1042,11 +1220,14 @@ var Commands = []*console.Command{ }, Usage: "Open a tunnel to Xdebug on the environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "port",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "worker",}, @@ -1060,12 +1241,15 @@ var Commands = []*console.Command{ }, Usage: "View detailed information on a single integration activity", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -1082,6 +1266,7 @@ var Commands = []*console.Command{ }, Usage: "Get a list of activities for an integration", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1090,7 +1275,9 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, &console.StringFlag{Name: "limit",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "result",}, &console.StringFlag{Name: "start",}, @@ -1106,9 +1293,12 @@ var Commands = []*console.Command{ }, Usage: "Display the log for an integration activity", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "timestamps", Aliases: []string{"t"},}, }, @@ -1121,6 +1311,7 @@ var Commands = []*console.Command{ }, Usage: "Add an integration to the project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix",}, &console.StringFlag{Name: "auth-token",}, &console.StringFlag{Name: "base-url",}, @@ -1144,6 +1335,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "license-key",}, &console.BoolFlag{Name: "merge-requests-clone-parent-data", DefaultValue: true,}, &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "protocol", DefaultValue: "tls",}, @@ -1176,7 +1369,10 @@ var Commands = []*console.Command{ }, Usage: "Delete an integration from a project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -1190,10 +1386,13 @@ var Commands = []*console.Command{ }, Usage: "View details of an integration", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -1208,10 +1407,13 @@ var Commands = []*console.Command{ }, Usage: "View a list of project integration(s)", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1223,6 +1425,7 @@ var Commands = []*console.Command{ }, Usage: "Update an integration", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix",}, &console.StringFlag{Name: "auth-token",}, &console.StringFlag{Name: "base-url",}, @@ -1246,6 +1449,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "license-key",}, &console.BoolFlag{Name: "merge-requests-clone-parent-data", DefaultValue: true,}, &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "protocol", DefaultValue: "tls",}, @@ -1278,7 +1483,10 @@ var Commands = []*console.Command{ }, Usage: "Validate an existing integration", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1290,9 +1498,9 @@ var Commands = []*console.Command{ {Name: "cloud:disk"}, {Name: "disk", Hidden: true}, }, - Usage: "[ ALPHA ] Show disk usage on a service", - Hidden: console.Hide, + Usage: "Show disk usage on a service", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, @@ -1301,7 +1509,9 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "range", Aliases: []string{"r"},}, &console.StringFlag{Name: "service", Aliases: []string{"s"},}, @@ -1318,6 +1528,7 @@ var Commands = []*console.Command{ Usage: "Download files from a mount, using rsync", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.BoolFlag{Name: "delete",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1327,6 +1538,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "include",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "mount", Aliases: []string{"m"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, &console.BoolFlag{Name: "source-path",}, @@ -1344,13 +1557,16 @@ var Commands = []*console.Command{ }, Usage: "Get a list of mounts", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "paths",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, @@ -1365,6 +1581,7 @@ var Commands = []*console.Command{ }, Usage: "Check the disk usage of mounts", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns",}, @@ -1373,7 +1590,9 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, &console.StringFlag{Name: "worker",}, @@ -1387,6 +1606,7 @@ var Commands = []*console.Command{ }, Usage: "Upload files to a mount, using rsync", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.BoolFlag{Name: "delete",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1396,6 +1616,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "include",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "mount", Aliases: []string{"m"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, &console.StringFlag{Name: "source",}, @@ -1410,10 +1632,13 @@ var Commands = []*console.Command{ }, Usage: "View or change an organization's billing address", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1425,10 +1650,13 @@ var Commands = []*console.Command{ }, Usage: "View or change an organization's billing profile", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1440,9 +1668,12 @@ var Commands = []*console.Command{ }, Usage: "Create a new organization", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "country",}, &console.StringFlag{Name: "label",}, &console.StringFlag{Name: "name",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, }, }, { @@ -1454,6 +1685,7 @@ var Commands = []*console.Command{ Usage: "Run an authenticated cURL request on an organization's API", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "data", Aliases: []string{"d"},}, &console.BoolFlag{Name: "disable-compression",}, &console.BoolFlag{Name: "enable-glob",}, @@ -1462,6 +1694,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"},}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, &console.StringFlag{Name: "json",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, @@ -1474,6 +1708,9 @@ var Commands = []*console.Command{ }, Usage: "Delete an organization", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1485,10 +1722,13 @@ var Commands = []*console.Command{ }, Usage: "View or change organization details", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1504,10 +1744,13 @@ var Commands = []*console.Command{ }, Usage: "List organizations", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "my",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "reverse",}, &console.StringFlag{Name: "sort",}, }, @@ -1522,10 +1765,13 @@ var Commands = []*console.Command{ }, Usage: "List subscriptions within an organization", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "page",}, }, @@ -1538,6 +1784,9 @@ var Commands = []*console.Command{ }, Usage: "Invite a user to an organization", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "permission",}, }, @@ -1550,6 +1799,9 @@ var Commands = []*console.Command{ }, Usage: "Remove a user from an organization", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1561,10 +1813,13 @@ var Commands = []*console.Command{ }, Usage: "View an organization user", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -1579,10 +1834,13 @@ var Commands = []*console.Command{ }, Usage: "List organization users", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1594,6 +1852,9 @@ var Commands = []*console.Command{ }, Usage: "Update an organization user", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "permission",}, }, @@ -1606,7 +1867,10 @@ var Commands = []*console.Command{ }, Usage: "Clear a project's build cache", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1620,9 +1884,12 @@ var Commands = []*console.Command{ }, Usage: "Create a new project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "check-timeout",}, &console.StringFlag{Name: "default-branch", DefaultValue: "main",}, &console.StringFlag{Name: "environments",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-set-remote",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "plan", DefaultValue: "development",}, @@ -1642,6 +1909,7 @@ var Commands = []*console.Command{ Usage: "Run an authenticated cURL request on a project's API", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "data", Aliases: []string{"d"},}, &console.BoolFlag{Name: "disable-compression",}, &console.BoolFlag{Name: "enable-glob",}, @@ -1651,6 +1919,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, &console.StringFlag{Name: "json",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, @@ -1663,7 +1933,10 @@ var Commands = []*console.Command{ }, Usage: "Delete a project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1677,11 +1950,14 @@ var Commands = []*console.Command{ }, Usage: "Clone a project locally", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "build",}, &console.StringFlag{Name: "depth",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1695,11 +1971,14 @@ var Commands = []*console.Command{ }, Usage: "Read or set properties for a project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, @@ -1718,13 +1997,16 @@ var Commands = []*console.Command{ }, Usage: "Get a list of all active projects", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "my",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "page",}, &console.BoolFlag{Name: "pipe",}, @@ -1741,6 +2023,11 @@ var Commands = []*console.Command{ {Name: "project:set-remote", Hidden: true}, }, Usage: "Set the remote project for the current Git repository", + Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, + }, }, { Category: "cloud:repo", @@ -1750,9 +2037,12 @@ var Commands = []*console.Command{ }, Usage: "Read a file in the project repository", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1764,12 +2054,15 @@ var Commands = []*console.Command{ }, Usage: "List files in the project repository", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, &console.BoolFlag{Name: "directories", Aliases: []string{"d"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "files", Aliases: []string{"f"},}, &console.BoolFlag{Name: "git-style",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1783,9 +2076,12 @@ var Commands = []*console.Command{ }, Usage: "Read a directory or file in the project repository", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1797,12 +2093,15 @@ var Commands = []*console.Command{ }, Usage: "View detailed information about a route", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "id",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "primary", Aliases: []string{"1"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, @@ -1821,11 +2120,14 @@ var Commands = []*console.Command{ }, Usage: "List all routes for an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, @@ -1839,6 +2141,9 @@ var Commands = []*console.Command{ Usage: "Install or update CLI configuration files", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "shell-type",}, }, }, @@ -1852,8 +2157,11 @@ var Commands = []*console.Command{ Usage: "Update the CLI to the latest version", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "current-version",}, &console.StringFlag{Name: "manifest",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-major",}, &console.StringFlag{Name: "timeout",}, &console.BoolFlag{Name: "unstable",}, @@ -1869,11 +2177,14 @@ var Commands = []*console.Command{ }, Usage: "List services in the project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, @@ -1888,12 +2199,15 @@ var Commands = []*console.Command{ }, Usage: "Create a binary archive dump of data from MongoDB", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gzip", Aliases: []string{"z"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, &console.BoolFlag{Name: "stdout", Aliases: []string{"o"},}, @@ -1909,6 +2223,7 @@ var Commands = []*console.Command{ }, Usage: "Export data from MongoDB", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1916,6 +2231,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.BoolFlag{Name: "jsonArray",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, &console.StringFlag{Name: "type",}, @@ -1931,11 +2248,14 @@ var Commands = []*console.Command{ }, Usage: "Restore a binary archive dump of data into MongoDB", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -1950,11 +2270,14 @@ var Commands = []*console.Command{ }, Usage: "Use the MongoDB shell", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "eval",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -1969,10 +2292,13 @@ var Commands = []*console.Command{ }, Usage: "Access the Redis CLI", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -1985,6 +2311,11 @@ var Commands = []*console.Command{ }, Usage: "[ BETA ] Switch between sessions", Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, + }, }, { Category: "cloud:source-operation", @@ -1995,8 +2326,11 @@ var Commands = []*console.Command{ Usage: "[ BETA ] Run a source operation", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "variable",}, @@ -2012,7 +2346,10 @@ var Commands = []*console.Command{ Usage: "Display information about the current SSH certificate", Hidden: console.Hide, Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-refresh",}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -2025,8 +2362,11 @@ var Commands = []*console.Command{ }, Usage: "Generate an SSH certificate", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "new",}, &console.BoolFlag{Name: "new-key",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "refresh-only",}, }, }, @@ -2038,7 +2378,10 @@ var Commands = []*console.Command{ }, Usage: "Add a new SSH key", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "name",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, }, }, { @@ -2048,6 +2391,11 @@ var Commands = []*console.Command{ {Name: "ssh-key:delete", Hidden: true}, }, Usage: "Delete an SSH key", + Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, + }, }, { Category: "cloud:ssh-key", @@ -2059,9 +2407,12 @@ var Commands = []*console.Command{ }, Usage: "Get a list of SSH keys in your account", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, }, }, { @@ -2072,12 +2423,15 @@ var Commands = []*console.Command{ }, Usage: "Read or modify subscription properties", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "id", Aliases: []string{"s"},}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2090,9 +2444,12 @@ var Commands = []*console.Command{ Usage: "Close SSH tunnels", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2104,13 +2461,16 @@ var Commands = []*console.Command{ }, Usage: "View relationship info for SSH tunnels", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns",}, &console.BoolFlag{Name: "encode", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -2126,12 +2486,15 @@ var Commands = []*console.Command{ Usage: "List SSH tunnels", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2143,11 +2506,14 @@ var Commands = []*console.Command{ }, Usage: "Open SSH tunnels to an app's relationships", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2159,11 +2525,14 @@ var Commands = []*console.Command{ }, Usage: "Open a single SSH tunnel to an app relationship", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "port",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -2177,8 +2546,11 @@ var Commands = []*console.Command{ }, Usage: "Add a user to the project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "force-invite",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "role", Aliases: []string{"r"},}, @@ -2193,7 +2565,10 @@ var Commands = []*console.Command{ }, Usage: "Delete a user from the project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -2209,9 +2584,12 @@ var Commands = []*console.Command{ }, Usage: "View a user's role(s)", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -2229,10 +2607,13 @@ var Commands = []*console.Command{ }, Usage: "List project users", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2244,7 +2625,10 @@ var Commands = []*console.Command{ }, Usage: "Update user role(s) on a project", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "role", Aliases: []string{"r"},}, @@ -2259,6 +2643,7 @@ var Commands = []*console.Command{ }, Usage: "Create a variable", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "enabled", DefaultValue: true,}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, @@ -2266,6 +2651,8 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "json",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, &console.StringFlag{Name: "name",}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "prefix", DefaultValue: "none",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -2284,9 +2671,12 @@ var Commands = []*console.Command{ }, Usage: "Delete a variable", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -2302,12 +2692,15 @@ var Commands = []*console.Command{ }, Usage: "View a variable", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, @@ -2325,12 +2718,15 @@ var Commands = []*console.Command{ }, Usage: "List variables", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2342,12 +2738,15 @@ var Commands = []*console.Command{ }, Usage: "Update a variable", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "enabled", DefaultValue: true,}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "inheritable", DefaultValue: true,}, &console.BoolFlag{Name: "json",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, + &console.BoolFlag{Name: "no-ansi",}, + &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "sensitive",}, @@ -2367,11 +2766,14 @@ var Commands = []*console.Command{ }, Usage: "Get a list of all deployed workers", Flags: []console.Flag{ + &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, From 30d1c36139ad06b2bf1379bd39ad7b4129659043 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 16 Nov 2022 15:05:36 +0100 Subject: [PATCH 056/466] ci: make sure the binary can be run after any code update --- .github/workflows/go_generate_update.yml | 3 +++ .github/workflows/releaser.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/go_generate_update.yml b/.github/workflows/go_generate_update.yml index df171cb1..cbf6e28f 100644 --- a/.github/workflows/go_generate_update.yml +++ b/.github/workflows/go_generate_update.yml @@ -39,6 +39,9 @@ jobs: name: Test if: steps.git.outputs.gitstatus != '' run: go test -v ./... + - name: Validate build + if: steps.git.outputs.gitstatus != '' + run: go run . - name: Commit and push the update if: steps.git.outputs.gitstatus != '' diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 172da40f..71fc0f1c 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -67,6 +67,8 @@ jobs: - name: Test run: go test -v ./... + - name: Validate build + run: go run . - name: Set up cosign uses: sigstore/cosign-installer@v2.7.0 From 2e95c53861e2e4a10bcd17f8f31b766532e2436a Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 16 Nov 2022 15:27:04 +0100 Subject: [PATCH 057/466] Fix panic because of flags duplicated with the Platform.sh binary --- local/platformsh/commands.go | 403 ------------------------- local/platformsh/generator/commands.go | 24 +- 2 files changed, 21 insertions(+), 406 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 4d66b0c0..f5f005ec 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -45,9 +45,6 @@ var Commands = []*console.Command{ Usage: "The Platform.sh Bot", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "parrot",}, &console.BoolFlag{Name: "party",}, }, @@ -60,21 +57,13 @@ var Commands = []*console.Command{ {Name: "cloud:cc"}, }, Usage: "Clear the CLI cache", - Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, - }, }, { Category: "cloud", Name: "docs", Usage: "Open the online documentation", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "browser",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, }, }, @@ -84,10 +73,7 @@ var Commands = []*console.Command{ Usage: "Migrate from the legacy file structure", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-backup",}, - &console.BoolFlag{Name: "no-interaction",}, }, }, { @@ -95,10 +81,7 @@ var Commands = []*console.Command{ Name: "multi", Usage: "Execute a command on multiple projects", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "continue",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "projects", Aliases: []string{"p"},}, &console.BoolFlag{Name: "reverse",}, &console.StringFlag{Name: "sort", DefaultValue: "title",}, @@ -109,12 +92,9 @@ var Commands = []*console.Command{ Name: "web", Usage: "Open the Web UI", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "browser",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, @@ -124,22 +104,12 @@ var Commands = []*console.Command{ Name: "welcome", Usage: "Welcome to Platform.sh", Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, - }, }, { Category: "cloud", Name: "winky", Usage: "", Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, - }, }, { Category: "cloud:activity", @@ -150,12 +120,9 @@ var Commands = []*console.Command{ Usage: "Cancel an activity", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "type",}, }, @@ -169,7 +136,6 @@ var Commands = []*console.Command{ Usage: "View detailed information on a single activity", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -177,9 +143,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, &console.StringFlag{Name: "result",}, @@ -200,7 +164,6 @@ var Commands = []*console.Command{ Usage: "Get a list of activities for an environment or project", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -209,9 +172,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, &console.StringFlag{Name: "limit",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "result",}, &console.StringFlag{Name: "start",}, @@ -228,14 +189,11 @@ var Commands = []*console.Command{ Usage: "Display the log for an activity", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "refresh",}, &console.StringFlag{Name: "result",}, @@ -253,7 +211,6 @@ var Commands = []*console.Command{ Usage: "Run an authenticated cURL request on the Platform.sh API", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "data", Aliases: []string{"d"},}, &console.BoolFlag{Name: "disable-compression",}, &console.BoolFlag{Name: "enable-glob",}, @@ -262,8 +219,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"},}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, &console.StringFlag{Name: "json",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, }, @@ -275,13 +230,10 @@ var Commands = []*console.Command{ }, Usage: "View the configuration of an app", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, &console.BoolFlag{Name: "refresh",}, @@ -297,14 +249,11 @@ var Commands = []*console.Command{ }, Usage: "List apps in the project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, @@ -316,11 +265,6 @@ var Commands = []*console.Command{ {Name: "auth:api-token-login", Hidden: true}, }, Usage: "Log in to Platform.sh using an API token", - Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, - }, }, { Category: "cloud:auth", @@ -332,11 +276,8 @@ var Commands = []*console.Command{ }, Usage: "Log in to Platform.sh via a browser", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "browser",}, &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, }, }, @@ -348,13 +289,10 @@ var Commands = []*console.Command{ }, Usage: "Display your account information", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-auto-login",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, &console.BoolFlag{Name: "refresh",}, }, @@ -370,9 +308,6 @@ var Commands = []*console.Command{ Usage: "Log out of Platform.sh", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "other",}, }, }, @@ -385,10 +320,7 @@ var Commands = []*console.Command{ Usage: "Obtain an OAuth 2 access token for requests to Platform.sh APIs", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "header", Aliases: []string{"H"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-warn", Aliases: []string{"W"},}, }, }, @@ -406,12 +338,9 @@ var Commands = []*console.Command{ }, Usage: "Make a backup of an environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "live",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "unsafe",}, @@ -432,16 +361,13 @@ var Commands = []*console.Command{ }, Usage: "List available backups of an environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "limit",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "start",}, }, @@ -458,12 +384,9 @@ var Commands = []*console.Command{ }, Usage: "Restore an environment backup", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "branch-from",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "target",}, @@ -478,13 +401,10 @@ var Commands = []*console.Command{ }, Usage: "Add an SSL certificate to the project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -498,10 +418,7 @@ var Commands = []*console.Command{ }, Usage: "Delete a certificate from the project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -515,11 +432,8 @@ var Commands = []*console.Command{ }, Usage: "View a certificate", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -536,7 +450,6 @@ var Commands = []*console.Command{ }, Usage: "List project certificates", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "domain",}, @@ -545,11 +458,9 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "ignore-expiry",}, &console.StringFlag{Name: "issuer",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-auto",}, &console.BoolFlag{Name: "no-expired",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "only-auto",}, &console.BoolFlag{Name: "only-expired",}, &console.BoolFlag{Name: "pipe-domains",}, @@ -564,15 +475,12 @@ var Commands = []*console.Command{ }, Usage: "Show commit details", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -587,16 +495,13 @@ var Commands = []*console.Command{ }, Usage: "List commits", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "limit",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -612,7 +517,6 @@ var Commands = []*console.Command{ }, Usage: "Create a local dump of the remote database", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "charset",}, &console.StringFlag{Name: "directory", Aliases: []string{"d"},}, @@ -622,8 +526,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "gzip", Aliases: []string{"z"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, &console.StringFlag{Name: "schema",}, @@ -641,7 +543,6 @@ var Commands = []*console.Command{ }, Usage: "Estimate the disk usage of a database", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.BoolFlag{Name: "cleanup", Aliases: []string{"C"},}, @@ -650,9 +551,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -669,13 +568,10 @@ var Commands = []*console.Command{ }, Usage: "Run SQL on the remote database", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "raw",}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -690,13 +586,10 @@ var Commands = []*console.Command{ }, Usage: "Add a new domain to the project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -710,10 +603,7 @@ var Commands = []*console.Command{ }, Usage: "Delete a domain from the project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -727,14 +617,11 @@ var Commands = []*console.Command{ }, Usage: "Show detailed information for a domain", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -749,13 +636,10 @@ var Commands = []*console.Command{ }, Usage: "Get a list of all domains", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -767,13 +651,10 @@ var Commands = []*console.Command{ }, Usage: "Update a domain", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -787,11 +668,8 @@ var Commands = []*console.Command{ }, Usage: "Activate an environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "parent",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -808,14 +686,11 @@ var Commands = []*console.Command{ }, Usage: "Branch an environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "force",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-clone-parent",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "title",}, @@ -833,10 +708,7 @@ var Commands = []*console.Command{ }, Usage: "Check out an environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, }, }, { @@ -848,7 +720,6 @@ var Commands = []*console.Command{ Usage: "Run an authenticated cURL request on an environment's API", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "data", Aliases: []string{"d"},}, &console.BoolFlag{Name: "disable-compression",}, &console.BoolFlag{Name: "enable-glob",}, @@ -859,8 +730,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, &console.StringFlag{Name: "json",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, @@ -875,7 +744,6 @@ var Commands = []*console.Command{ }, Usage: "Delete one or more environments", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "delete-branch",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude",}, @@ -883,9 +751,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "inactive",}, &console.BoolFlag{Name: "merged",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-delete-branch",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "only-type", Aliases: []string{"t"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -904,13 +770,10 @@ var Commands = []*console.Command{ Usage: "Update HTTP access settings for an environment", Flags: []console.Flag{ &console.StringFlag{Name: "access",}, - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "auth",}, &console.StringFlag{Name: "enabled",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -926,15 +789,12 @@ var Commands = []*console.Command{ }, Usage: "Read or set properties for an environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, @@ -949,11 +809,8 @@ var Commands = []*console.Command{ }, Usage: "Initialize an environment from a public Git repository", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "profile",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -972,14 +829,11 @@ var Commands = []*console.Command{ }, Usage: "Get a list of environments", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, &console.BoolFlag{Name: "no-inactive", Aliases: []string{"I"},}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "refresh",}, @@ -1000,14 +854,11 @@ var Commands = []*console.Command{ }, Usage: "Read an environment's logs", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "lines",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "tail",}, &console.StringFlag{Name: "worker",}, @@ -1023,11 +874,8 @@ var Commands = []*console.Command{ }, Usage: "Merge an environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -1046,16 +894,13 @@ var Commands = []*console.Command{ Usage: "Push code to an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "activate",}, - &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "branch",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, &console.BoolFlag{Name: "force-with-lease",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-clone-parent",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "parent",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -1075,11 +920,8 @@ var Commands = []*console.Command{ }, Usage: "Redeploy an environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -1095,13 +937,10 @@ var Commands = []*console.Command{ }, Usage: "Show an environment's relationships", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, &console.BoolFlag{Name: "refresh",}, @@ -1117,14 +956,11 @@ var Commands = []*console.Command{ }, Usage: "Copy files to and from current environment using scp", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "recursive", Aliases: []string{"r"},}, &console.StringFlag{Name: "worker",}, @@ -1138,11 +974,6 @@ var Commands = []*console.Command{ }, Usage: "Set the remote environment to map to a branch", Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, - }, }, { Category: "cloud:environment", @@ -1155,14 +986,11 @@ var Commands = []*console.Command{ Usage: "SSH to the current environment", Flags: []console.Flag{ &console.BoolFlag{Name: "all",}, - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "worker",}, @@ -1178,11 +1006,8 @@ var Commands = []*console.Command{ }, Usage: "Synchronize an environment's code and/or data from its parent", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "rebase",}, @@ -1199,12 +1024,9 @@ var Commands = []*console.Command{ }, Usage: "Get the public URLs of an environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "browser",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, &console.BoolFlag{Name: "primary", Aliases: []string{"1"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -1220,14 +1042,11 @@ var Commands = []*console.Command{ }, Usage: "Open a tunnel to Xdebug on the environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "port",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "worker",}, @@ -1241,15 +1060,12 @@ var Commands = []*console.Command{ }, Usage: "View detailed information on a single integration activity", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -1266,7 +1082,6 @@ var Commands = []*console.Command{ }, Usage: "Get a list of activities for an integration", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1275,9 +1090,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, &console.StringFlag{Name: "limit",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "result",}, &console.StringFlag{Name: "start",}, @@ -1293,12 +1106,9 @@ var Commands = []*console.Command{ }, Usage: "Display the log for an integration activity", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "timestamps", Aliases: []string{"t"},}, }, @@ -1311,7 +1121,6 @@ var Commands = []*console.Command{ }, Usage: "Add an integration to the project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix",}, &console.StringFlag{Name: "auth-token",}, &console.StringFlag{Name: "base-url",}, @@ -1335,8 +1144,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "license-key",}, &console.BoolFlag{Name: "merge-requests-clone-parent-data", DefaultValue: true,}, &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "protocol", DefaultValue: "tls",}, @@ -1369,10 +1176,7 @@ var Commands = []*console.Command{ }, Usage: "Delete an integration from a project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -1386,13 +1190,10 @@ var Commands = []*console.Command{ }, Usage: "View details of an integration", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -1407,13 +1208,10 @@ var Commands = []*console.Command{ }, Usage: "View a list of project integration(s)", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1425,7 +1223,6 @@ var Commands = []*console.Command{ }, Usage: "Update an integration", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix",}, &console.StringFlag{Name: "auth-token",}, &console.StringFlag{Name: "base-url",}, @@ -1449,8 +1246,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "license-key",}, &console.BoolFlag{Name: "merge-requests-clone-parent-data", DefaultValue: true,}, &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "protocol", DefaultValue: "tls",}, @@ -1483,10 +1278,7 @@ var Commands = []*console.Command{ }, Usage: "Validate an existing integration", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1500,7 +1292,6 @@ var Commands = []*console.Command{ }, Usage: "Show disk usage on a service", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, @@ -1509,9 +1300,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "range", Aliases: []string{"r"},}, &console.StringFlag{Name: "service", Aliases: []string{"s"},}, @@ -1528,7 +1317,6 @@ var Commands = []*console.Command{ Usage: "Download files from a mount, using rsync", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.BoolFlag{Name: "delete",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1538,8 +1326,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "include",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "mount", Aliases: []string{"m"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, &console.BoolFlag{Name: "source-path",}, @@ -1557,16 +1343,13 @@ var Commands = []*console.Command{ }, Usage: "Get a list of mounts", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "paths",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, @@ -1581,7 +1364,6 @@ var Commands = []*console.Command{ }, Usage: "Check the disk usage of mounts", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns",}, @@ -1590,9 +1372,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, &console.StringFlag{Name: "worker",}, @@ -1606,7 +1386,6 @@ var Commands = []*console.Command{ }, Usage: "Upload files to a mount, using rsync", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.BoolFlag{Name: "delete",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1616,8 +1395,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "include",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "mount", Aliases: []string{"m"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, &console.StringFlag{Name: "source",}, @@ -1632,13 +1409,10 @@ var Commands = []*console.Command{ }, Usage: "View or change an organization's billing address", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1650,13 +1424,10 @@ var Commands = []*console.Command{ }, Usage: "View or change an organization's billing profile", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1668,12 +1439,9 @@ var Commands = []*console.Command{ }, Usage: "Create a new organization", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "country",}, &console.StringFlag{Name: "label",}, &console.StringFlag{Name: "name",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, }, }, { @@ -1685,7 +1453,6 @@ var Commands = []*console.Command{ Usage: "Run an authenticated cURL request on an organization's API", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "data", Aliases: []string{"d"},}, &console.BoolFlag{Name: "disable-compression",}, &console.BoolFlag{Name: "enable-glob",}, @@ -1694,8 +1461,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"},}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, &console.StringFlag{Name: "json",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, @@ -1708,9 +1473,6 @@ var Commands = []*console.Command{ }, Usage: "Delete an organization", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1722,13 +1484,10 @@ var Commands = []*console.Command{ }, Usage: "View or change organization details", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1744,13 +1503,10 @@ var Commands = []*console.Command{ }, Usage: "List organizations", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "my",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "reverse",}, &console.StringFlag{Name: "sort",}, }, @@ -1765,13 +1521,10 @@ var Commands = []*console.Command{ }, Usage: "List subscriptions within an organization", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "page",}, }, @@ -1784,9 +1537,6 @@ var Commands = []*console.Command{ }, Usage: "Invite a user to an organization", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "permission",}, }, @@ -1799,9 +1549,6 @@ var Commands = []*console.Command{ }, Usage: "Remove a user from an organization", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1813,13 +1560,10 @@ var Commands = []*console.Command{ }, Usage: "View an organization user", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -1834,13 +1578,10 @@ var Commands = []*console.Command{ }, Usage: "List organization users", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, @@ -1852,9 +1593,6 @@ var Commands = []*console.Command{ }, Usage: "Update an organization user", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "permission",}, }, @@ -1867,10 +1605,7 @@ var Commands = []*console.Command{ }, Usage: "Clear a project's build cache", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1884,12 +1619,9 @@ var Commands = []*console.Command{ }, Usage: "Create a new project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "check-timeout",}, &console.StringFlag{Name: "default-branch", DefaultValue: "main",}, &console.StringFlag{Name: "environments",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-set-remote",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "plan", DefaultValue: "development",}, @@ -1909,7 +1641,6 @@ var Commands = []*console.Command{ Usage: "Run an authenticated cURL request on a project's API", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "data", Aliases: []string{"d"},}, &console.BoolFlag{Name: "disable-compression",}, &console.BoolFlag{Name: "enable-glob",}, @@ -1919,8 +1650,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, &console.StringFlag{Name: "json",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "request", Aliases: []string{"X"},}, }, @@ -1933,10 +1662,7 @@ var Commands = []*console.Command{ }, Usage: "Delete a project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1950,14 +1676,11 @@ var Commands = []*console.Command{ }, Usage: "Clone a project locally", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "build",}, &console.StringFlag{Name: "depth",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1971,14 +1694,11 @@ var Commands = []*console.Command{ }, Usage: "Read or set properties for a project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, @@ -1997,16 +1717,13 @@ var Commands = []*console.Command{ }, Usage: "Get a list of all active projects", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "my",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "page",}, &console.BoolFlag{Name: "pipe",}, @@ -2023,11 +1740,6 @@ var Commands = []*console.Command{ {Name: "project:set-remote", Hidden: true}, }, Usage: "Set the remote project for the current Git repository", - Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, - }, }, { Category: "cloud:repo", @@ -2037,12 +1749,9 @@ var Commands = []*console.Command{ }, Usage: "Read a file in the project repository", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2054,15 +1763,12 @@ var Commands = []*console.Command{ }, Usage: "List files in the project repository", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, &console.BoolFlag{Name: "directories", Aliases: []string{"d"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "files", Aliases: []string{"f"},}, &console.BoolFlag{Name: "git-style",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2076,12 +1782,9 @@ var Commands = []*console.Command{ }, Usage: "Read a directory or file in the project repository", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2093,15 +1796,12 @@ var Commands = []*console.Command{ }, Usage: "View detailed information about a route", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "id",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "primary", Aliases: []string{"1"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, @@ -2120,14 +1820,11 @@ var Commands = []*console.Command{ }, Usage: "List all routes for an environment", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, @@ -2141,9 +1838,6 @@ var Commands = []*console.Command{ Usage: "Install or update CLI configuration files", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "shell-type",}, }, }, @@ -2157,11 +1851,8 @@ var Commands = []*console.Command{ Usage: "Update the CLI to the latest version", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "current-version",}, &console.StringFlag{Name: "manifest",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-major",}, &console.StringFlag{Name: "timeout",}, &console.BoolFlag{Name: "unstable",}, @@ -2177,14 +1868,11 @@ var Commands = []*console.Command{ }, Usage: "List services in the project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, @@ -2199,15 +1887,12 @@ var Commands = []*console.Command{ }, Usage: "Create a binary archive dump of data from MongoDB", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gzip", Aliases: []string{"z"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, &console.BoolFlag{Name: "stdout", Aliases: []string{"o"},}, @@ -2223,7 +1908,6 @@ var Commands = []*console.Command{ }, Usage: "Export data from MongoDB", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -2231,8 +1915,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.BoolFlag{Name: "jsonArray",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, &console.StringFlag{Name: "type",}, @@ -2248,14 +1930,11 @@ var Commands = []*console.Command{ }, Usage: "Restore a binary archive dump of data into MongoDB", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -2270,14 +1949,11 @@ var Commands = []*console.Command{ }, Usage: "Use the MongoDB shell", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "eval",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -2292,13 +1968,10 @@ var Commands = []*console.Command{ }, Usage: "Access the Redis CLI", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -2311,11 +1984,6 @@ var Commands = []*console.Command{ }, Usage: "[ BETA ] Switch between sessions", Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, - }, }, { Category: "cloud:source-operation", @@ -2326,11 +1994,8 @@ var Commands = []*console.Command{ Usage: "[ BETA ] Run a source operation", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "variable",}, @@ -2346,10 +2011,7 @@ var Commands = []*console.Command{ Usage: "Display information about the current SSH certificate", Hidden: console.Hide, Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-refresh",}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -2362,11 +2024,8 @@ var Commands = []*console.Command{ }, Usage: "Generate an SSH certificate", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "new",}, &console.BoolFlag{Name: "new-key",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "refresh-only",}, }, }, @@ -2378,10 +2037,7 @@ var Commands = []*console.Command{ }, Usage: "Add a new SSH key", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "name",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, }, }, { @@ -2391,11 +2047,6 @@ var Commands = []*console.Command{ {Name: "ssh-key:delete", Hidden: true}, }, Usage: "Delete an SSH key", - Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, - }, }, { Category: "cloud:ssh-key", @@ -2407,12 +2058,9 @@ var Commands = []*console.Command{ }, Usage: "Get a list of SSH keys in your account", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, }, }, { @@ -2423,15 +2071,12 @@ var Commands = []*console.Command{ }, Usage: "Read or modify subscription properties", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "id", Aliases: []string{"s"},}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2444,12 +2089,9 @@ var Commands = []*console.Command{ Usage: "Close SSH tunnels", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2461,16 +2103,13 @@ var Commands = []*console.Command{ }, Usage: "View relationship info for SSH tunnels", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns",}, &console.BoolFlag{Name: "encode", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -2486,15 +2125,12 @@ var Commands = []*console.Command{ Usage: "List SSH tunnels", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2506,14 +2142,11 @@ var Commands = []*console.Command{ }, Usage: "Open SSH tunnels to an app's relationships", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2525,14 +2158,11 @@ var Commands = []*console.Command{ }, Usage: "Open a single SSH tunnel to an app relationship", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "port",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -2546,11 +2176,8 @@ var Commands = []*console.Command{ }, Usage: "Add a user to the project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "force-invite",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "role", Aliases: []string{"r"},}, @@ -2565,10 +2192,7 @@ var Commands = []*console.Command{ }, Usage: "Delete a user from the project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -2584,12 +2208,9 @@ var Commands = []*console.Command{ }, Usage: "View a user's role(s)", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -2607,13 +2228,10 @@ var Commands = []*console.Command{ }, Usage: "List project users", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2625,10 +2243,7 @@ var Commands = []*console.Command{ }, Usage: "Update user role(s) on a project", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "role", Aliases: []string{"r"},}, @@ -2643,7 +2258,6 @@ var Commands = []*console.Command{ }, Usage: "Create a variable", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "enabled", DefaultValue: true,}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, @@ -2651,8 +2265,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "json",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, &console.StringFlag{Name: "name",}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "prefix", DefaultValue: "none",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -2671,12 +2283,9 @@ var Commands = []*console.Command{ }, Usage: "Delete a variable", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -2692,15 +2301,12 @@ var Commands = []*console.Command{ }, Usage: "View a variable", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, @@ -2718,15 +2324,12 @@ var Commands = []*console.Command{ }, Usage: "List variables", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2738,15 +2341,12 @@ var Commands = []*console.Command{ }, Usage: "Update a variable", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.BoolFlag{Name: "enabled", DefaultValue: true,}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "inheritable", DefaultValue: true,}, &console.BoolFlag{Name: "json",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.BoolFlag{Name: "no-ansi",}, - &console.BoolFlag{Name: "no-interaction",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "sensitive",}, @@ -2766,14 +2366,11 @@ var Commands = []*console.Command{ }, Usage: "Get a list of all deployed workers", Flags: []console.Flag{ - &console.BoolFlag{Name: "ansi",}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-ansi",}, &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-interaction",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index c0874060..4c5e6602 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -14,6 +14,7 @@ import ( "github.com/mitchellh/go-homedir" "github.com/pkg/errors" + "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/local/php" ) @@ -152,6 +153,15 @@ func parseCommands(home string) (string, error) { "decode": true, "environment:drush": true, } + + excludedOptions := console.AnsiFlag.Names() + excludedOptions = append(excludedOptions, console.NoAnsiFlag.Names()...) + excludedOptions = append(excludedOptions, console.NoInteractionFlag.Names()...) + excludedOptions = append(excludedOptions, console.QuietFlag.Names()...) + excludedOptions = append(excludedOptions, console.LogLevelFlag.Names()...) + excludedOptions = append(excludedOptions, console.HelpFlag.Names()...) + excludedOptions = append(excludedOptions, console.VersionFlag.Names()...) + definitionAsString := "" for _, command := range definition.Commands { if strings.Contains(command.Description, "deprecated") || strings.Contains(command.Description, "DEPRECATED") { @@ -209,15 +219,23 @@ func parseCommands(home string) (string, error) { } optionNames := make([]string, 0, len(command.Definition.Options)) + + optionsLoop: for name := range command.Definition.Options { + if name == "yes" || name == "no" || name == "version" { + continue + } + for _, excludedOption := range excludedOptions { + if excludedOption == name { + continue optionsLoop + } + } + optionNames = append(optionNames, name) } sort.Strings(optionNames) flags := []string{} for _, name := range optionNames { - if name == "yes" || name == "no" || name == "help" || name == "quiet" || name == "verbose" || name == "version" { - continue - } option := command.Definition.Options[name] optionAliasesAsString := "" if option.Shortcut != "" { From 6a8fbe25231ae9ed66e25f5c2f700b65fcd12da4 Mon Sep 17 00:00:00 2001 From: Jan Goralski Date: Fri, 28 Oct 2022 15:22:51 +0200 Subject: [PATCH 058/466] Get rid of Github Actions deprecations --- .github/workflows/go_generate_update.yml | 4 ++-- .github/workflows/releaser.yml | 12 ++++++------ commands/local_check_security.go | 12 +++++++++++- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/go_generate_update.yml b/.github/workflows/go_generate_update.yml index df171cb1..fee5d41f 100644 --- a/.github/workflows/go_generate_update.yml +++ b/.github/workflows/go_generate_update.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.19 - uses: actions/cache@v3 @@ -34,7 +34,7 @@ jobs: id: git run: | RESULT=$(git status --untracked-files=no --porcelain) - echo "::set-output name=gitstatus::$RESULT" + echo "gitstatus=$RESULT" >> $GITHUB_OUTPUT - name: Test if: steps.git.outputs.gitstatus != '' diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 172da40f..28f87c65 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 @@ -33,7 +33,7 @@ jobs: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.19 - uses: actions/cache@v3 @@ -56,7 +56,7 @@ jobs: id: git run: | RESULT=$(git status --untracked-files=no --porcelain) - echo "::set-output name=gitstatus::$RESULT" + echo "gitstatus=$RESULT" >> $GITHUB_OUTPUT - name: Check if go prepare updated generated Go code if: steps.git.outputs.gitstatus != '' && startsWith(github.ref, 'refs/tags/v') @@ -72,7 +72,7 @@ jobs: uses: sigstore/cosign-installer@v2.7.0 - name: Run GoReleaser for snapshot - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v3 # only for PRs and push on branches if: ${{ !startsWith(github.ref, 'refs/tags/v') }} with: @@ -82,7 +82,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v3 # only for tags if: startsWith(github.ref, 'refs/tags/v') with: @@ -93,7 +93,7 @@ jobs: TAP_GITHUB_TOKEN: ${{ secrets.GH_PAT }} - name: Archive binaries - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: retention-days: 5 path: dist diff --git a/commands/local_check_security.go b/commands/local_check_security.go index 9547fd55..bf4223f2 100644 --- a/commands/local_check_security.go +++ b/commands/local_check_security.go @@ -72,9 +72,19 @@ a specific "composer.lock" file.`, terminal.Stdout.Write(output) if os.Getenv("GITHUB_WORKSPACE") != "" { + gOutFile := os.Getenv("GITHUB_OUTPUT") + + f, err := os.OpenFile(gOutFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + return console.Exit(fmt.Sprintf("unable to open github output: %s", err), 127) + } + defer f.Close() + // Ran inside a Github action, export vulns output, _ := security.Format(vulns, "raw_json") - terminal.Eprintf("::set-output name=vulns::%s", output) + if _, err = f.WriteString("vulns=" + string(output) + "\n"); err != nil { + return console.Exit(fmt.Sprintf("unable to write into github output: %s", err), 127) + } } if vulns.Count() > 0 && !c.Bool(("disable-exit-code")) { From 1b5cbab8703bdd324c079dc4c0fcd3fced2e223c Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 4 Nov 2022 12:33:26 -0400 Subject: [PATCH 059/466] feat: use the current hostname when serving the PAC file This means that as soon as you are able to reach the proxy, the generated PAC file will be usable with the right hostname or IP even if the proxy is running remotely, in a container or a VM. should closes #178 --- local/proxy/proxy.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/local/proxy/proxy.go b/local/proxy/proxy.go index 2e7c4831..71d989b0 100644 --- a/local/proxy/proxy.go +++ b/local/proxy/proxy.go @@ -313,16 +313,22 @@ func (p *Proxy) Start() error { } func (p *Proxy) servePacFile(w http.ResponseWriter, r *http.Request) { + // Use the current request hostname (r.Host) to generate the PAC file. + // This means that as soon as you are able to reach the proxy, the generated + // PAC file will expose an appropriate hostname or IP even if the proxy + // is running remotely, in a container or a VM. + // No need to fall back to p.Host and p.Port as r.Host is already checked + // upper in the stacktrace. w.Header().Add("Content-Type", "application/x-ns-proxy-autoconfig") w.Write([]byte(fmt.Sprintf(`// Only proxy *.%s requests // Configuration file in ~/.symfony5/proxy.json function FindProxyForURL (url, host) { if (dnsDomainIs(host, '.%s')) { - return 'PROXY %s:%d'; + return 'PROXY %s'; } return 'DIRECT'; } -`, p.TLD, p.TLD, p.Host, p.Port))) +`, p.TLD, p.TLD, r.Host))) } func (p *Proxy) serveIndex(w http.ResponseWriter, r *http.Request) { From c21df2e5ff0d592caf3c592a0efbe0335ba51894 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 19 Nov 2022 15:18:46 +0100 Subject: [PATCH 060/466] Bump deps --- go.mod | 10 +++++----- go.sum | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 9e36f098..d56e547a 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,13 @@ module github.com/symfony-cli/symfony-cli require ( - github.com/compose-spec/compose-go v1.6.0 + github.com/compose-spec/compose-go v1.7.0 github.com/docker/docker v20.10.21+incompatible github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 github.com/fabpot/local-php-security-checker/v2 v2.0.5 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 - github.com/hashicorp/golang-lru v0.5.4 + github.com/hashicorp/golang-lru v0.6.0 github.com/hpcloud/tail v1.0.0 github.com/joho/godotenv v1.4.0 github.com/mitchellh/go-homedir v1.1.0 @@ -17,11 +17,11 @@ require ( github.com/rs/zerolog v1.28.0 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 - github.com/spf13/viper v1.13.0 + github.com/spf13/viper v1.14.0 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.1 github.com/symfony-cli/console v1.0.2 - github.com/symfony-cli/phpstore v1.0.5 + github.com/symfony-cli/phpstore v1.0.6 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 golang.org/x/sync v0.1.0 @@ -32,7 +32,7 @@ require ( require ( github.com/Microsoft/go-winio v0.6.0 // indirect github.com/NYTimes/gziphandler v1.1.1 - github.com/distribution/distribution/v3 v3.0.0-20221028072015-7f9f86c4116f // indirect + github.com/distribution/distribution/v3 v3.0.0-20221103125252-ebfa2a0ac0a9 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect diff --git a/go.sum b/go.sum index 89a7de8a..276e6c4d 100644 --- a/go.sum +++ b/go.sum @@ -52,16 +52,16 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/compose-spec/compose-go v1.6.0 h1:7Ol/UULMUtbPmB0EYrETASRoum821JpOh/XaEf+hN+Q= -github.com/compose-spec/compose-go v1.6.0/go.mod h1:os+Ulh2jlZxY1XT1hbciERadjSUU/BtZ6+gcN7vD7J0= +github.com/compose-spec/compose-go v1.7.0 h1:70HzJ/g81pdxF1ao9L7W2fgje/9FxNKH/davgvusEKc= +github.com/compose-spec/compose-go v1.7.0/go.mod h1:Tb5Ae2PsYN3GTqYqzl2IRbTPiJtPZZjMw8UKUvmehFk= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20221028072015-7f9f86c4116f h1:pKjrBVsV6tDvEQ47t6J69/K0ipsGqXbDXjrMSjVU1jI= -github.com/distribution/distribution/v3 v3.0.0-20221028072015-7f9f86c4116f/go.mod h1:6rIc5NMSjXjjnwzWWy3HAm9gDBu+X7aCzL8VrHIKgxM= +github.com/distribution/distribution/v3 v3.0.0-20221103125252-ebfa2a0ac0a9 h1:doprs/RuXCuN864IfxC3h2qocrt158wGv3A5mcqSZQw= +github.com/distribution/distribution/v3 v3.0.0-20221103125252-ebfa2a0ac0a9/go.mod h1:6rIc5NMSjXjjnwzWWy3HAm9gDBu+X7aCzL8VrHIKgxM= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog= @@ -131,7 +131,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/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.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -156,8 +156,8 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= +github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= @@ -249,8 +249,8 @@ github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0 github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 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/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= +github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= +github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 h1:vEf6LukDDCcMnRXnIMy5XRo/MR4+3lNTAhXxM+x0ZXI= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081/go.mod h1:mXF6uSYLo1a2BZPcVHpP8RstMYoQnCaFF+dmIY726NY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -261,16 +261,16 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/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 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/symfony-cli/cert v1.0.1 h1:ETYVBshgY+SaydBJmMkU0PaoDrWm6zsGNB/799ZQYCE= github.com/symfony-cli/cert v1.0.1/go.mod h1:g4WrLT6EQsEPmA19xh5Jv9Jnpg5EvtFqArJf2AG2S+w= github.com/symfony-cli/console v1.0.2 h1:u8KJm9jFbfzmN0y7fcfjjal3wWOLflNomu29PLgYQjQ= github.com/symfony-cli/console v1.0.2/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= -github.com/symfony-cli/phpstore v1.0.5 h1:e1J+FcztiSSAVuD4gwatPwMpeqQy3SGNdhd6Vtuncy8= -github.com/symfony-cli/phpstore v1.0.5/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= +github.com/symfony-cli/phpstore v1.0.6 h1:ehkEaG05e4vIG2J06sVcdg6cmc7/u68+DhGcjDsOX/k= +github.com/symfony-cli/phpstore v1.0.6/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.4 h1:jam7aN7g7WQ9uOwV9UC+iVGBLTlzK8kAC5EKcxq21Z8= github.com/symfony-cli/terminal v1.0.4/go.mod h1:+OxxnU05wyRHKYyQkTzTaCSSxmmIBcvAHLcQ099odj4= github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 h1:F4snRP//nIuTTW9LYEzVH4HVwDG9T3M4t8y/2nqMbiY= @@ -618,7 +618,7 @@ 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= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 2658bdee8c2a4ad4624bcb595a4c370cab3045ec Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 16 Nov 2022 16:31:44 +0100 Subject: [PATCH 061/466] Add support for PHP version selection based on `config.platform.php` in `composer.json` --- commands/local_php_list.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/local_php_list.go b/commands/local_php_list.go index 91d58382..b570e639 100644 --- a/commands/local_php_list.go +++ b/commands/local_php_list.go @@ -88,7 +88,8 @@ var localPhpListCmd = &console.Command{ } terminal.Println("") - terminal.Println("To control the version used in a directory, create a .php-version file that contains the version number (e.g. 7.2 or 7.2.15).") + terminal.Println("To control the version used in a directory, create a .php-version file that contains the version number (e.g. 7.2 or 7.2.15),") + terminal.Println("or define config.platform.php inside composer.json.") terminal.Println("If you're using Platform.sh, the version can also be specified in the .platform.app.yaml file.") return nil From e2f6eda12ef79c21b1d6216ff5880b4eb7cf2264 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 21 Nov 2022 19:39:07 +0100 Subject: [PATCH 062/466] Fix outdated copyright notice --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 97e9f298..a9a5c9db 100644 --- a/main.go +++ b/main.go @@ -101,7 +101,7 @@ func main() { app := &console.Application{ Name: "Symfony CLI", Usage: "Symfony CLI helps developers manage projects, from local code to remote infrastructure", - Copyright: fmt.Sprintf("(c) 2017-%d Symfony SAS #StandWithUkraine Support Ukraine", time.Now().Year()), + Copyright: fmt.Sprintf("(c) 2021-%d Fabien Potencier #StandWithUkraine Support Ukraine", time.Now().Year()), FlagEnvPrefix: []string{"SYMFONY", "PLATFORM"}, Commands: cmds, Action: func(ctx *console.Context) error { From b27c38d0f507661ba341c6293b3c63d6fdd441d0 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 24 Nov 2022 16:58:23 -0500 Subject: [PATCH 063/466] Expose the CLI version and binary name when running `console`, `php` and `composer` wrappers Exposing that info via environment variables will allow a better Symfony Maker experience, see https://github.com/symfony/maker-bundle/pull/1238 --- main.go | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 97e9f298..f5951c9d 100644 --- a/main.go +++ b/main.go @@ -43,6 +43,13 @@ var ( buildDate string ) +func getCliExtraEnv() []string { + return []string{ + "SYMFONY_CLI_VERSION=" + version, + "SYMFONY_CLI_BINARY_NAME=" + console.CurrentBinaryName(), + } +} + func main() { args := os.Args name := console.CurrentBinaryName() @@ -55,8 +62,9 @@ func main() { // called via "symfony php"? if len(args) >= 2 && php.IsBinaryName(args[1]) { e := &php.Executor{ - BinName: args[1], - Args: args[1:], + BinName: args[1], + Args: args[1:], + ExtraEnv: getCliExtraEnv(), } os.Exit(e.Execute(true)) } @@ -67,14 +75,15 @@ func main() { args[1] = "app/console" } e := &php.Executor{ - BinName: "php", - Args: args, + BinName: "php", + Args: args, + ExtraEnv: getCliExtraEnv(), } os.Exit(e.Execute(false)) } // called via "symfony composer"? if len(args) >= 2 && args[1] == "composer" { - res := php.Composer("", args[2:], []string{}, os.Stdout, os.Stderr, ioutil.Discard, zerolog.Nop()) + res := php.Composer("", args[2:], getCliExtraEnv(), os.Stdout, os.Stderr, ioutil.Discard, zerolog.Nop()) terminal.Eprintln(res.Error()) os.Exit(res.ExitCode()) } From 888d37c664f78cae9fab828c16feca54ee3e4d04 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 25 Nov 2022 12:16:08 +0000 Subject: [PATCH 064/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 91c478b6..99b9f747 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -203,7 +203,7 @@ var availableServices = []*service{ Type: "opensearch", Versions: serviceVersions{ Deprecated: []string{}, - Supported: []string{"1.1", "1.2", "2.0"}, + Supported: []string{"1.1", "1.2", "2"}, }, }, { From c9f27009e205f2e444001c565c8d46e8792ae7de Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 25 Nov 2022 12:11:55 -0500 Subject: [PATCH 065/466] fix: only force Git main branch name for new project when --cloud is used (#235) Only force Git main branch name for new project when --cloud is used --- commands/local_new.go | 4 +++- commands/project_init.go | 5 ++++- git/init.go | 7 +++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/commands/local_new.go b/commands/local_new.go index e1d8f9ed..e94fafc4 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -319,7 +319,9 @@ func parseDockerComposeServices(dir string) []*CloudService { func initProjectGit(c *console.Context, s *terminal.Spinner, dir string) error { terminal.Println("* Setting up the project under Git version control") terminal.Printfln(" (running git init %s)\n", dir) - if buf, err := git.Init(dir, c.Bool("debug")); err != nil { + // Only force the branch to be "main" when running a Cloud context to make + // onboarding simpler. + if buf, err := git.Init(dir, c.Bool("cloud"), c.Bool("debug")); err != nil { fmt.Print(buf.String()) return err } diff --git a/commands/project_init.go b/commands/project_init.go index 21ab6814..ffcbd4c0 100644 --- a/commands/project_init.go +++ b/commands/project_init.go @@ -115,5 +115,8 @@ func gitInit(cwd string) (*bytes.Buffer, error) { if _, err := os.Stat(filepath.Join(cwd, ".git")); err == nil || !os.IsNotExist(err) { return nil, nil } - return git.Init(cwd, false) + + // project:init is only used in a Cloud context, so we can safely force the + // branch to be "main" + return git.Init(cwd, true, false) } diff --git a/git/init.go b/git/init.go index a4ab30f8..ac312e38 100644 --- a/git/init.go +++ b/git/init.go @@ -21,11 +21,14 @@ package git import "bytes" -func Init(dir string, debug bool) (*bytes.Buffer, error) { +func Init(dir string, forceMainGitBranchName, debug bool) (*bytes.Buffer, error) { if content, err := doExecGit(dir, []string{"init"}, !debug); err != nil { return content, err } - return doExecGit(dir, []string{"checkout", "-b", "main"}, !debug) + if forceMainGitBranchName { + return doExecGit(dir, []string{"checkout", "-b", "main"}, !debug) + } + return nil, nil } func AddAndCommit(dir string, files []string, msg string, debug bool) (*bytes.Buffer, error) { From 74c3cd1ccfb89c172bca559cfa80887fd1c8eac3 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Tue, 29 Nov 2022 08:47:04 +0100 Subject: [PATCH 066/466] feat: add local:proxy:url command (#233) --- commands/local_proxy_url.go | 56 +++++++++++++++++++++++++++++++++++++ commands/root.go | 1 + 2 files changed, 57 insertions(+) create mode 100644 commands/local_proxy_url.go diff --git a/commands/local_proxy_url.go b/commands/local_proxy_url.go new file mode 100644 index 00000000..c89f0233 --- /dev/null +++ b/commands/local_proxy_url.go @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +import ( + "errors" + "fmt" + + "github.com/symfony-cli/console" + "github.com/symfony-cli/symfony-cli/local/pid" + "github.com/symfony-cli/terminal" +) + +var localProxyUrlCmd = &console.Command{ + Category: "local", + Name: "proxy:url", + Aliases: []*console.Alias{{Name: "proxy:url"}}, + Usage: "Get the local proxy server URL", + Description: `Get the local proxy server URL, for example if you need to define HTTP_PROXY/HTTPS_PROXY environment variables +when running an external program: + +e.g. with Blackfire: + HTTP_PROXY=$(symfony proxy:url) HTTPS_PROXY=$(symfony proxy:url) blackfire curl ... + +e.g. with Cypress: + HTTP_PROXY=$(symfony proxy:url) HTTPS_PROXY=$(symfony proxy:url) ./node_modules/bin/cypress ... +`, + Action: func(c *console.Context) error { + pidFile := pid.New("__proxy__", nil) + if !pidFile.IsRunning() { + return errors.New("The proxy server is not running") + } + + url := fmt.Sprintf("%s://127.0.0.1:%d", pidFile.Scheme, pidFile.Port) + terminal.Print(url) + + return nil + }, +} diff --git a/commands/root.go b/commands/root.go index 25c00a6d..068c5d15 100644 --- a/commands/root.go +++ b/commands/root.go @@ -67,6 +67,7 @@ func CommonCommands() []*console.Command { localProxyDetachDomainCmd, localProxyStartCmd, localProxyStatusCmd, + localProxyUrlCmd, localProxyStopCmd, localRequirementsCheckCmd, localRunCmd, From 37a00dbdf05367b14c0d36eeb1a53cb33654dcd1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 30 Nov 2022 16:11:54 +0000 Subject: [PATCH 067/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index f5f005ec..f379fa96 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -324,6 +324,14 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "no-warn", Aliases: []string{"W"},}, }, }, + { + Category: "cloud:auth", + Name: "verify-phone-number", + Aliases: []*console.Alias{ + {Name: "auth:verify-phone-number", Hidden: true}, + }, + Usage: "Verify your phone number interactively", + }, { Category: "cloud:backup", Name: "create", From c663cdb8b898cda20e30ab331dd24133fbb740be Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 1 Dec 2022 12:17:20 +0000 Subject: [PATCH 068/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 99b9f747..52e6ed65 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -54,7 +54,7 @@ var availablePHPExts = map[string][]string{ "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "interbase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "ioncube": {"7.0", "7.1", "7.2"}, + "ioncube": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, "json": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "ldap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "mailparse": {"7.0", "7.1", "7.2", "7.4", "8.0", "8.1"}, From 8b32cc093b9f66a57f00df958f39422f1c6813ab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Dec 2022 16:10:53 +0000 Subject: [PATCH 069/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 52e6ed65..54d0d3ce 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -224,7 +224,7 @@ var availableServices = []*service{ Type: "rabbitmq", Versions: serviceVersions{ Deprecated: []string{"3.5", "3.6", "3.7", "3.8"}, - Supported: []string{"3.9"}, + Supported: []string{"3.9", "3.10", "3.11"}, }, }, { From 862b631e07adc07a534ef5349cbffa6006b76f41 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Dec 2022 12:15:09 +0000 Subject: [PATCH 070/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 144 ++++++++++++++++++------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 54d0d3ce..b4a99c7f 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -23,109 +23,109 @@ package platformsh var availablePHPExts = map[string][]string{ - "amqp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "amqp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "apc": {"5.4", "5.5"}, - "apcu": {"5.4", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "apcu": {"5.4", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "apcu_bc": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "applepay": {"7.0", "7.1", "7.4"}, - "bcmath": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "blackfire": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "bz2": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "calendar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "ctype": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "curl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "enchant": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "bcmath": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "blackfire": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "bz2": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "calendar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "ctype": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "curl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "enchant": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "event": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "exif": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "ffi": {"7.4", "8.0", "8.1"}, - "fileinfo": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "ftp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "gd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "exif": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "ffi": {"7.4", "8.0", "8.1", "8.2"}, + "fileinfo": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "ftp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "gd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "gearman": {"5.4", "5.5", "5.6"}, - "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "gmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "http": {"5.4", "5.5", "7.3", "7.4", "8.0", "8.1"}, - "iconv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "imagick": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "gmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "http": {"5.4", "5.5", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "iconv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "imagick": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "interbase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, - "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "ioncube": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, - "json": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "ldap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "mailparse": {"7.0", "7.1", "7.2", "7.4", "8.0", "8.1"}, - "mbstring": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "json": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "ldap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "mailparse": {"7.0", "7.1", "7.2", "7.4", "8.0", "8.1", "8.2"}, + "mbstring": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "mcrypt": {"5.4", "5.5", "5.6", "7.0", "7.1"}, "memcache": {"5.4", "5.5", "5.6"}, - "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "mongo": {"5.4", "5.5", "5.6"}, "mongodb": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "mssql": {"5.4", "5.5", "5.6"}, "mysql": {"5.4", "5.5", "5.6"}, - "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "newrelic": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "oauth": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, - "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "pdo_sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "pinba": {"5.4", "5.5", "5.6"}, - "posix": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "posix": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "propro": {"5.6"}, - "pspell": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "pspell": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "pthreads": {"7.1"}, - "raphf": {"5.6", "7.4", "8.0", "8.1"}, - "rdkafka": {"8.1"}, - "readline": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "raphf": {"5.6", "7.4", "8.0", "8.1", "8.2"}, + "rdkafka": {"8.1", "8.2"}, + "readline": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "recode": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3"}, - "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "simplexml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "snmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1"}, + "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "simplexml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "snmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "sourceguardian": {"7.0", "7.1"}, "spplus": {"5.4", "5.5"}, - "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "ssh2": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "sybase": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "tideways": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "ssh2": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sybase": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "tideways": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "tideways_xhprof": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "tidy": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "tidy": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "wddx": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "xdebug": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "xcache": {"5.4", "5.5"}, "xhprof": {"5.4", "5.5", "5.6"}, - "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, - "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "zbarcode": {"7.0", "7.1", "7.2", "7.3"}, - "zendopcache": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "zip": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "zendopcache": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "zip": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, } var availableServices = []*service{ From 2a80fdcdfa9a2389c59db515850104a89861da74 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 16 Dec 2022 10:14:45 +0100 Subject: [PATCH 071/466] fix: Local Sever should respect the `daemon` option from `.symfony.local.yaml` (#241) --- commands/local_server_start.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index dec9123a..266b30fe 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -96,7 +96,19 @@ var localServerStartCmd = &console.Command{ shutdownCh <- true }() - if c.Bool("daemon") && !reexec.IsChild() { + if err := reexec.NotifyForeground("boot"); err != nil { + terminal.Logger.Error().Msg("Unable to go to the background: %s.\nAborting\n" + err.Error()) + return console.Exit("", 1) + } + + reexec.NotifyForeground("config") + config, fileConfig, err := project.NewConfigFromContext(c, projectDir) + if err != nil { + return errors.WithStack(err) + } + config.HomeDir = homeDir + + if config.Daemon && !reexec.IsChild() { varDir := filepath.Join(homeDir, "var") if err := os.MkdirAll(varDir, 0755); err != nil { return errors.Wrap(err, "Could not create status file") @@ -107,25 +119,13 @@ var localServerStartCmd = &console.Command{ } terminal.Eprintln("Impossible to go to the background") terminal.Eprintln("Continue in foreground") - c.Set("daemon", "false") + config.Daemon = false } else { terminal.Eprintfln("Stream the logs via %s server:log", c.App.HelpName) return nil } } - if err := reexec.NotifyForeground("boot"); err != nil { - terminal.Logger.Error().Msg("Unable to go to the background: %s.\nAborting\n" + err.Error()) - return console.Exit("", 1) - } - - reexec.NotifyForeground("config") - config, fileConfig, err := project.NewConfigFromContext(c, projectDir) - if err != nil { - return errors.WithStack(err) - } - config.HomeDir = homeDir - reexec.NotifyForeground("proxy") proxyConfig, err := proxy.Load(homeDir) if err != nil { From 0960da60e6d6b63afd736c85ed3b032fe7e076fb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 21 Dec 2022 10:28:02 +0100 Subject: [PATCH 072/466] Change book requirements to match for the Symfony 6.2 version (#238) --- book/checkout.go | 26 ++++++++++++++++++++++---- book/reqs.go | 10 +++++----- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/book/checkout.go b/book/checkout.go index e0676bac..b9288399 100644 --- a/book/checkout.go +++ b/book/checkout.go @@ -196,7 +196,12 @@ func (b *Book) Checkout(step string) error { printBanner("[WEB] Installing Node dependencies (might take some time)", b.Debug) if _, err := os.Stat(filepath.Join(b.Dir, "package.json")); err == nil { - if err := executeCommand([]string{"yarn", "install"}, b.Debug, false, nil); err != nil { + args := []string{"npm", "install"} + if _, err := os.Stat(filepath.Join(b.Dir, "yarn.lock")); err == nil { + // old version of the book using Yarn instead of npm + args = []string{"yarn", "install"} + } + if err := executeCommand(args, b.Debug, false, nil); err != nil { return err } } else { @@ -205,7 +210,11 @@ func (b *Book) Checkout(step string) error { printBanner("[WEB] Building CSS and JS assets", b.Debug) if _, err := os.Stat(filepath.Join(b.Dir, "package.json")); err == nil { - if err := executeCommand([]string{"yarn", "encore", "dev"}, b.Debug, false, nil); err != nil { + args := []string{"npx", "encore", "dev"} + if _, err := os.Stat(filepath.Join(b.Dir, "yarn.lock")); err == nil { + args = []string{"yarn", "encore", "dev"} + } + if err := executeCommand(args, b.Debug, false, nil); err != nil { return err } } else { @@ -229,7 +238,12 @@ func (b *Book) Checkout(step string) error { printBanner("[SPA] Installing Node dependencies (might take some time)", b.Debug) if _, err := os.Stat(filepath.Join(b.Dir, "spa")); err == nil { os.Chdir(filepath.Join(b.Dir, "spa")) - if err := executeCommand([]string{"yarn", "install"}, b.Debug, false, nil); err != nil { + args := []string{"npm", "install"} + if _, err := os.Stat(filepath.Join(b.Dir, "yarn.lock")); err == nil { + // old version of the book using Yarn instead of npm + args = []string{"yarn", "install"} + } + if err := executeCommand(args, b.Debug, false, nil); err != nil { return err } os.Chdir(b.Dir) @@ -252,7 +266,11 @@ func (b *Book) Checkout(step string) error { } os.Chdir(filepath.Join(b.Dir, "spa")) env := append(os.Environ(), "API_ENDPOINT="+endpoint.String()) - if err := executeCommand([]string{"yarn", "encore", "dev"}, b.Debug, false, env); err != nil { + args := []string{"npx", "encore", "dev"} + if _, err := os.Stat(filepath.Join(b.Dir, "yarn.lock")); err == nil { + args = []string{"yarn", "encore", "dev"} + } + if err := executeCommand(args, b.Debug, false, env); err != nil { return err } os.Chdir(b.Dir) diff --git a/book/reqs.go b/book/reqs.go index ff4c3258..c833b2cb 100644 --- a/book/reqs.go +++ b/book/reqs.go @@ -63,7 +63,7 @@ func CheckRequirements() (bool, error) { } // PHP - minv, err := version.NewVersion("7.2.4") + minv, err := version.NewVersion("8.1.0") if err != nil { return false, err } @@ -146,12 +146,12 @@ func CheckRequirements() (bool, error) { terminal.Println("[OK] Docker Compose installed") } - // yarn - if _, err := exec.LookPath("yarn"); err != nil { + // NPM + if _, err := exec.LookPath("npm"); err != nil { ready = false - terminal.Println("[KO] Cannot find the Yarn package manager, please install it https://yarnpkg.com/") + terminal.Println("[KO] Cannot find the npm package manager, please install it https://www.npmjs.com/") } else { - terminal.Println("[OK] Yarn installed") + terminal.Println("[OK] npm installed") } return ready, nil From 0e7075c0079b199b92cc39d36defe624e9ca6265 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 4 Jan 2023 16:14:28 +0000 Subject: [PATCH 073/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index b4a99c7f..c8ba5e0a 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -216,8 +216,8 @@ var availableServices = []*service{ { Type: "postgresql", Versions: serviceVersions{ - Deprecated: []string{"9.3", "9.4", "9.5", "9.6"}, - Supported: []string{"10", "11", "12", "13", "14"}, + Deprecated: []string{"9.3", "9.4", "9.5", "9.6", "10"}, + Supported: []string{"11", "12", "13", "14", "15"}, }, }, { From 365abe584b88dcb08eeff5baf6ec4906e55fdd75 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Jan 2023 16:12:35 +0000 Subject: [PATCH 074/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index c8ba5e0a..de992a70 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -244,8 +244,8 @@ var availableServices = []*service{ { Type: "varnish", Versions: serviceVersions{ - Deprecated: []string{}, - Supported: []string{"5.1", "5.2", "6.0", "6.3"}, + Deprecated: []string{"5.1", "5.2"}, + Supported: []string{"6.0", "6.3", "7.1"}, }, }, { From 4d2117a776465a7f548db1996f8a104804410c65 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 6 Jan 2023 12:14:35 +0000 Subject: [PATCH 075/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 70 ++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index f379fa96..ec2f5ba8 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -136,7 +136,7 @@ var Commands = []*console.Command{ Usage: "View detailed information on a single activity", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type",}, @@ -164,7 +164,7 @@ var Commands = []*console.Command{ Usage: "Get a list of activities for an environment or project", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, @@ -249,7 +249,7 @@ var Commands = []*console.Command{ }, Usage: "List apps in the project", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -289,7 +289,7 @@ var Commands = []*console.Command{ }, Usage: "Display your account information", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-auto-login",}, &console.BoolFlag{Name: "no-header",}, @@ -369,7 +369,7 @@ var Commands = []*console.Command{ }, Usage: "List available backups of an environment", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, @@ -458,7 +458,7 @@ var Commands = []*console.Command{ }, Usage: "List project certificates", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "domain",}, &console.StringFlag{Name: "exclude-domain",}, @@ -503,7 +503,7 @@ var Commands = []*console.Command{ }, Usage: "List commits", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, @@ -554,7 +554,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.BoolFlag{Name: "cleanup", Aliases: []string{"C"},}, - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -625,7 +625,7 @@ var Commands = []*console.Command{ }, Usage: "Show detailed information for a domain", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -644,7 +644,7 @@ var Commands = []*console.Command{ }, Usage: "Get a list of all domains", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, @@ -797,7 +797,7 @@ var Commands = []*console.Command{ }, Usage: "Read or set properties for an environment", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, @@ -837,7 +837,7 @@ var Commands = []*console.Command{ }, Usage: "Get a list of environments", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, @@ -1068,7 +1068,7 @@ var Commands = []*console.Command{ }, Usage: "View detailed information on a single integration activity", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, @@ -1090,7 +1090,7 @@ var Commands = []*console.Command{ }, Usage: "Get a list of activities for an integration", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, @@ -1198,7 +1198,7 @@ var Commands = []*console.Command{ }, Usage: "View details of an integration", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, @@ -1216,7 +1216,7 @@ var Commands = []*console.Command{ }, Usage: "View a list of project integration(s)", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, @@ -1301,7 +1301,7 @@ var Commands = []*console.Command{ Usage: "Show disk usage on a service", Flags: []console.Flag{ &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, @@ -1352,7 +1352,7 @@ var Commands = []*console.Command{ Usage: "Get a list of mounts", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -1374,7 +1374,7 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -1417,7 +1417,7 @@ var Commands = []*console.Command{ }, Usage: "View or change an organization's billing address", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, @@ -1432,7 +1432,7 @@ var Commands = []*console.Command{ }, Usage: "View or change an organization's billing profile", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, @@ -1492,7 +1492,7 @@ var Commands = []*console.Command{ }, Usage: "View or change organization details", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, @@ -1511,7 +1511,7 @@ var Commands = []*console.Command{ }, Usage: "List organizations", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "my",}, &console.BoolFlag{Name: "no-header",}, @@ -1568,7 +1568,7 @@ var Commands = []*console.Command{ }, Usage: "View an organization user", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, @@ -1586,7 +1586,7 @@ var Commands = []*console.Command{ }, Usage: "List organization users", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, @@ -1702,7 +1702,7 @@ var Commands = []*console.Command{ }, Usage: "Read or set properties for a project", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -1828,7 +1828,7 @@ var Commands = []*console.Command{ }, Usage: "List all routes for an environment", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -1876,7 +1876,7 @@ var Commands = []*console.Command{ }, Usage: "List services in the project", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -2066,7 +2066,7 @@ var Commands = []*console.Command{ }, Usage: "Get a list of SSH keys in your account", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, }, @@ -2079,7 +2079,7 @@ var Commands = []*console.Command{ }, Usage: "Read or modify subscription properties", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -2134,7 +2134,7 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -2236,7 +2236,7 @@ var Commands = []*console.Command{ }, Usage: "List project users", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, @@ -2309,7 +2309,7 @@ var Commands = []*console.Command{ }, Usage: "View a variable", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -2332,7 +2332,7 @@ var Commands = []*console.Command{ }, Usage: "List variables", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, @@ -2374,7 +2374,7 @@ var Commands = []*console.Command{ }, Usage: "Get a list of all deployed workers", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, From d6213b73ad0005d4dae7db1c9edb3dcf890e2037 Mon Sep 17 00:00:00 2001 From: Antonis Kalipetis Date: Tue, 10 Jan 2023 11:58:09 +0200 Subject: [PATCH 076/466] Fix Symfony CLI to work with Platform.sh CLI v4.x (#253) * Use PLATFORMSH_CLI_NO_INTERACTION=1 to make sure the migration message is not displayed during installation * Use PLATFORMSH_CLI_WRAPPED=1 to make sure migration messages are not shown when running the CLI Fix #252 --- commands/platformsh.go | 1 + local/php/platformsh.go | 1 + 2 files changed, 2 insertions(+) diff --git a/commands/platformsh.go b/commands/platformsh.go index 1b835f74..e880eb57 100644 --- a/commands/platformsh.go +++ b/commands/platformsh.go @@ -126,6 +126,7 @@ func (p *platformshCLI) executor(args []string) *php.Executor { "PLATFORMSH_CLI_APPLICATION_NAME=Platform.sh CLI for Symfony", "PLATFORMSH_CLI_APPLICATION_EXECUTABLE=symfony", "XDEBUG_MODE=off", + "PLATFORMSH_CLI_WRAPPED=1", } if util.InCloud() { env = append(env, "PLATFORMSH_CLI_UPDATES_CHECK=0") diff --git a/local/php/platformsh.go b/local/php/platformsh.go index c256313c..689e9f52 100644 --- a/local/php/platformsh.go +++ b/local/php/platformsh.go @@ -53,6 +53,7 @@ func InstallPlatformPhar(home string) error { Dir: home, BinName: "php", Args: []string{"php", installerPath}, + ExtraEnv: []string{"PLATFORMSH_CLI_NO_INTERACTION=1"}, SkipNbArgs: 1, Stdout: &stdout, Stderr: &stdout, From c5c3ad4be5b3c1761241ec11d48a31dea8a366fc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 10 Jan 2023 12:15:53 +0000 Subject: [PATCH 077/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index de992a70..18aa1d7c 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -245,7 +245,7 @@ var availableServices = []*service{ Type: "varnish", Versions: serviceVersions{ Deprecated: []string{"5.1", "5.2"}, - Supported: []string{"6.0", "6.3", "7.1"}, + Supported: []string{"6.0", "6.3", "7.1", "7.2"}, }, }, { From e93d8a9442409f155dcac657d16b12251287c873 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Jan 2023 12:16:12 +0000 Subject: [PATCH 078/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 18aa1d7c..bae64aa7 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -238,7 +238,7 @@ var availableServices = []*service{ Type: "solr", Versions: serviceVersions{ Deprecated: []string{"3.6", "4.10", "6.3", "6.6", "7.6", "7.7", "8.0", "8.4", "8.6"}, - Supported: []string{"8.11"}, + Supported: []string{"8.11", "9.1"}, }, }, { From 28cdb38ac22726bc806acbc09a898e54567f8856 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 3 Aug 2022 17:06:46 -0400 Subject: [PATCH 079/466] Detect Scoop installation of composer, fix #136 --- local/php/composer.go | 17 +++------- local/php/composer_unix.go | 46 ++++++++++++++++++++++++++ local/php/composer_windows.go | 62 +++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 12 deletions(-) create mode 100644 local/php/composer_unix.go create mode 100644 local/php/composer_windows.go diff --git a/local/php/composer.go b/local/php/composer.go index a53160b1..202c25b5 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -132,18 +132,11 @@ func composerVersion() int { } func findComposer(extraBin string) (string, error) { - // Special Support for NixOS. It needs to run before the PATH detection - // because NixOS adds a shell wrapper that we can't run via PHP. - for _, path := range strings.Split(os.Getenv("buildInputs"), " ") { - nixPharPath := filepath.Join(path, "libexec/composer/composer.phar") - d, err := os.Stat(nixPharPath) - if err != nil { - continue - } - if m := d.Mode(); !m.IsDir() { - // Yep! - return nixPharPath, nil - } + // Special support for OS specific things. They need to run before the + // PATH detection because most of them adds shell wrappers that we + // can't run via PHP. + if pharPath := findComposerSystemSpecific(extraBin); pharPath != "" { + return pharPath, nil } for _, file := range []string{extraBin, "composer", "composer.phar"} { if pharPath, _ := LookPath(file); pharPath != "" { diff --git a/local/php/composer_unix.go b/local/php/composer_unix.go new file mode 100644 index 00000000..ab14f6d5 --- /dev/null +++ b/local/php/composer_unix.go @@ -0,0 +1,46 @@ +//go:build !windows +// +build !windows + +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package php + +import ( + "os" + "path/filepath" + "strings" +) + +func findComposerSystemSpecific(extraBin string) string { + // Special Support for NixOS + for _, path := range strings.Split(os.Getenv("buildInputs"), " ") { + nixPharPath := filepath.Join(path, "libexec/composer/composer.phar") + d, err := os.Stat(nixPharPath) + if err != nil { + continue + } + if m := d.Mode(); !m.IsDir() { + // Yep! + return nixPharPath + } + } + + return "" +} diff --git a/local/php/composer_windows.go b/local/php/composer_windows.go new file mode 100644 index 00000000..56e6a67c --- /dev/null +++ b/local/php/composer_windows.go @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package php + +import ( + "github.com/mitchellh/go-homedir" + "os" + "os/exec" + "path/filepath" +) + +func findComposerSystemSpecific(extraBin string) string { + // Special Support for Scoop + scoopPaths := []string{} + + if scoopPath, err := exec.LookPath("scoop"); err == nil { + scoopPaths = append(scoopPaths, filepath.Dir(filepath.Dir(scoopPath))) + } + + if scoopPath := os.Getenv("SCOOP"); scoopPath == "" { + if homedir, err := homedir.Dir(); err != nil { + scoopPaths = append(scoopPaths, filepath.Join(homedir, "scoop")) + } + } + + if scoopGlobalPath := os.Getenv("SCOOP_GLOBAL"); scoopGlobalPath == "" { + if programData := os.Getenv("PROGRAMDATA"); programData != "" { + scoopPaths = append(scoopPaths, filepath.Join(programData, "scoop")) + } + } + + for _, path := range scoopPaths { + pharPath := filepath.Join(path, "apps", "composer", "current", "composer.phar") + d, err := os.Stat(pharPath) + if err != nil { + continue + } + if m := d.Mode(); !m.IsDir() { + // Yep! + return pharPath + } + } + + return "" +} From 7cfe5a29a441d18e20cf779b8bea032902821ebd Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 23 Jan 2023 15:09:19 -0500 Subject: [PATCH 080/466] Fix Composer script detection when it uses an absolute shebang path fix #256 --- local/php/composer.go | 16 ++++++------ local/php/composer_test.go | 27 +++++++++++++++++++++ local/php/testdata/php_scripts/custom-one | 4 +++ local/php/testdata/php_scripts/debian-style | 4 +++ local/php/testdata/php_scripts/invalid | 3 +++ local/php/testdata/php_scripts/usual-one | 4 +++ 6 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 local/php/composer_test.go create mode 100755 local/php/testdata/php_scripts/custom-one create mode 100755 local/php/testdata/php_scripts/debian-style create mode 100755 local/php/testdata/php_scripts/invalid create mode 100755 local/php/testdata/php_scripts/usual-one diff --git a/local/php/composer.go b/local/php/composer.go index 202c25b5..f7ea1b72 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -20,6 +20,7 @@ package php import ( + "bufio" "bytes" "crypto/sha512" "encoding/hex" @@ -71,7 +72,7 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, composerBin = "composer2" } path, err := e.findComposer(composerBin) - if err != nil || !isComposerPHPScript(path) { + if err != nil || !isPHPScript(path) { fmt.Fprintln(logger, " WARNING: Unable to find Composer, downloading one. It is recommended to install Composer yourself at https://getcomposer.org/download/") // we don't store it under bin/ to avoid it being found by findComposer as we want to only use it as a fallback binDir := filepath.Join(util.GetHomeDir(), "composer") @@ -95,19 +96,20 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, return ComposerResult{} } -// isComposerPHPScript checks that the composer file is indeed a phar/PHP script (not a .bat file) -func isComposerPHPScript(path string) bool { +// isPHPScript checks that the composer file is indeed a phar/PHP script (not a .bat file) +func isPHPScript(path string) bool { file, err := os.Open(path) if err != nil { return false } defer file.Close() - magicPrefix := []byte("#!/usr/bin/env php") - byteSlice := make([]byte, len(magicPrefix)) - if _, err := file.Read(byteSlice); err != nil { + reader := bufio.NewReader(file) + byteSlice, _, err := reader.ReadLine() + if err != nil { return false } - return bytes.Equal(byteSlice, magicPrefix) + + return bytes.HasPrefix(byteSlice, []byte("#!/")) && bytes.HasSuffix(byteSlice, []byte("php")) } func composerVersion() int { diff --git a/local/php/composer_test.go b/local/php/composer_test.go new file mode 100644 index 00000000..ad01c475 --- /dev/null +++ b/local/php/composer_test.go @@ -0,0 +1,27 @@ +package php + +import ( + "path/filepath" + + . "gopkg.in/check.v1" +) + +type ComposerSuite struct{} + +var _ = Suite(&ComposerSuite{}) + +func (s *ComposerSuite) TestIsComposerPHPScript(c *C) { + dir, err := filepath.Abs("testdata/php_scripts") + c.Assert(err, IsNil) + + c.Assert(isPHPScript(filepath.Join(dir, "unknown")), Equals, false) + c.Assert(isPHPScript(filepath.Join(dir, "invalid")), Equals, false) + + for _, validScripts := range []string{ + "usual-one", + "debian-style", + "custom-one", + } { + c.Assert(isPHPScript(filepath.Join(dir, validScripts)), Equals, true) + } +} diff --git a/local/php/testdata/php_scripts/custom-one b/local/php/testdata/php_scripts/custom-one new file mode 100755 index 00000000..e86bf5f1 --- /dev/null +++ b/local/php/testdata/php_scripts/custom-one @@ -0,0 +1,4 @@ +#!/opt/homebrew/Cellar/php/8.2.1_1/bin/php + Date: Wed, 1 Feb 2023 15:54:51 -0500 Subject: [PATCH 081/466] Fix missing parameter --- commands/openers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/openers.go b/commands/openers.go index 43ae262b..7bda80e7 100644 --- a/commands/openers.go +++ b/commands/openers.go @@ -135,7 +135,7 @@ var projectLocalRabbitMQManagementOpenCmd = &console.Command{ func abstractOpenCmd(url string) { if err := open.Run(url); err != nil { terminal.Eprintln("Error while opening:", err, "") - terminal.Eprintfln("Please visit %s manually.", url) + terminal.Eprintfln("Please visit %s manually.", url, url) } else { terminal.Eprintfln("Opened: %s", url, url) } From 1ab34b279d17cb3d0786584819c0df2ee97f48d5 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 1 Feb 2023 14:05:07 -0500 Subject: [PATCH 082/466] Support Kibana as service, refs #197 --- envs/docker.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/envs/docker.go b/envs/docker.go index a94edbe9..8cd6a9af 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -380,6 +380,16 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ "scheme": "http", } return rels + } else if p.PrivatePort == 5601 { + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "path": "/", + "rel": "kibana", + "scheme": "http", + } + return rels } else if p.PrivatePort == 27017 { path := "" for _, env := range c.Config.Env { From 5e309e764143c9e1dd4ba550147b7522fdb21622 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 1 Feb 2023 15:39:55 -0500 Subject: [PATCH 083/466] Treat any service using usual HTTP ports as an HTTP service --- envs/docker.go | 6 ++++++ envs/envs.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/envs/docker.go b/envs/docker.go index a94edbe9..8b8eb9b6 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -429,6 +429,12 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ "port": formatDockerPort(p.PublicPort), "rel": "simple", } + // Official HTTP(s) ports or well know alternatives + if p.PrivatePort == 80 || p.PrivatePort == 8008 || p.PrivatePort == 8080 || p.PrivatePort == 8081 { + rels[""]["scheme"] = "http" + } else if p.PrivatePort == 443 || p.PrivatePort == 8443 { + rels[""]["scheme"] = "https" + } return rels } diff --git a/envs/envs.go b/envs/envs.go index e12b2d57..88561569 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -269,7 +269,7 @@ func extractRelationshipsEnvs(env Environment) Envs { } else if rel == "mercure" { values["MERCURE_URL"] = fmt.Sprintf("%s://%s:%s/.well-known/mercure", endpoint["scheme"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) values["MERCURE_PUBLIC_URL"] = values["MERCURE_URL"] - } else if scheme == "http" { + } else if scheme == "http" || scheme == "https" { username, hasUsername := endpoint["username"].(string) password, hasPassword := endpoint["password"].(string) if hasUsername || hasPassword { From 54d049e86c0ea29af4f11d4b7cb6bd7f7e8e7a26 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 1 Feb 2023 15:41:13 -0500 Subject: [PATCH 084/466] Add a new more generic `local:open:service` command --- commands/openers.go | 38 +++++++++++++++++++++++++++++------ commands/root.go | 1 + envs/local.go | 49 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 6 deletions(-) diff --git a/commands/openers.go b/commands/openers.go index 43ae262b..5e40017a 100644 --- a/commands/openers.go +++ b/commands/openers.go @@ -94,9 +94,7 @@ var projectLocalMailCatcherOpenCmd = &console.Command{ if err != nil { return err } - prefix := env.FindRelationshipPrefix("mailer", "http") - values := envs.AsMap(env) - url, exists := values[prefix+"URL"] + url, exists := env.FindServiceUrl("mailer") if !exists { return console.Exit("Mailcatcher Web interface not found", 1) } @@ -121,9 +119,7 @@ var projectLocalRabbitMQManagementOpenCmd = &console.Command{ if err != nil { return err } - prefix := env.FindRelationshipPrefix("amqp", "http") - values := envs.AsMap(env) - url, exists := values[prefix+"URL"] + url, exists := env.FindServiceUrl("amqp") if !exists { return console.Exit("RabbitMQ management not found", 1) } @@ -132,6 +128,36 @@ var projectLocalRabbitMQManagementOpenCmd = &console.Command{ }, } +var projectLocalServiceOpenCmd = &console.Command{ + Category: "open", + Name: "local:service", + Usage: "Open a local service web interface in a browser", + Flags: []console.Flag{ + dirFlag, + }, + Args: []*console.Arg{ + {Name: "service", Description: "The service name (or type) to open"}, + }, + Action: func(c *console.Context) error { + projectDir, err := getProjectDir(c.String("dir")) + if err != nil { + return err + } + env, err := envs.NewLocal(projectDir, terminal.IsDebug()) + if err != nil { + return err + } + service := c.Args().Get("service") + url, exists := env.FindServiceUrl(service) + if !exists { + return console.Exit(fmt.Sprintf("Service \"%s\" not found", service), 1) + } + + abstractOpenCmd(url) + return nil + }, +} + func abstractOpenCmd(url string) { if err := open.Run(url); err != nil { terminal.Eprintln("Error while opening:", err, "") diff --git a/commands/root.go b/commands/root.go index 068c5d15..de9807e1 100644 --- a/commands/root.go +++ b/commands/root.go @@ -83,6 +83,7 @@ func CommonCommands() []*console.Command { localSecurityCheckCmd, projectLocalMailCatcherOpenCmd, projectLocalRabbitMQManagementOpenCmd, + projectLocalServiceOpenCmd, projectLocalOpenCmd, } return append(localCommands, adminCommands...) diff --git a/envs/local.go b/envs/local.go index 40eb3c82..37e07b96 100644 --- a/envs/local.go +++ b/envs/local.go @@ -75,6 +75,55 @@ func (l *Local) FindRelationshipPrefix(frel, fscheme string) string { return "" } +func (l *Local) FindServiceUrl(serviceOrRelationship string) (string, bool) { + relationships := l.Relationships() + env := AsMap(l) + + if endpoints, serviceIsDefined := relationships[serviceOrRelationship]; serviceIsDefined { + for i, endpoint := range endpoints { + if scheme, ok := endpoint["scheme"].(string); !ok { + continue + } else if scheme != "http" && scheme != "https" { + continue + } + + prefix := fmt.Sprintf("%s_", strings.Replace(strings.ToUpper(serviceOrRelationship), "-", "_", -1)) + if i != 0 { + prefix += fmt.Sprintf("%d_", i) + } + + if url, exists := env[prefix+"URL"]; exists { + return url, true + } + } + } + + for key, endpoints := range relationships { + for i, endpoint := range endpoints { + if endpoint["rel"].(string) != serviceOrRelationship { + continue + } + + if scheme, ok := endpoint["scheme"].(string); !ok { + continue + } else if scheme != "http" && scheme != "https" { + continue + } + + prefix := fmt.Sprintf("%s_", strings.Replace(strings.ToUpper(key), "-", "_", -1)) + if i != 0 { + prefix += fmt.Sprintf("%d_", i) + } + + if url, exists := env[prefix+"URL"]; exists { + return url, true + } + } + } + + return "", false +} + // Path returns the project's path func (l *Local) Path() string { return l.Dir From 741e08ac5ba3370e92530e8f59bfc76571530381 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 2 Feb 2023 09:05:35 -0500 Subject: [PATCH 085/466] Fix bad printf pattern for links in `local:open:*` commands --- commands/openers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/openers.go b/commands/openers.go index 8fde0626..7e51e8a3 100644 --- a/commands/openers.go +++ b/commands/openers.go @@ -161,7 +161,7 @@ var projectLocalServiceOpenCmd = &console.Command{ func abstractOpenCmd(url string) { if err := open.Run(url); err != nil { terminal.Eprintln("Error while opening:", err, "") - terminal.Eprintfln("Please visit %s manually.", url, url) + terminal.Eprintfln("Please visit %s manually.", url, url) } else { terminal.Eprintfln("Opened: %s", url, url) } From 3ac3a970b878b769999a16f1f7dc922733552d33 Mon Sep 17 00:00:00 2001 From: Quentin Date: Fri, 3 Feb 2023 15:53:55 +0100 Subject: [PATCH 086/466] Add MongoDB env vars to match Flex recipes default config --- envs/envs.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/envs/envs.go b/envs/envs.go index 88561569..696b994b 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -229,9 +229,11 @@ func extractRelationshipsEnvs(env Environment) Envs { values[fmt.Sprintf("%sSCHEME", prefix)] = endpoint["scheme"].(string) values[fmt.Sprintf("%sNAME", prefix)] = endpoint["path"].(string) values[fmt.Sprintf("%sDATABASE", prefix)] = endpoint["path"].(string) + values[fmt.Sprintf("%sDB", prefix)] = endpoint["path"].(string) values[fmt.Sprintf("%sUSER", prefix)] = endpoint["username"].(string) values[fmt.Sprintf("%sUSERNAME", prefix)] = endpoint["username"].(string) values[fmt.Sprintf("%sPASSWORD", prefix)] = endpoint["password"].(string) + values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s/?authSource=%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"]), endpoint["path"].(string)) } else if scheme == "amqp" { values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) values[fmt.Sprintf("%sDSN", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) From 6be550390843158312cb90b519e2c262a7bdd4e5 Mon Sep 17 00:00:00 2001 From: Quentin Date: Mon, 6 Feb 2023 08:32:59 +0100 Subject: [PATCH 087/466] Reformat very long URL line --- envs/envs.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/envs/envs.go b/envs/envs.go index 696b994b..0bf28726 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -233,7 +233,14 @@ func extractRelationshipsEnvs(env Environment) Envs { values[fmt.Sprintf("%sUSER", prefix)] = endpoint["username"].(string) values[fmt.Sprintf("%sUSERNAME", prefix)] = endpoint["username"].(string) values[fmt.Sprintf("%sPASSWORD", prefix)] = endpoint["password"].(string) - values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s/?authSource=%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"]), endpoint["path"].(string)) + values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf( + "%s://%s:%s@%s:%s/?authSource=%s", + endpoint["scheme"].(string), + endpoint["username"].(string), + endpoint["password"].(string), + endpoint["host"].(string), + formatInt(endpoint["port"]), + endpoint["path"].(string)) } else if scheme == "amqp" { values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) values[fmt.Sprintf("%sDSN", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) From e1ba1a9ba5235bf0f9b961b4ae04d9783159701b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 6 Feb 2023 13:56:44 +0100 Subject: [PATCH 088/466] Fix CS --- envs/envs.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/envs/envs.go b/envs/envs.go index 0bf28726..76e5f9c8 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -223,6 +223,7 @@ func extractRelationshipsEnvs(env Environment) Envs { if !isMaster(endpoint) { continue } + values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s/?authSource=%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"]), endpoint["path"].(string)) values[fmt.Sprintf("%sSERVER", prefix)] = formatServer(endpoint) values[fmt.Sprintf("%sHOST", prefix)] = endpoint["host"].(string) values[fmt.Sprintf("%sPORT", prefix)] = formatInt(endpoint["port"]) @@ -233,14 +234,6 @@ func extractRelationshipsEnvs(env Environment) Envs { values[fmt.Sprintf("%sUSER", prefix)] = endpoint["username"].(string) values[fmt.Sprintf("%sUSERNAME", prefix)] = endpoint["username"].(string) values[fmt.Sprintf("%sPASSWORD", prefix)] = endpoint["password"].(string) - values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf( - "%s://%s:%s@%s:%s/?authSource=%s", - endpoint["scheme"].(string), - endpoint["username"].(string), - endpoint["password"].(string), - endpoint["host"].(string), - formatInt(endpoint["port"]), - endpoint["path"].(string)) } else if scheme == "amqp" { values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) values[fmt.Sprintf("%sDSN", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) From f655a2dfc0544f4279d8b46a4d9cf88c5ff589c3 Mon Sep 17 00:00:00 2001 From: Naoki Ikeguchi Date: Wed, 8 Feb 2023 12:23:28 +0900 Subject: [PATCH 089/466] feat: Support dumping TLS keylog in NSS format for debugging --- commands/local_server_start.go | 4 ++++ local/http/http.go | 13 +++++++++++++ local/project/config.go | 13 ++++++++----- local/project/project.go | 1 + 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 266b30fe..c1c6cadc 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -68,6 +68,10 @@ var localServerStartCmd = &console.Command{ &console.StringFlag{Name: "p12", Usage: "Name of the file containing the TLS certificate to use in p12 format"}, &console.BoolFlag{Name: "no-tls", Usage: "Use HTTP instead of HTTPS"}, &console.BoolFlag{Name: "use-gzip", Usage: "Use GZIP"}, + &console.StringFlag{ + Name: "tls-key-log-file", + Usage: "Destination for TLS master secrets in NSS key log format", + }, }, Action: func(c *console.Context) error { ui := terminal.SymfonyStyle(terminal.Stdout, terminal.Stdin) diff --git a/local/http/http.go b/local/http/http.go index a907d1d3..43e09e67 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -22,6 +22,7 @@ package http import ( "crypto/tls" "fmt" + "io" "net" "net/http" "os" @@ -53,6 +54,7 @@ type Server struct { Logger zerolog.Logger Appversion string UseGzip bool + TlsKeyLogFile string httpserver *http.Server httpsserver *http.Server @@ -111,6 +113,16 @@ func (s *Server) Start(errChan chan error) (int, error) { return port, errors.WithStack(err) } + var keyLogWriter io.Writer + if s.TlsKeyLogFile != "" { + w, err := os.OpenFile(s.TlsKeyLogFile, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0600) + if err != nil { + return port, errors.WithStack(err) + } + + keyLogWriter = w + } + s.httpsserver = &http.Server{ Handler: proxyHandler, TLSConfig: &tls.Config{ @@ -118,6 +130,7 @@ func (s *Server) Start(errChan chan error) (int, error) { CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256}, Certificates: []tls.Certificate{cert}, NextProtos: []string{"h2", "http/1.1"}, + KeyLogWriter: keyLogWriter, }, } diff --git a/local/project/config.go b/local/project/config.go index 35848e20..b1ef0825 100644 --- a/local/project/config.go +++ b/local/project/config.go @@ -41,10 +41,11 @@ type Config struct { PKCS12 string `yaml:"p12"` Logger zerolog.Logger AppVersion string - AllowHTTP bool `yaml:"allow_http"` - NoTLS bool `yaml:"no_tls"` - Daemon bool `yaml:"daemon"` - UseGzip bool `yaml:"use_gzip"` + AllowHTTP bool `yaml:"allow_http"` + NoTLS bool `yaml:"no_tls"` + Daemon bool `yaml:"daemon"` + UseGzip bool `yaml:"use_gzip"` + TlsKeyLogFile string `yaml:"tls_key_log_file"` } type FileConfig struct { @@ -104,10 +105,12 @@ func NewConfigFromContext(c *console.Context, projectDir string) (*Config, *File if c.IsSet("daemon") { config.Daemon = c.Bool("daemon") } - if c.IsSet("use-gzip") { config.UseGzip = c.Bool("use-gzip") } + if c.IsSet("tls-key-log-file") { + config.TlsKeyLogFile = c.String("tls-key-log-file") + } return config, fileConfig, nil } diff --git a/local/project/project.go b/local/project/project.go index 6fcb0c88..400b9816 100644 --- a/local/project/project.go +++ b/local/project/project.go @@ -62,6 +62,7 @@ func New(c *Config) (*Project, error) { AllowHTTP: c.AllowHTTP, UseGzip: c.UseGzip, Appversion: c.AppVersion, + TlsKeyLogFile: c.TlsKeyLogFile, }, } if err != nil { From 4b61b18795391348dab2ef77e5c5dd271cc78828 Mon Sep 17 00:00:00 2001 From: Naoki Ikeguchi Date: Wed, 8 Feb 2023 12:26:50 +0900 Subject: [PATCH 090/466] feat: Support 'SSLKEYLOGFILE' environment variable --- commands/local_server_start.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index c1c6cadc..eefc098c 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -173,6 +173,13 @@ var localServerStartCmd = &console.Command{ } } + // If 'SSLKEYLOGFILE' environment variable is set, uses this as a destination of TLS key log. + // In this context, the name 'SSLKEYLOGFILE' is common, so using 'SSL' instead of 'TLS' name. + // The key log file from the console argument or YAML config is preferred than the environment variable. + if path := os.Getenv("SSLKEYLOGFILE"); path != "" && config.TlsKeyLogFile == "" { + config.TlsKeyLogFile = path + } + lw, err := pidFile.LogWriter() if err != nil { return err From 66fe833cfefd91404831abb2da1e8015c7a0fb78 Mon Sep 17 00:00:00 2001 From: Naoki Ikeguchi Date: Wed, 8 Feb 2023 12:32:12 +0900 Subject: [PATCH 091/466] feat: Show warning message if TLS key logging is enabled --- commands/local_server_start.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index eefc098c..f4e5d687 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -50,6 +50,7 @@ import ( ) var localWebServerProdWarningMsg = "The local web server is optimized for local development and MUST never be used in a production setup." +var localWebServerTlsKeyLogWarningMsg = "Logging TLS master key is enabled. It means TLS connections between the client and this server will be INSECURE. This is NOT recommended unless you are debugging the connections." var localServerStartCmd = &console.Command{ Category: "local", @@ -180,6 +181,10 @@ var localServerStartCmd = &console.Command{ config.TlsKeyLogFile = path } + if config.TlsKeyLogFile != "" { + ui.Warning(localWebServerTlsKeyLogWarningMsg) + } + lw, err := pidFile.LogWriter() if err != nil { return err From 91696a4e4fa5a8aee1b2ea9d8f703fcf10dbb6e8 Mon Sep 17 00:00:00 2001 From: Naoki Ikeguchi Date: Wed, 8 Feb 2023 17:28:28 +0900 Subject: [PATCH 092/466] feat: Prefer environment variable than config or console argument --- commands/local_server_start.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index f4e5d687..946e2ec7 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -176,8 +176,8 @@ var localServerStartCmd = &console.Command{ // If 'SSLKEYLOGFILE' environment variable is set, uses this as a destination of TLS key log. // In this context, the name 'SSLKEYLOGFILE' is common, so using 'SSL' instead of 'TLS' name. - // The key log file from the console argument or YAML config is preferred than the environment variable. - if path := os.Getenv("SSLKEYLOGFILE"); path != "" && config.TlsKeyLogFile == "" { + // This environment variable is preferred than the key log file from the console argument. + if path := os.Getenv("SSLKEYLOGFILE"); path != "" { config.TlsKeyLogFile = path } From 19843713fb7341327e9365349a60d1566abed5ec Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 8 Feb 2023 08:47:54 -0500 Subject: [PATCH 093/466] Refacto: Make the console handles SSLKEYLOGFILE env variable precedences --- commands/local_server_start.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 946e2ec7..7cfd022d 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -72,6 +72,12 @@ var localServerStartCmd = &console.Command{ &console.StringFlag{ Name: "tls-key-log-file", Usage: "Destination for TLS master secrets in NSS key log format", + // If 'SSLKEYLOGFILE' environment variable is set, uses this as a + // destination of TLS key log. In this context, the name + // 'SSLKEYLOGFILE' is common, so using 'SSL' instead of 'TLS' name. + // This environment variable is preferred than the key log file + // from the console argument. + EnvVars: []string{"SSLKEYLOGFILE"}, }, }, Action: func(c *console.Context) error { @@ -174,13 +180,6 @@ var localServerStartCmd = &console.Command{ } } - // If 'SSLKEYLOGFILE' environment variable is set, uses this as a destination of TLS key log. - // In this context, the name 'SSLKEYLOGFILE' is common, so using 'SSL' instead of 'TLS' name. - // This environment variable is preferred than the key log file from the console argument. - if path := os.Getenv("SSLKEYLOGFILE"); path != "" { - config.TlsKeyLogFile = path - } - if config.TlsKeyLogFile != "" { ui.Warning(localWebServerTlsKeyLogWarningMsg) } From 7457772b951eb7fe8e9c2545ce938d4e5c2b7d1f Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 1 Feb 2023 16:38:43 -0500 Subject: [PATCH 094/466] Add links to every HTTP services found into the Symfony WDT --- envs/local.go | 18 +++++++++++++++ local/php/toolbar.go | 54 ++++++++++++++++++++++++-------------------- 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/envs/local.go b/envs/local.go index 37e07b96..ca2dfd3d 100644 --- a/envs/local.go +++ b/envs/local.go @@ -75,6 +75,24 @@ func (l *Local) FindRelationshipPrefix(frel, fscheme string) string { return "" } +func (l *Local) FindHttpServices() []string { + services := []string{} + + for key, endpoints := range l.Relationships() { + for _, endpoint := range endpoints { + if scheme, ok := endpoint["scheme"].(string); !ok { + continue + } else if scheme != "http" && scheme != "https" { + continue + } + + services = append(services, key) + } + } + + return services +} + func (l *Local) FindServiceUrl(serviceOrRelationship string) (string, bool) { relationships := l.Relationships() env := AsMap(l) diff --git a/local/php/toolbar.go b/local/php/toolbar.go index 718722e5..df6dacb2 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -22,13 +22,14 @@ package php import ( "bytes" "fmt" - "io" - "io/ioutil" - "regexp" - "github.com/pkg/errors" "github.com/symfony-cli/symfony-cli/envs" "github.com/symfony-cli/terminal" + "golang.org/x/text/cases" + "golang.org/x/text/language" + "io" + "io/ioutil" + "regexp" ) func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.ReadCloser, error) { @@ -81,23 +82,32 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea } } - webmail := `Down` - rabbitmqui := `Down` + webmail := `Webmail Down` + rabbitmqui := `RabbitMQ UI Down` blackfire := `Down` + extraLinks := `` if env, err := envs.NewLocal(p.projectDir, terminal.IsDebug()); err == nil { - values := envs.AsMap(env) - if prefix := env.FindRelationshipPrefix("mailer", "http"); prefix != "" { - if url, exists := values[prefix+"URL"]; exists { - webmail = fmt.Sprintf(`Up   Open`, url) - } + if url, exists := env.FindServiceUrl("mailer"); exists { + webmail = fmt.Sprintf(`Webmail Up`, url) } - if prefix := env.FindRelationshipPrefix("amqp", "http"); prefix != "" { - if url, exists := values[prefix+"URL"]; exists { - rabbitmqui = fmt.Sprintf(`Up   Open`, url) - } + if url, exists := env.FindServiceUrl("amqp"); exists { + rabbitmqui = fmt.Sprintf(`RabbitMQ UI Up`, url) } if prefix := env.FindRelationshipPrefix("blackfire", "tcp"); prefix != "" { - blackfire = `Up   Open` + blackfire = `Up` + } + for _, service := range env.FindHttpServices() { + if service == "mailer-web" || service == "amqp" { + continue + } + + if url, exists := env.FindServiceUrl(service); exists { + extraLinks += fmt.Sprintf(``, url, cases.Title(language.Und).String(service)) + } + } + + if len(extraLinks) > 0 { + extraLinks = `
` + extraLinks } } @@ -129,15 +139,11 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea
Env Vars` + envVars + `
+
` + rabbitmqui + `
+
` + webmail + `
- RabbitMQ UI` + rabbitmqui + ` -
-
- Webmail` + webmail + ` -
-
- Blackfire.io Agent` + blackfire + ` -
+ Blackfire.io Agent` + blackfire + ` + ` + extraLinks + `
From 06ec8c9c411fea23cdac30fc66417b0f8177e054 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 8 Feb 2023 08:55:12 -0500 Subject: [PATCH 095/466] Use rel="noopener" for links injected in Symfony's WDT --- local/php/toolbar.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/local/php/toolbar.go b/local/php/toolbar.go index df6dacb2..9dca0dfc 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -88,10 +88,10 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea extraLinks := `` if env, err := envs.NewLocal(p.projectDir, terminal.IsDebug()); err == nil { if url, exists := env.FindServiceUrl("mailer"); exists { - webmail = fmt.Sprintf(`Webmail Up`, url) + webmail = fmt.Sprintf(`Webmail Up`, url) } if url, exists := env.FindServiceUrl("amqp"); exists { - rabbitmqui = fmt.Sprintf(`RabbitMQ UI Up`, url) + rabbitmqui = fmt.Sprintf(`RabbitMQ UI Up`, url) } if prefix := env.FindRelationshipPrefix("blackfire", "tcp"); prefix != "" { blackfire = `Up` @@ -102,7 +102,7 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea } if url, exists := env.FindServiceUrl(service); exists { - extraLinks += fmt.Sprintf(``, url, cases.Title(language.Und).String(service)) + extraLinks += fmt.Sprintf(``, url, cases.Title(language.Und).String(service)) } } @@ -142,7 +142,7 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea
` + rabbitmqui + `
` + webmail + `
- Blackfire.io Agent` + blackfire + `
+ Blackfire.io Agent` + blackfire + ` ` + extraLinks + `
From 8f3e1c7b06983a05a9101804f75c1661ae069b60 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 8 Feb 2023 14:25:26 -0500 Subject: [PATCH 096/466] Remove github.com/spf13/viper from the vendors As far as I can tell, this is only a reminiscence from th v4 codebase and viper is not actually used anymore. So let's remove the initialization and the vendor. --- commands/root.go | 17 -- go.mod | 11 -- go.sum | 416 ----------------------------------------------- 3 files changed, 444 deletions(-) diff --git a/commands/root.go b/commands/root.go index de9807e1..0a6e17d6 100644 --- a/commands/root.go +++ b/commands/root.go @@ -26,7 +26,6 @@ import ( "sync" "github.com/pkg/errors" - "github.com/spf13/viper" "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/reexec" "github.com/symfony-cli/symfony-cli/updater" @@ -99,7 +98,6 @@ func CheckGitIsAvailable(c *console.Context) error { func init() { initCLI() - initConfig() } func GetPSH() (*platformshCLI, error) { @@ -184,21 +182,6 @@ Environment variables to use Platform.sh relationships or Docker services are au ` } -// initConfig reads in config file and ENV variables if set. -func initConfig() { - if os.Getenv("SF_CONFIG") != "" { - viper.SetConfigFile(os.Getenv("SF_CONFIG")) - } - viper.SetConfigName("symfony") - viper.AddConfigPath("$HOME/.symfony") - viper.AddConfigPath(".") - viper.AutomaticEnv() - viper.SetEnvPrefix("SYMFONY") - if err := viper.ReadInConfig(); err == nil { - terminal.Logger.Info().Msg("Using config file: " + viper.ConfigFileUsed()) - } -} - func getProjectDir(dir string) (string, error) { var err error diff --git a/go.mod b/go.mod index d56e547a..bcf6b09a 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,6 @@ require ( github.com/rs/zerolog v1.28.0 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 - github.com/spf13/viper v1.14.0 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.1 github.com/symfony-cli/console v1.0.2 @@ -40,11 +39,9 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect @@ -54,17 +51,10 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/rivo/uniseg v0.4.2 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/spf13/afero v1.9.2 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.4.1 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect @@ -77,7 +67,6 @@ require ( golang.org/x/time v0.1.0 // indirect golang.org/x/tools v0.2.0 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.0 // indirect diff --git a/go.sum b/go.sum index 276e6c4d..93773fcc 100644 --- a/go.sum +++ b/go.sum @@ -1,57 +1,9 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -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/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/compose-spec/compose-go v1.7.0 h1:70HzJ/g81pdxF1ao9L7W2fgje/9FxNKH/davgvusEKc= github.com/compose-spec/compose-go v1.7.0/go.mod h1:Tb5Ae2PsYN3GTqYqzl2IRbTPiJtPZZjMw8UKUvmehFk= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -74,107 +26,35 @@ github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3O github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fabpot/local-php-security-checker/v2 v2.0.5 h1:789JcXy4sZdgQNVFiMQvttkxEH5588HIUt1GGIqYlO4= github.com/fabpot/local-php-security-checker/v2 v2.0.5/go.mod h1:YOYs9Zbva+kkuQB8EjBj+lgdgf5+CkyT4xfc3mP1oLc= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 h1:R2K7yLHPmwoTdmNuQ5Wfm0/evh/+QFdoI6EbW3OSMKw= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76/go.mod h1:jr1MMO0KsDD+PQ57K7oJGk97TLYtbhLUOjCS577Ddm4= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 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.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/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.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -182,8 +62,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -209,25 +87,18 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= @@ -240,31 +111,13 @@ github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EE github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -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/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= -github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 h1:vEf6LukDDCcMnRXnIMy5XRo/MR4+3lNTAhXxM+x0ZXI= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081/go.mod h1:mXF6uSYLo1a2BZPcVHpP8RstMYoQnCaFF+dmIY726NY= 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/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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.7.0/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 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/symfony-cli/cert v1.0.1 h1:ETYVBshgY+SaydBJmMkU0PaoDrWm6zsGNB/799ZQYCE= github.com/symfony-cli/cert v1.0.1/go.mod h1:g4WrLT6EQsEPmA19xh5Jv9Jnpg5EvtFqArJf2AG2S+w= github.com/symfony-cli/console v1.0.2 h1:u8KJm9jFbfzmN0y7fcfjjal3wWOLflNomu29PLgYQjQ= @@ -282,152 +135,38 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/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-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -440,177 +179,32 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 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.2/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-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -619,17 +213,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= software.sslmate.com/src/go-pkcs12 v0.2.0 h1:nlFkj7bTysH6VkC4fGphtjXRbezREPgrHuJG20hBGPE= software.sslmate.com/src/go-pkcs12 v0.2.0/go.mod h1:23rNcYsMabIc1otwLpTkCCPwUq6kQsTyowttG/as0kQ= From 7c2f9a7c00cc716f0c73d18fc24fb567a6fd2458 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 13 Feb 2023 10:39:44 -0500 Subject: [PATCH 097/466] Proxy: allow to by-pass some local domains --- local/proxy/proxy.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/local/proxy/proxy.go b/local/proxy/proxy.go index 71d989b0..d6743470 100644 --- a/local/proxy/proxy.go +++ b/local/proxy/proxy.go @@ -324,8 +324,13 @@ func (p *Proxy) servePacFile(w http.ResponseWriter, r *http.Request) { // Configuration file in ~/.symfony5/proxy.json function FindProxyForURL (url, host) { if (dnsDomainIs(host, '.%s')) { + if (isResolvable(host)) { + return 'DIRECT'; + } + return 'PROXY %s'; } + return 'DIRECT'; } `, p.TLD, p.TLD, r.Host))) From ca60a623b8e6d573fbade5987a7ffb7a33e8a973 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 15 Feb 2023 12:15:43 +0000 Subject: [PATCH 098/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 103 ------------------------------------- 1 file changed, 103 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index bae64aa7..60ac9432 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -23,109 +23,6 @@ package platformsh var availablePHPExts = map[string][]string{ - "amqp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "apc": {"5.4", "5.5"}, - "apcu": {"5.4", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "apcu_bc": {"7.0", "7.1", "7.2", "7.3", "7.4"}, - "applepay": {"7.0", "7.1", "7.4"}, - "bcmath": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "blackfire": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "bz2": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "calendar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "ctype": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "curl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "enchant": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "event": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "exif": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "ffi": {"7.4", "8.0", "8.1", "8.2"}, - "fileinfo": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "ftp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "gd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "gearman": {"5.4", "5.5", "5.6"}, - "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "gmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "http": {"5.4", "5.5", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "iconv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "imagick": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "interbase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, - "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "ioncube": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, - "json": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "ldap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "mailparse": {"7.0", "7.1", "7.2", "7.4", "8.0", "8.1", "8.2"}, - "mbstring": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "mcrypt": {"5.4", "5.5", "5.6", "7.0", "7.1"}, - "memcache": {"5.4", "5.5", "5.6"}, - "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "mongo": {"5.4", "5.5", "5.6"}, - "mongodb": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "mssql": {"5.4", "5.5", "5.6"}, - "mysql": {"5.4", "5.5", "5.6"}, - "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "newrelic": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "oauth": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, - "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo_sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pinba": {"5.4", "5.5", "5.6"}, - "posix": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "propro": {"5.6"}, - "pspell": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pthreads": {"7.1"}, - "raphf": {"5.6", "7.4", "8.0", "8.1", "8.2"}, - "rdkafka": {"8.1", "8.2"}, - "readline": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "recode": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3"}, - "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "simplexml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "snmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sourceguardian": {"7.0", "7.1"}, - "spplus": {"5.4", "5.5"}, - "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "ssh2": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sybase": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "tideways": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "tideways_xhprof": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "tidy": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "wddx": {"7.0", "7.1", "7.2", "7.3", "7.4"}, - "xdebug": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "xcache": {"5.4", "5.5"}, - "xhprof": {"5.4", "5.5", "5.6"}, - "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, - "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "zbarcode": {"7.0", "7.1", "7.2", "7.3"}, - "zendopcache": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "zip": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, } var availableServices = []*service{ From 7456df9a684583c9639099ada43e824deae81f42 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 15 Feb 2023 12:52:45 -0500 Subject: [PATCH 099/466] Fix deprecated used of github.com/docker/docker/client --- envs/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envs/docker.go b/envs/docker.go index 6f725151..8182b611 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -77,7 +77,7 @@ func (l *Local) RelationshipsFromDocker() Relationships { dialer := &net.Dialer{ Timeout: 2 * time.Second, } - opts = append(opts, docker.WithDialer(dialer)) + opts = append(opts, docker.WithDialContext(dialer.DialContext)) } client, err := docker.NewClientWithOpts(opts...) if err != nil { From bc6d2ec2bc8debb4db009232abbeb4fed5fb8058 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 8 Feb 2023 14:15:03 -0500 Subject: [PATCH 100/466] Update Go to 1.20 --- .github/workflows/go_generate_update.yml | 2 +- .github/workflows/releaser.yml | 2 +- go.mod | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go_generate_update.yml b/.github/workflows/go_generate_update.yml index ecdd54da..686ccbf7 100644 --- a/.github/workflows/go_generate_update.yml +++ b/.github/workflows/go_generate_update.yml @@ -17,7 +17,7 @@ jobs: name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: '1.20' - uses: actions/cache@v3 with: path: | diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index db22647a..b35b4016 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -35,7 +35,7 @@ jobs: name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: '1.20' - uses: actions/cache@v3 with: path: | diff --git a/go.mod b/go.mod index bcf6b09a..0452a848 100644 --- a/go.mod +++ b/go.mod @@ -73,4 +73,4 @@ require ( software.sslmate.com/src/go-pkcs12 v0.2.0 // indirect ) -go 1.19 +go 1.20 From 11b775a3394ff2aa76e5669625a4ff1f361069cc Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 9 Feb 2023 10:03:58 -0500 Subject: [PATCH 101/466] bump deps --- .github/workflows/go_generate_update.yml | 2 +- .github/workflows/releaser.yml | 2 +- go.mod | 32 +++++------ go.sum | 67 ++++++++++++++---------- 4 files changed, 56 insertions(+), 47 deletions(-) diff --git a/.github/workflows/go_generate_update.yml b/.github/workflows/go_generate_update.yml index 686ccbf7..ad7ee449 100644 --- a/.github/workflows/go_generate_update.yml +++ b/.github/workflows/go_generate_update.yml @@ -17,7 +17,7 @@ jobs: name: Set up Go uses: actions/setup-go@v3 with: - go-version: '1.20' + go-version: '^1.20.1' - uses: actions/cache@v3 with: path: | diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index b35b4016..0bbc8f95 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -35,7 +35,7 @@ jobs: name: Set up Go uses: actions/setup-go@v3 with: - go-version: '1.20' + go-version: '^1.20.1' - uses: actions/cache@v3 with: path: | diff --git a/go.mod b/go.mod index 0452a848..f8bca736 100644 --- a/go.mod +++ b/go.mod @@ -1,20 +1,21 @@ module github.com/symfony-cli/symfony-cli require ( - github.com/compose-spec/compose-go v1.7.0 - github.com/docker/docker v20.10.21+incompatible + github.com/NYTimes/gziphandler v1.1.1 + github.com/compose-spec/compose-go v1.9.0 + github.com/docker/docker v23.0.1+incompatible github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 - github.com/fabpot/local-php-security-checker/v2 v2.0.5 + github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru v0.6.0 github.com/hpcloud/tail v1.0.0 - github.com/joho/godotenv v1.4.0 + github.com/joho/godotenv v1.5.1 github.com/mitchellh/go-homedir v1.1.0 github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 github.com/rs/xid v1.4.0 - github.com/rs/zerolog v1.28.0 + github.com/rs/zerolog v1.29.0 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 @@ -24,14 +25,14 @@ require ( github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 golang.org/x/sync v0.1.0 + golang.org/x/text v0.7.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/Microsoft/go-winio v0.6.0 // indirect - github.com/NYTimes/gziphandler v1.1.1 - github.com/distribution/distribution/v3 v3.0.0-20221103125252-ebfa2a0ac0a9 // indirect + github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -43,7 +44,7 @@ require ( github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -52,20 +53,19 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/rivo/uniseg v0.4.2 // indirect + github.com/rivo/uniseg v0.4.3 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.1.0 // indirect - golang.org/x/mod v0.6.0 // indirect - golang.org/x/net v0.1.0 // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/term v0.1.0 // indirect - golang.org/x/text v0.4.0 // indirect + golang.org/x/crypto v0.6.0 // indirect + golang.org/x/mod v0.8.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect golang.org/x/time v0.1.0 // indirect - golang.org/x/tools v0.2.0 // indirect + golang.org/x/tools v0.6.0 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 93773fcc..e3c64825 100644 --- a/go.sum +++ b/go.sum @@ -4,20 +4,24 @@ github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2y github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/compose-spec/compose-go v1.7.0 h1:70HzJ/g81pdxF1ao9L7W2fgje/9FxNKH/davgvusEKc= -github.com/compose-spec/compose-go v1.7.0/go.mod h1:Tb5Ae2PsYN3GTqYqzl2IRbTPiJtPZZjMw8UKUvmehFk= +github.com/compose-spec/compose-go v1.9.0 h1:oaewhNhUP/AClVs6ytHzcjw1xwK+2EMWuvHXj6tYvRc= +github.com/compose-spec/compose-go v1.9.0/go.mod h1:Tb5Ae2PsYN3GTqYqzl2IRbTPiJtPZZjMw8UKUvmehFk= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20221103125252-ebfa2a0ac0a9 h1:doprs/RuXCuN864IfxC3h2qocrt158wGv3A5mcqSZQw= -github.com/distribution/distribution/v3 v3.0.0-20221103125252-ebfa2a0ac0a9/go.mod h1:6rIc5NMSjXjjnwzWWy3HAm9gDBu+X7aCzL8VrHIKgxM= +github.com/distribution/distribution/v3 v3.0.0-20230131081513-cf87e8d07e8d h1:q1rtMRnFYz9NAVV4k2iL/w5mNkur3TJysH3Phi9Ns08= +github.com/distribution/distribution/v3 v3.0.0-20230131081513-cf87e8d07e8d/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= +github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa h1:L9Ay/slwQ4ERSPaurC+TVkZrM0K98GNrEEo1En3e8as= +github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog= -github.com/docker/docker v20.10.21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.0+incompatible h1:L6c28tNyqZ4/ub9AZC9d5QUuunoHHfEH4/Ue+h/E5nE= +github.com/docker/docker v23.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= +github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -26,8 +30,8 @@ github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3O github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= -github.com/fabpot/local-php-security-checker/v2 v2.0.5 h1:789JcXy4sZdgQNVFiMQvttkxEH5588HIUt1GGIqYlO4= -github.com/fabpot/local-php-security-checker/v2 v2.0.5/go.mod h1:YOYs9Zbva+kkuQB8EjBj+lgdgf5+CkyT4xfc3mP1oLc= +github.com/fabpot/local-php-security-checker/v2 v2.0.6 h1:m1znXkwzIPFkJWOnH8Fgt1mHY9hq8u+GY4AC6CPnDME= +github.com/fabpot/local-php-security-checker/v2 v2.0.6/go.mod h1:bDff0jDpxt1pHsDtQ3v++cc/QuCM9K7Nq0dv65P1Ai8= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 h1:R2K7yLHPmwoTdmNuQ5Wfm0/evh/+QFdoI6EbW3OSMKw= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76/go.mod h1:jr1MMO0KsDD+PQ57K7oJGk97TLYtbhLUOjCS577Ddm4= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -51,8 +55,8 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= -github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -66,8 +70,9 @@ github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -96,15 +101,15 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= -github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= +github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= -github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= +github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -141,12 +146,12 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk 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-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 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= @@ -154,8 +159,10 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -174,16 +181,16 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 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.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -191,8 +198,10 @@ golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4= +golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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= From 331554ba99d7296c952ce7f65ce4f9d0e979a1c0 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 16 Feb 2023 07:48:18 +0100 Subject: [PATCH 102/466] Fix Platform.sh PHP extension parsing --- go.mod | 4 +- go.sum | 12 +--- local/platformsh/config.go | 103 +++++++++++++++++++++++++++ local/platformsh/generator/config.go | 53 ++++++-------- 4 files changed, 127 insertions(+), 45 deletions(-) diff --git a/go.mod b/go.mod index f8bca736..794d7b9e 100644 --- a/go.mod +++ b/go.mod @@ -59,9 +59,9 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.6.0 // indirect + golang.org/x/crypto v0.1.0 // indirect golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.7.0 // indirect + golang.org/x/net v0.6.0 // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/time v0.1.0 // indirect diff --git a/go.sum b/go.sum index e3c64825..3f46cd7e 100644 --- a/go.sum +++ b/go.sum @@ -12,14 +12,10 @@ github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20230131081513-cf87e8d07e8d h1:q1rtMRnFYz9NAVV4k2iL/w5mNkur3TJysH3Phi9Ns08= -github.com/distribution/distribution/v3 v3.0.0-20230131081513-cf87e8d07e8d/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa h1:L9Ay/slwQ4ERSPaurC+TVkZrM0K98GNrEEo1En3e8as= github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.0+incompatible h1:L6c28tNyqZ4/ub9AZC9d5QUuunoHHfEH4/Ue+h/E5nE= -github.com/docker/docker v23.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= @@ -146,8 +142,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk 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-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= @@ -161,8 +157,6 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -198,8 +192,6 @@ golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4= -golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 60ac9432..b0c8ee68 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -23,6 +23,109 @@ package platformsh var availablePHPExts = map[string][]string{ + "amqp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "apc": {"5.4", "5.5"}, + "apcu": {"5.4", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "apcu_bc": {"7.0", "7.1", "7.2", "7.3", "7.4"}, + "applepay": {"7.0", "7.1", "7.4"}, + "bcmath": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "blackfire": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "bz2": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "calendar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "ctype": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "curl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "enchant": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "event": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "exif": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "ffi": {"7.4", "8.0", "8.1", "8.2"}, + "fileinfo": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "ftp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "gd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "gearman": {"5.4", "5.5", "5.6"}, + "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "gmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "http": {"5.4", "5.5", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "iconv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "imagick": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, + "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "interbase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "ioncube": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "json": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, + "ldap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "mailparse": {"7.0", "7.1", "7.2", "7.4", "8.0", "8.1", "8.2"}, + "mbstring": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "mcrypt": {"5.4", "5.5", "5.6", "7.0", "7.1"}, + "memcache": {"5.4", "5.5", "5.6"}, + "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "mongo": {"5.4", "5.5", "5.6", "7.0"}, + "mongodb": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "mssql": {"5.4", "5.5", "5.6"}, + "mysql": {"5.4", "5.5", "5.6"}, + "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "newrelic": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "oauth": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, + "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pinba": {"5.4", "5.5", "5.6"}, + "posix": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "propro": {"5.6"}, + "pspell": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pthreads": {"7.1"}, + "raphf": {"5.6", "7.4", "8.0", "8.1", "8.2"}, + "rdkafka": {"8.1", "8.2"}, + "readline": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "recode": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3"}, + "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "simplexml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "snmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sourceguardian": {"7.0", "7.1"}, + "spplus": {"5.4", "5.5"}, + "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "ssh2": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sybase": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "tideways": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "tideways_xhprof": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "tidy": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "wddx": {"7.0", "7.1", "7.2", "7.3", "7.4"}, + "xcache": {"5.4", "5.5"}, + "xdebug": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "xhprof": {"5.4", "5.5", "5.6"}, + "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, + "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "zbarcode": {"7.0", "7.1", "7.2", "7.3"}, + "zendopcache": {"5.4"}, + "zip": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, } var availableServices = []*service{ diff --git a/local/platformsh/generator/config.go b/local/platformsh/generator/config.go index 32b59d8d..a7535db3 100644 --- a/local/platformsh/generator/config.go +++ b/local/platformsh/generator/config.go @@ -1,12 +1,10 @@ package main import ( - "bufio" "bytes" "encoding/json" "fmt" "io/ioutil" - "log" "net/http" "os" "sort" @@ -14,6 +12,7 @@ import ( "text/template" "github.com/hashicorp/go-version" + "gopkg.in/yaml.v2" ) type service struct { @@ -139,7 +138,7 @@ func parseServices() (string, error) { } func parsePHPExtensions() (string, error) { - resp, err := http.Get("https://raw.githubusercontent.com/platformsh/platformsh-docs/master/docs/src/languages/php/extensions.md") + resp, err := http.Get("https://raw.githubusercontent.com/platformsh/platformsh-docs/master/docs/data/php_extensions.yaml") if err != nil { return "", err } @@ -147,45 +146,33 @@ func parsePHPExtensions() (string, error) { var versions []string orderedExtensionNames := []string{} extensions := make(map[string][]string) - started := false - scanner := bufio.NewScanner(resp.Body) - for scanner.Scan() { - line := scanner.Text() - if started { - if strings.HasPrefix(line, "| ---") { - continue - } - if !strings.HasPrefix(line, "| ") { - break - } - name, available := parseLine(line) - name = strings.ToLower(strings.Trim(name, "`")) - if _, ok := extensions[name]; ok { - log.Printf("WARNING: The %s extension is listed twice, ignoring extra definition!\n", name) - } else { + + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return "", err + } + var fullConfig map[string]map[string]interface{} + if err := yaml.Unmarshal(body, &fullConfig); err != nil { + return "", err + } + for version, rawCfg := range fullConfig["grid"] { + cfg := rawCfg.(map[interface{}]interface{}) + for _, ext := range append(cfg["available"].([]interface{}), cfg["default"].([]interface{})...) { + name := strings.ToLower(ext.(string)) + if _, ok := extensions[name]; !ok { orderedExtensionNames = append(orderedExtensionNames, name) - var vs []string - for i, v := range available { - if v != "" { - vs = append(vs, versions[i]) - } - } - extensions[name] = vs } - } - if strings.HasPrefix(line, "| Extension") { - started = true - _, versions = parseLine(line) + extensions[name] = append(extensions[name], version) } } - if err := scanner.Err(); err != nil { - return "", err - } + + sort.Strings(orderedExtensionNames) maxNameLen := 0 for name := range extensions { if len(name) > maxNameLen { maxNameLen = len(name) } + sort.Strings(extensions[name]) } extsAsString := "" From 84b9199f741bd3b06c4b95ab0ce2bffad2475e6d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 Feb 2023 12:15:32 +0000 Subject: [PATCH 103/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index b0c8ee68..af7f630f 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -62,7 +62,7 @@ var availablePHPExts = map[string][]string{ "mcrypt": {"5.4", "5.5", "5.6", "7.0", "7.1"}, "memcache": {"5.4", "5.5", "5.6"}, "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "mongo": {"5.4", "5.5", "5.6", "7.0"}, + "mongo": {"5.4", "5.5", "5.6"}, "mongodb": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "mssql": {"5.4", "5.5", "5.6"}, From 87427cf2583573fd58bb8b26143125ad39efd84c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 Feb 2023 16:11:16 +0000 Subject: [PATCH 104/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index af7f630f..0c625d19 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -115,7 +115,7 @@ var availablePHPExts = map[string][]string{ "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "wddx": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "xcache": {"5.4", "5.5"}, - "xdebug": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "xdebug": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "xhprof": {"5.4", "5.5", "5.6"}, "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, From 649d74424de0024edc3b5f2565527b74f70691fc Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 16 Feb 2023 12:34:40 -0500 Subject: [PATCH 105/466] Tweak PSH extensions list generator --- local/platformsh/generator/config.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/local/platformsh/generator/config.go b/local/platformsh/generator/config.go index a7535db3..a868cd50 100644 --- a/local/platformsh/generator/config.go +++ b/local/platformsh/generator/config.go @@ -151,14 +151,18 @@ func parsePHPExtensions() (string, error) { if err != nil { return "", err } - var fullConfig map[string]map[string]interface{} + var fullConfig struct { + Grid map[string]struct { + Available []string + Default []string + } + } if err := yaml.Unmarshal(body, &fullConfig); err != nil { return "", err } - for version, rawCfg := range fullConfig["grid"] { - cfg := rawCfg.(map[interface{}]interface{}) - for _, ext := range append(cfg["available"].([]interface{}), cfg["default"].([]interface{})...) { - name := strings.ToLower(ext.(string)) + for version, cfg := range fullConfig.Grid { + for _, ext := range append(cfg.Available, cfg.Default...) { + name := strings.ToLower(ext) if _, ok := extensions[name]; !ok { orderedExtensionNames = append(orderedExtensionNames, name) } From 63df11fe6f2f3dc7227ba3f20ec1f547ac66ff67 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 19 Feb 2023 10:09:06 +0100 Subject: [PATCH 106/466] Fix some typos and grammar issues --- commands/local_check_security.go | 2 +- envs/docker.go | 2 +- local/fcgi_client/fcgiclient.go | 6 +++--- local/pid/pidfile.go | 2 +- local/project/project.go | 2 +- local/proxy/proxy.go | 2 +- local/proxy/proxy_test.go | 3 +-- local/runner.go | 2 +- reexec/reexec.go | 4 ++-- 9 files changed, 12 insertions(+), 13 deletions(-) diff --git a/commands/local_check_security.go b/commands/local_check_security.go index bf4223f2..8c88775b 100644 --- a/commands/local_check_security.go +++ b/commands/local_check_security.go @@ -80,7 +80,7 @@ a specific "composer.lock" file.`, } defer f.Close() - // Ran inside a Github action, export vulns + // Ran inside a GitHub action, export vulns output, _ := security.Format(vulns, "raw_json") if _, err = f.WriteString("vulns=" + string(output) + "\n"); err != nil { return console.Exit(fmt.Sprintf("unable to write into github output: %s", err), 127) diff --git a/envs/docker.go b/envs/docker.go index 8182b611..25dd76d4 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -58,7 +58,7 @@ func normalizeDockerComposeProjectName(projectName string) string { // Port of https://github.com/docker/compose/blob/4e0fdd70bdae4f8d85e4ef9d0129ce445f3ece3c/compose/cli/command.py#L129-L130 // (prior to 615c01c50a51408a7fdfed66ecccf73781e87f2c) // This was used in Docker Compose prior to 1.21.0, some users might still use -// versions older though, so we keep this BC in the mean time. +// versions older though, so we keep this BC in the meantime. func normalizeDockerComposeProjectNameLegacy(projectName string) string { return dockerComposeNormalizeRegexpLegacy.ReplaceAllString(strings.ToLower(projectName), "") } diff --git a/local/fcgi_client/fcgiclient.go b/local/fcgi_client/fcgiclient.go index d3d68e42..d9bdc565 100644 --- a/local/fcgi_client/fcgiclient.go +++ b/local/fcgi_client/fcgiclient.go @@ -81,7 +81,7 @@ type header struct { Reserved uint8 } -// for padding so we don't have to allocate all the time +// for padding, so we don't have to allocate all the time // not synchronized because we don't care what the contents are var pad [maxPad]byte @@ -322,7 +322,7 @@ func (w *streamReader) Read(p []byte) (n int, err error) { return } -// Do made the request and returns a io.Reader that translates the data read +// Do makes the request and returns an io.Reader that translates the data read // from fcgi responder out of fcgi packet before returning it. func (f *FCGIClient) Do(p map[string]string, req io.Reader) (r io.Reader, err error) { err = f.writeBeginRequest(uint16(FCGI_RESPONDER), 0) @@ -345,7 +345,7 @@ func (f *FCGIClient) Do(p map[string]string, req io.Reader) (r io.Reader, err er return } -// Request returns a HTTP Response with Header and Body +// Request returns an HTTP Response with Header and Body // from fcgi responder func (f *FCGIClient) Request(p map[string]string, req io.Reader) (resp *http.Response, err error) { r, err := f.Do(p, req) diff --git a/local/pid/pidfile.go b/local/pid/pidfile.go index 9f211fe3..9f3758ee 100644 --- a/local/pid/pidfile.go +++ b/local/pid/pidfile.go @@ -56,7 +56,7 @@ func New(dir string, args []string) *PidFile { // server or proxy path = filepath.Join(util.GetHomeDir(), "var", name(dir)+".pid") } else { - // workers are stored in a sub-directory + // workers are stored in a subdirectory path = filepath.Join(util.GetHomeDir(), "var", name(dir), name(command)+".pid") } // we need to load the existing file if there is one diff --git a/local/project/project.go b/local/project/project.go index 400b9816..0813ec6c 100644 --- a/local/project/project.go +++ b/local/project/project.go @@ -111,7 +111,7 @@ func realPassthru(documentRoot, passthru string) (string, error) { } func guessDocumentRoot(path string) string { - // for Symfony: check if public-dir is setup in composer.json first + // for Symfony: check if public-dir is set up in composer.json first if b, err := ioutil.ReadFile(filepath.Join(path, "composer.json")); err == nil { var f map[string]interface{} if err := json.Unmarshal(b, &f); err == nil { diff --git a/local/proxy/proxy.go b/local/proxy/proxy.go index d6743470..041b4886 100644 --- a/local/proxy/proxy.go +++ b/local/proxy/proxy.go @@ -226,7 +226,7 @@ func New(config *Config, ca *cert.CA, logger *log.Logger, debug bool) *Proxy { backend := fmt.Sprintf("127.0.0.1:%d", pid.Port) if hostPort != "443" { - // No TLS termination required, let's go trough regular proxy + // No TLS termination required, let's go through regular proxy return goproxy.OkConnect, backend } diff --git a/local/proxy/proxy_test.go b/local/proxy/proxy_test.go index 03437d05..183d3153 100644 --- a/local/proxy/proxy_test.go +++ b/local/proxy/proxy_test.go @@ -37,7 +37,6 @@ import ( "github.com/rs/zerolog" "github.com/symfony-cli/cert" "github.com/symfony-cli/symfony-cli/local/pid" - . "gopkg.in/check.v1" ) func (s *ProxySuite) TestProxy(c *C) { @@ -114,7 +113,7 @@ func (s *ProxySuite) TestProxy(c *C) { Timeout: 1 * time.Second, } - // Test proxying a request to a non registered project + // Test proxying a request to a non-registered project { req, _ := http.NewRequest("GET", "https://foo.wip/", nil) req.Close = true diff --git a/local/runner.go b/local/runner.go index b128c91d..7337ae74 100644 --- a/local/runner.go +++ b/local/runner.go @@ -186,7 +186,7 @@ func (r *Runner) Run() error { timer.Stop() // when the command is really fast to run, it will be already - // done here so we need to forward exit status as it has + // done here, so we need to forward exit status as it has // finished later one go func() { cmdExitChan <- err }() case <-timer.C: diff --git a/reexec/reexec.go b/reexec/reexec.go index 15e28619..ab434f67 100644 --- a/reexec/reexec.go +++ b/reexec/reexec.go @@ -109,8 +109,8 @@ func Background(homeDir string) error { os.Setenv("REEXEC_WATCH_PID", fmt.Sprint(Getppid())) // We are in a reexec.Restart call (probably after an upgrade), watch // REEXEC_SHELL_PID instead of direct parent. - // For interactive sessions, this is not an issue, but for long running - // processes like tunnel:open, if we don't do that, they will exits right + // For interactive sessions, this is not an issue, but for long-running + // processes like tunnel:open, if we don't do that, they will exit right // after returning back to the shell because the direct parent (the initial // process that got upgraded) is the one watched. if shellPID := os.Getenv("REEXEC_SHELL_PID"); shellPID != "" { From 5396294d92e38b3f2e7eb84530cbe8d29295ef74 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 19 Feb 2023 10:10:23 +0100 Subject: [PATCH 107/466] Revert an unneeded change --- local/proxy/proxy_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/local/proxy/proxy_test.go b/local/proxy/proxy_test.go index 183d3153..da3f84eb 100644 --- a/local/proxy/proxy_test.go +++ b/local/proxy/proxy_test.go @@ -37,6 +37,7 @@ import ( "github.com/rs/zerolog" "github.com/symfony-cli/cert" "github.com/symfony-cli/symfony-cli/local/pid" + . "gopkg.in/check.v1" ) func (s *ProxySuite) TestProxy(c *C) { From 6189c4b186b671af212259252b615a70e774e10a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 12:15:11 +0000 Subject: [PATCH 108/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 85 +++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index ec2f5ba8..6754dcc6 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -401,6 +401,50 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "wait",}, }, }, + { + Category: "cloud:blue-green", + Name: "conclude", + Aliases: []*console.Alias{ + {Name: "blue-green:conclude", Hidden: true}, + }, + Usage: "[ ALPHA ] Conclude a blue/green deployment", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + }, + }, + { + Category: "cloud:blue-green", + Name: "deploy", + Aliases: []*console.Alias{ + {Name: "blue-green:deploy", Hidden: true}, + }, + Usage: "[ ALPHA ] Perform a blue/green deployment", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "routing-percentage",}, + }, + }, + { + Category: "cloud:blue-green", + Name: "enable", + Aliases: []*console.Alias{ + {Name: "blue-green:enable", Hidden: true}, + }, + Usage: "[ ALPHA ] Enable blue/green deployments", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "routing-percentage", Aliases: []string{"%"},}, + }, + }, { Category: "cloud:certificate", Name: "add", @@ -1993,14 +2037,32 @@ var Commands = []*console.Command{ Usage: "[ BETA ] Switch between sessions", Hidden: console.Hide, }, + { + Category: "cloud:source-operation", + Name: "list", + Aliases: []*console.Alias{ + {Name: "source-operation:list", Hidden: true}, + {Name: "cloud:source-ops"}, + {Name: "source-ops", Hidden: true}, + }, + Usage: "List source operations on an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "full",}, + &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + }, + }, { Category: "cloud:source-operation", Name: "run", Aliases: []*console.Alias{ {Name: "source-operation:run", Hidden: true}, }, - Usage: "[ BETA ] Run a source operation", - Hidden: console.Hide, + Usage: "Run a source operation", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, @@ -2364,6 +2426,25 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "wait",}, }, }, + { + Category: "cloud:version", + Name: "list", + Aliases: []*console.Alias{ + {Name: "version:list", Hidden: true}, + {Name: "cloud:versions"}, + {Name: "versions", Hidden: true}, + }, + Usage: "[ ALPHA ] List environment versions", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + }, + }, { Category: "cloud:worker", Name: "list", From 1be887f5099b769fd9f68d0704d9b21ae6119056 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 22 Feb 2023 08:11:40 +0000 Subject: [PATCH 109/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 6754dcc6..885e30eb 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1176,6 +1176,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix",}, &console.StringFlag{Name: "auth-token",}, &console.StringFlag{Name: "base-url",}, + &console.StringFlag{Name: "bitbucket-url",}, &console.BoolFlag{Name: "build-draft-pull-requests", DefaultValue: true,}, &console.BoolFlag{Name: "build-merge-requests", DefaultValue: true,}, &console.BoolFlag{Name: "build-pull-requests", DefaultValue: true,}, @@ -1278,6 +1279,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix",}, &console.StringFlag{Name: "auth-token",}, &console.StringFlag{Name: "base-url",}, + &console.StringFlag{Name: "bitbucket-url",}, &console.BoolFlag{Name: "build-draft-pull-requests", DefaultValue: true,}, &console.BoolFlag{Name: "build-merge-requests", DefaultValue: true,}, &console.BoolFlag{Name: "build-pull-requests", DefaultValue: true,}, From e8c822fdc5ad785bc017370e2befe2ccd5933d55 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 22 Feb 2023 09:53:25 +0100 Subject: [PATCH 110/466] Fix version command by upgrading deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 794d7b9e..b0c899a6 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.1 - github.com/symfony-cli/console v1.0.2 + github.com/symfony-cli/console v1.0.3 github.com/symfony-cli/phpstore v1.0.6 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 diff --git a/go.sum b/go.sum index 3f46cd7e..e05096c6 100644 --- a/go.sum +++ b/go.sum @@ -121,8 +121,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/symfony-cli/cert v1.0.1 h1:ETYVBshgY+SaydBJmMkU0PaoDrWm6zsGNB/799ZQYCE= github.com/symfony-cli/cert v1.0.1/go.mod h1:g4WrLT6EQsEPmA19xh5Jv9Jnpg5EvtFqArJf2AG2S+w= -github.com/symfony-cli/console v1.0.2 h1:u8KJm9jFbfzmN0y7fcfjjal3wWOLflNomu29PLgYQjQ= -github.com/symfony-cli/console v1.0.2/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= +github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= +github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= github.com/symfony-cli/phpstore v1.0.6 h1:ehkEaG05e4vIG2J06sVcdg6cmc7/u68+DhGcjDsOX/k= github.com/symfony-cli/phpstore v1.0.6/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.4 h1:jam7aN7g7WQ9uOwV9UC+iVGBLTlzK8kAC5EKcxq21Z8= From 84545209df53d9ffa02ee21136ad0f85c41e944b Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 23 Feb 2023 09:32:07 -0500 Subject: [PATCH 111/466] Add support for MongoDB username and password, fix #272 --- envs/docker.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/envs/docker.go b/envs/docker.go index 25dd76d4..dbabdd05 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -391,18 +391,26 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ } return rels } else if p.PrivatePort == 27017 { + username := "" + password := "" path := "" for _, env := range c.Config.Env { // that's our local convention if strings.HasPrefix(env, "MONGO_DATABASE") { path = getEnvValue(env, "MONGO_DATABASE") + } else if strings.HasPrefix(env, "MONGO_INITDB_DATABASE") { + path = getEnvValue(env, "MONGO_INITDB_DATABASE") + } else if strings.HasPrefix(env, "MONGO_INITDB_ROOT_USERNAME") { + username = getEnvValue(env, "MONGO_INITDB_ROOT_USERNAME") + } else if strings.HasPrefix(env, "MONGO_INITDB_ROOT_PASSWORD") { + password = getEnvValue(env, "MONGO_INITDB_ROOT_PASSWORD") } } rels[""] = map[string]interface{}{ "host": host, "ip": host, - "username": "", - "password": "", + "username": username, + "password": password, "path": path, "port": formatDockerPort(p.PublicPort), "rel": "mongodb", From 0e5331dff96db00ebb21eb509197ce1dadcf8f2a Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 23 Feb 2023 09:15:52 -0500 Subject: [PATCH 112/466] Enable releasing for ARM v6 and v7 I was not planning to release ARMv7 but it looks like Docker does not fall back to `linux/arm/v6` if `linux/arm/v7` is unavailable. So if we have to build it, let's also release the files. ------------------------ Closes #279 Fixes #278. It should fix #180. --- .goreleaser.yml | 34 +++++++++++++++++++++++++++++++++- installer/bash-installer | 7 +++++-- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 2abfd22b..1f9d2d8a 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,12 +20,20 @@ builds: goarch: - 386 - amd64 + - arm - arm64 + goarm: + - 6 + - 7 ignore: + - goos: windows + goarch: arm - goos: windows goarch: arm64 - goos: darwin goarch: 386 + - goos: darwin + goarch: arm main: ./ binary: symfony ldflags: -s -w -X 'main.channel={{ if index .Env "AUTOUPDATE_CHANNEL" }}{{ .Env.AUTOUPDATE_CHANNEL }}{{ else }}dev{{ end }}' -X 'main.buildDate={{ .Date }}' -X 'main.version={{ .Version }}' @@ -84,7 +92,9 @@ brews: name: Fabien Potencier email: fabien@symfony.com folder: Formula - goarm: "7" + # Homebrew supports only a single GOARM variant and ARMv6 is upwards + # compatible with ARMv7 so let's keep ARMv6 here (default value anyway) + goarm: "6" homepage: https://symfony.com description: Symfony CLI helps Symfony developers manage projects, from local code to remote infrastructure license: AGPL-3.0 @@ -133,12 +143,34 @@ dockers: - "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.version={{.Version}}" + - image_templates: [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm32v6" ] + goarch: arm + goarm: '6' + use: buildx + build_flag_templates: + - "--pull" + - "--platform=linux/arm/v6" + - "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - image_templates: [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm32v7" ] + goarch: arm + goarm: '7' + use: buildx + build_flag_templates: + - "--pull" + - "--platform=linux/arm/v7" + - "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.version={{.Version}}" docker_manifests: - name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }} image_templates: &docker_images - ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-amd64 - ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm64 + - ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm32v6 + - ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm32v7 - name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:v{{ .Major }} image_templates: *docker_images - name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }} diff --git a/installer/bash-installer b/installer/bash-installer index 61e7ee87..f5a2f2a6 100755 --- a/installer/bash-installer +++ b/installer/bash-installer @@ -125,8 +125,11 @@ esac machine=$(uname -m 2>/dev/null || /usr/bin/uname -m) case ${machine} in - arm|armv7*) - machine="arm" + arm|armv6*) + machine="armv6" + ;; + armv7*) + machine="armv7" ;; aarch64*|armv8*|arm64) machine="arm64" From 3a8d98944ec74b84e45e1e892ffb82f8e194e40c Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 23 Feb 2023 15:41:17 -0500 Subject: [PATCH 113/466] Prevent directory traversal --- local/php/envs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/php/envs.go b/local/php/envs.go index a16b4e76..e4796533 100644 --- a/local/php/envs.go +++ b/local/php/envs.go @@ -38,7 +38,7 @@ func (p *Server) generateEnv(req *http.Request) map[string]string { pathInfo := req.URL.Path if pos := strings.Index(strings.ToLower(pathInfo), ".php"); pos != -1 { - file := pathInfo[:pos+4] + file := filepath.Clean(pathInfo[:pos+4]) if _, err := os.Stat(filepath.Join(p.documentRoot, file)); err == nil { scriptName = file pathInfo = pathInfo[pos+4:] From 7abd242f5228667b334342e89e95638868150a16 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 24 Feb 2023 09:00:42 -0500 Subject: [PATCH 114/466] Tweak previous commit --- local/php/envs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/local/php/envs.go b/local/php/envs.go index e4796533..1465c552 100644 --- a/local/php/envs.go +++ b/local/php/envs.go @@ -23,6 +23,7 @@ import ( "net" "net/http" "os" + "path" "path/filepath" "strings" @@ -38,7 +39,7 @@ func (p *Server) generateEnv(req *http.Request) map[string]string { pathInfo := req.URL.Path if pos := strings.Index(strings.ToLower(pathInfo), ".php"); pos != -1 { - file := filepath.Clean(pathInfo[:pos+4]) + file := path.Clean(pathInfo[:pos+4]) if _, err := os.Stat(filepath.Join(p.documentRoot, file)); err == nil { scriptName = file pathInfo = pathInfo[pos+4:] From 270ecf2bccf962a36721f40e2617b3d9a945b5d5 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 24 Feb 2023 09:18:49 -0500 Subject: [PATCH 115/466] Fix deb packaging for ARM v6/v7 Relates to https://github.com/goreleaser/goreleaser/issues/2721 There's a filename clash because some platforms consider `armhf` to be ARMv6 and some consider it to be ARMv7. Fallback to build and package only ARMv6 because ARMv6 binaries are going to work on ARMv7 anyway. Note: If we really have to release ARMv7 for other platforms, we can split the builds and packaging and then filter the builds used for packaging but that requires extra work/maintenance so we will implement it only if required. --- .goreleaser.yml | 8 ++++++-- installer/bash-installer | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 1f9d2d8a..9347857f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -23,8 +23,11 @@ builds: - arm - arm64 goarm: + # Because of a limitation in DEB packaging we can only build and package + # a single ARMv6 or v7 variant at a single time. As ARMv6 is upwards + # compatible with ARMv7 so let's only build ARMv6 here (default value + # anyway) - 6 - - 7 ignore: - goos: windows goarch: arm @@ -155,7 +158,8 @@ dockers: - "--label=org.opencontainers.image.version={{.Version}}" - image_templates: [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm32v7" ] goarch: arm - goarm: '7' + # ARMv6 is upwards compatible with ARMv7 + goarm: '6' use: buildx build_flag_templates: - "--pull" diff --git a/installer/bash-installer b/installer/bash-installer index f5a2f2a6..a34d287e 100755 --- a/installer/bash-installer +++ b/installer/bash-installer @@ -129,7 +129,8 @@ case ${machine} in machine="armv6" ;; armv7*) - machine="armv7" + # ARMv6 is upwards compatible with ARMv7 + machine="armv6" ;; aarch64*|armv8*|arm64) machine="arm64" From 7414d5a8a2f88cbfe8984b98eb2f2e09461c0e2b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 28 Feb 2023 09:11:13 +0100 Subject: [PATCH 116/466] Bump deps --- go.mod | 16 ++++++++-------- go.sum | 42 ++++++++++++++++-------------------------- 2 files changed, 24 insertions(+), 34 deletions(-) diff --git a/go.mod b/go.mod index b0c899a6..028d5b0f 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 - github.com/compose-spec/compose-go v1.9.0 + github.com/compose-spec/compose-go v1.11.0 github.com/docker/docker v23.0.1+incompatible github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 github.com/fabpot/local-php-security-checker/v2 v2.0.6 @@ -21,7 +21,7 @@ require ( github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.1 github.com/symfony-cli/console v1.0.3 - github.com/symfony-cli/phpstore v1.0.6 + github.com/symfony-cli/phpstore v1.0.7 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 golang.org/x/sync v0.1.0 @@ -32,7 +32,7 @@ require ( require ( github.com/Microsoft/go-winio v0.6.0 // indirect - github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa // indirect + github.com/distribution/distribution/v3 v3.0.0-20230223072852-e5d5810851d1 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -48,23 +48,23 @@ require ( github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect + github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/rivo/uniseg v0.4.3 // indirect + github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.1.0 // indirect + golang.org/x/crypto v0.6.0 // indirect golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.6.0 // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect - golang.org/x/time v0.1.0 // indirect + golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.6.0 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect diff --git a/go.sum b/go.sum index e05096c6..f5f418b7 100644 --- a/go.sum +++ b/go.sum @@ -1,19 +1,17 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/compose-spec/compose-go v1.9.0 h1:oaewhNhUP/AClVs6ytHzcjw1xwK+2EMWuvHXj6tYvRc= -github.com/compose-spec/compose-go v1.9.0/go.mod h1:Tb5Ae2PsYN3GTqYqzl2IRbTPiJtPZZjMw8UKUvmehFk= +github.com/compose-spec/compose-go v1.11.0 h1:YLl0wf4YU9ZVei6mqLxAfI2gWOrqnTsPBAcIe9cO9Zk= +github.com/compose-spec/compose-go v1.11.0/go.mod h1:huuiqxbQTZLkagcN9D/1tEKZwMXVetYeIWtjCAVsoXw= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa h1:L9Ay/slwQ4ERSPaurC+TVkZrM0K98GNrEEo1En3e8as= -github.com/distribution/distribution/v3 v3.0.0-20230214150026-36d8c594d7aa/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= +github.com/distribution/distribution/v3 v3.0.0-20230223072852-e5d5810851d1 h1:OtfRoaZ54jKZ7jl9WuxqekousLR9T63iJf0y2EdC2S4= +github.com/distribution/distribution/v3 v3.0.0-20230223072852-e5d5810851d1/go.mod h1:r5XLH1cp+Wau2jxdptkYsFvvvzPPQTIe8eUuQ0vq30Q= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= @@ -37,8 +35,6 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/go-cmp v0.3.0/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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -78,8 +74,8 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -91,14 +87,13 @@ github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6 github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= -github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= @@ -112,7 +107,6 @@ github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EE github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 h1:vEf6LukDDCcMnRXnIMy5XRo/MR4+3lNTAhXxM+x0ZXI= github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081/go.mod h1:mXF6uSYLo1a2BZPcVHpP8RstMYoQnCaFF+dmIY726NY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -123,8 +117,8 @@ github.com/symfony-cli/cert v1.0.1 h1:ETYVBshgY+SaydBJmMkU0PaoDrWm6zsGNB/799ZQYC github.com/symfony-cli/cert v1.0.1/go.mod h1:g4WrLT6EQsEPmA19xh5Jv9Jnpg5EvtFqArJf2AG2S+w= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= -github.com/symfony-cli/phpstore v1.0.6 h1:ehkEaG05e4vIG2J06sVcdg6cmc7/u68+DhGcjDsOX/k= -github.com/symfony-cli/phpstore v1.0.6/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= +github.com/symfony-cli/phpstore v1.0.7 h1:8f14UQ504V0XBTPU+4kEpBv54ztDCoCqcl3gx8+b4QE= +github.com/symfony-cli/phpstore v1.0.7/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.4 h1:jam7aN7g7WQ9uOwV9UC+iVGBLTlzK8kAC5EKcxq21Z8= github.com/symfony-cli/terminal v1.0.4/go.mod h1:+OxxnU05wyRHKYyQkTzTaCSSxmmIBcvAHLcQ099odj4= github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 h1:F4snRP//nIuTTW9LYEzVH4HVwDG9T3M4t8y/2nqMbiY= @@ -142,21 +136,20 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk 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-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -169,7 +162,6 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/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-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -185,10 +177,9 @@ 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.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -212,7 +203,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C 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= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= From 71ba9b0246458c046c8ed32ce8d7daf2db45969b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 9 Mar 2023 16:11:29 +0000 Subject: [PATCH 117/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 885e30eb..aef89c24 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1006,7 +1006,7 @@ var Commands = []*console.Command{ {Name: "cloud:scp"}, {Name: "scp", Hidden: true}, }, - Usage: "Copy files to and from current environment using scp", + Usage: "Copy files to and from an environment using scp", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, From 2901fc34ed169d484534fc76d2d745f477af9262 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 08:11:11 +0000 Subject: [PATCH 118/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index aef89c24..9690d496 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -640,10 +640,12 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "replace", Aliases: []string{"r"},}, &console.BoolFlag{Name: "wait",}, }, }, @@ -655,6 +657,7 @@ var Commands = []*console.Command{ }, Usage: "Delete a domain from the project", Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -671,6 +674,7 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, @@ -689,6 +693,7 @@ var Commands = []*console.Command{ Usage: "Get a list of all domains", Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, @@ -705,6 +710,7 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, @@ -1639,6 +1645,26 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "org", Aliases: []string{"o"},}, }, }, + { + Category: "cloud:organization", + Name: "user:projects", + Aliases: []*console.Alias{ + {Name: "organization:user:projects", Hidden: true}, + {Name: "cloud:oups"}, + {Name: "oups", Hidden: true}, + }, + Usage: "List the projects a user can access", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "list-all",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.BoolFlag{Name: "reverse",}, + &console.BoolFlag{Name: "sort-granted",}, + }, + }, { Category: "cloud:organization", Name: "user:update", From d81a87ea70e20ac33a19a19eec4d007027afbf95 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 22 Mar 2023 13:43:55 -0400 Subject: [PATCH 119/466] Fix inconsistent error message in book requirements check, fix #287 --- book/reqs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/reqs.go b/book/reqs.go index c833b2cb..7cc8a9de 100644 --- a/book/reqs.go +++ b/book/reqs.go @@ -81,7 +81,7 @@ func CheckRequirements() (bool, error) { terminal.Printfln("[OK] PHP installed version %s (%s)", v.FullVersion, v.PHPPath) } else { ready = false - terminal.Printfln("[KO] PHP installed; version %s found but we need version 7.2.5+ (%s)", v.FullVersion, v.PHPPath) + terminal.Printfln("[KO] PHP installed; version %s found but we need version %s+ (%s)", v.FullVersion, minv.String(), v.PHPPath) } } From 121056ce0c6cba79ecdff3137e02c62c52609b27 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 22 Mar 2023 15:04:45 -0400 Subject: [PATCH 120/466] Extract PostgreSQL, MySQL and MariaDB from Docker images in use, fix #108 --- envs/docker.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/envs/docker.go b/envs/docker.go index dbabdd05..94880fec 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -255,6 +255,7 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ username := "" password := "" path := "" + version := "" // MARIADB is used by bitnami/mariadb for _, prefix := range []string{"MYSQL", "MARIADB"} { for _, env := range c.Config.Env { @@ -268,6 +269,8 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ password = getEnvValue(env, prefix+"_PASSWORD") } else if strings.HasPrefix(env, prefix+"_DATABASE") { path = getEnvValue(env, prefix+"_DATABASE") + } else if strings.HasPrefix(env, prefix+"_VERSION") { + version = getEnvValue(env, prefix+"_VERSION") } } } @@ -280,6 +283,7 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ "username": username, "password": password, "path": path, + "version": version, "port": formatDockerPort(p.PublicPort), "query": map[string]bool{ "is_master": true, @@ -292,6 +296,7 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ username := "" password := "" path := "" + version := "" for _, env := range c.Config.Env { if strings.HasPrefix(env, "POSTGRES_USER") { username = getEnvValue(env, "POSTGRES_USER") @@ -299,6 +304,8 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ password = getEnvValue(env, "POSTGRES_PASSWORD") } else if strings.HasPrefix(env, "POSTGRES_DB") { path = getEnvValue(env, "POSTGRES_DB") + } else if strings.HasPrefix(env, "PG_VERSION") { + version = getEnvValue(env, "PG_VERSION") } } if path == "" { @@ -310,6 +317,7 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ "username": username, "password": password, "path": path, + "version": version, "port": formatDockerPort(p.PublicPort), "query": map[string]bool{ "is_master": true, From f3f54f0b30237026a768325452fed4f023899887 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 22 Mar 2023 15:14:24 -0400 Subject: [PATCH 121/466] Add `COMPOSER_MEMORY_LIMIT=-1` when running Composer --- local/php/composer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/local/php/composer.go b/local/php/composer.go index f7ea1b72..3d2566cf 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -58,6 +58,9 @@ func (c ComposerResult) ExitCode() int { } func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, debugLogger zerolog.Logger) ComposerResult { + if os.Getenv("COMPOSER_MEMORY_LIMIT") == "" { + env = append(env, "COMPOSER_MEMORY_LIMIT=-1") + } e := &Executor{ Dir: dir, BinName: "php", From 6aea791c7c97c57741c8201a8fa48715d063db60 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 22 Mar 2023 20:11:45 +0100 Subject: [PATCH 122/466] Bump deps --- go.mod | 8 ++++---- go.sum | 18 +++++++++--------- local/proxy/cert_store.go | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index 028d5b0f..57b78811 100644 --- a/go.mod +++ b/go.mod @@ -2,13 +2,13 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 - github.com/compose-spec/compose-go v1.11.0 + github.com/compose-spec/compose-go v1.13.0 github.com/docker/docker v23.0.1+incompatible github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 - github.com/hashicorp/golang-lru v0.6.0 + github.com/hashicorp/golang-lru/v2 v2.0.2 github.com/hpcloud/tail v1.0.0 github.com/joho/godotenv v1.5.1 github.com/mitchellh/go-homedir v1.1.0 @@ -19,13 +19,13 @@ require ( github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 - github.com/symfony-cli/cert v1.0.1 + github.com/symfony-cli/cert v1.0.2 github.com/symfony-cli/console v1.0.3 github.com/symfony-cli/phpstore v1.0.7 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 golang.org/x/sync v0.1.0 - golang.org/x/text v0.7.0 + golang.org/x/text v0.8.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index f5f418b7..133aa4db 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2y github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/compose-spec/compose-go v1.11.0 h1:YLl0wf4YU9ZVei6mqLxAfI2gWOrqnTsPBAcIe9cO9Zk= -github.com/compose-spec/compose-go v1.11.0/go.mod h1:huuiqxbQTZLkagcN9D/1tEKZwMXVetYeIWtjCAVsoXw= +github.com/compose-spec/compose-go v1.13.0 h1:HHMc1XvnHJr9LUS7fPiiQeTSmGtEp+myn7jGnXgIoXE= +github.com/compose-spec/compose-go v1.13.0/go.mod h1:uo+YhhqDpkW9MjZNzJgOLX3MlbK6zHaBo9n8LhGDwsg= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -40,8 +40,8 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= -github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= +github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= @@ -112,9 +112,9 @@ github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081/go.mod h1:mXF6uSY github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/symfony-cli/cert v1.0.1 h1:ETYVBshgY+SaydBJmMkU0PaoDrWm6zsGNB/799ZQYCE= -github.com/symfony-cli/cert v1.0.1/go.mod h1:g4WrLT6EQsEPmA19xh5Jv9Jnpg5EvtFqArJf2AG2S+w= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/symfony-cli/cert v1.0.2 h1:rvveFVIoH6JwdfbsjDy5crsFFBiUwJsfEEZduuBtRNg= +github.com/symfony-cli/cert v1.0.2/go.mod h1:m2aZC0qLifAgsa0uLshMlJRIkS6hx2bqvDLJgGEbY6Q= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= github.com/symfony-cli/phpstore v1.0.7 h1:8f14UQ504V0XBTPU+4kEpBv54ztDCoCqcl3gx8+b4QE= @@ -175,8 +175,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 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.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/local/proxy/cert_store.go b/local/proxy/cert_store.go index b015d89b..365bcd7d 100644 --- a/local/proxy/cert_store.go +++ b/local/proxy/cert_store.go @@ -23,7 +23,7 @@ import ( "crypto/tls" "sync" - lru "github.com/hashicorp/golang-lru" + lru "github.com/hashicorp/golang-lru/v2" "github.com/symfony-cli/cert" ) @@ -31,12 +31,12 @@ type certStore struct { proxyCfg *Config ca *cert.CA lock sync.Mutex - cache *lru.ARCCache + cache *lru.ARCCache[string, tls.Certificate] } // newCertStore creates a store to keep SSL certificates in memory func (p *Proxy) newCertStore(ca *cert.CA) *certStore { - cache, _ := lru.NewARC(1024) + cache, _ := lru.NewARC[string, tls.Certificate](1024) return &certStore{ proxyCfg: p.Config, ca: ca, @@ -50,7 +50,7 @@ func (c *certStore) getCertificate(clientHello *tls.ClientHelloInfo) (*tls.Certi defer c.lock.Unlock() name := c.proxyCfg.NormalizeDomain(clientHello.ServerName) if val, ok := c.cache.Get(name); ok { - cert := val.(tls.Certificate) + cert := val return &cert, nil } cert, err := c.ca.CreateCert([]string{name}) From c3668b6b445b289811e17861e27510c310be590d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 23 Mar 2023 16:10:46 +0000 Subject: [PATCH 123/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 9690d496..98016d36 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -355,6 +355,36 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "wait",}, }, }, + { + Category: "cloud:backup", + Name: "delete", + Aliases: []*console.Alias{ + {Name: "backup:delete", Hidden: true}, + }, + Usage: "Delete an environment backup", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.BoolFlag{Name: "wait",}, + }, + }, + { + Category: "cloud:backup", + Name: "get", + Aliases: []*console.Alias{ + {Name: "backup:get", Hidden: true}, + }, + Usage: "View an environment backup", + Flags: []console.Flag{ + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + }, + }, { Category: "cloud:backup", Name: "list", From f0e4ef1041b632604a876344c644410997b5f491 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:08:48 +0000 Subject: [PATCH 124/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 0c625d19..ddf9909a 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -161,7 +161,7 @@ var availableServices = []*service{ Type: "mariadb", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11"}, }, }, { From 19fb53026822fc837a81581ce938a368eeda5b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Mon, 17 Apr 2023 14:12:38 +0200 Subject: [PATCH 125/466] Make `SERVER_SOFTWARE` compliant with RFC3875 --- local/http/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/http/http.go b/local/http/http.go index 43e09e67..4e72a3bc 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -234,7 +234,7 @@ func (s *Server) Handler(w http.ResponseWriter, r *http.Request) { "SERVER_PORT": s.serverPort, "SERVER_NAME": r.Host, "SERVER_PROTOCOL": r.Proto, - "SERVER_SOFTWARE": fmt.Sprintf("Symfony Local Server %s", s.Appversion), + "SERVER_SOFTWARE": fmt.Sprintf("Symfony-Local-Server/%s", s.Appversion), } env["X_FORWARDED_PORT"] = r.Header.Get("X-Forwarded-Port") if env["X_FORWARDED_PORT"] == "" { From b02d859efb990e1fe0534731b918f3615ab2a3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Mon, 17 Apr 2023 16:16:07 +0200 Subject: [PATCH 126/466] Rename SERVER_SOFTWARE to `symfony-cli` --- local/http/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/http/http.go b/local/http/http.go index 4e72a3bc..2f1a419f 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -234,7 +234,7 @@ func (s *Server) Handler(w http.ResponseWriter, r *http.Request) { "SERVER_PORT": s.serverPort, "SERVER_NAME": r.Host, "SERVER_PROTOCOL": r.Proto, - "SERVER_SOFTWARE": fmt.Sprintf("Symfony-Local-Server/%s", s.Appversion), + "SERVER_SOFTWARE": fmt.Sprintf("symfony-cli/%s", s.Appversion), } env["X_FORWARDED_PORT"] = r.Header.Get("X-Forwarded-Port") if env["X_FORWARDED_PORT"] == "" { From 6fc70ae447cf006857f9623a85e0a656399a4913 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 18 Apr 2023 09:26:16 -0400 Subject: [PATCH 127/466] Fix `local:run` should not restart command that exited succesfully, fix #307 --- local/runner.go | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/local/runner.go b/local/runner.go index 7337ae74..939583c7 100644 --- a/local/runner.go +++ b/local/runner.go @@ -186,7 +186,7 @@ func (r *Runner) Run() error { timer.Stop() // when the command is really fast to run, it will be already - // done here, so we need to forward exit status as it has + // done here, so we need to forward exit status as if it has // finished later one go func() { cmdExitChan <- err }() case <-timer.C: @@ -225,23 +225,35 @@ func (r *Runner) Run() error { case err := <-cmdExitChan: err = errors.Wrapf(err, `command "%s" failed`, r.pidFile) - if looping { - // Command exited, let's wait for a change or 5 seconds to restart the command or a signal to exit - if err != nil { - terminal.Logger.Error().Msgf("%s, waiting 5 seconds before restarting it", err) - timer.Reset(5 * time.Second) - } else if r.AlwaysRestartOnExit { - terminal.Logger.Error().Msgf(`command "%s" exited, restarting it immediately`, r.pidFile) + if !looping { + if err == nil { + err = r.pidFile.Remove() } + return err + } + + if r.AlwaysRestartOnExit { + terminal.Logger.Error().Msgf(`command "%s" exited, restarting it immediately`, r.pidFile) continue } - if err == nil { - return r.pidFile.Remove() + // Command exited: let's wait for a signal to just exit on a change + // on the filesystem, or 5 seconds in case of error, before + // restarting the command. + if err != nil { + terminal.Logger.Error().Msgf("%s, waiting 5 seconds before restarting it", err) + timer.Reset(5 * time.Second) } - return err + select { + case sig := <-sigChan: + terminal.Logger.Info().Msgf(`Signal "%s" received, exiting`, sig) + return nil + case <-restartChan: + timer.Stop() + case <-timer.C: + } } terminal.Logger.Info().Msgf(`Restarting command "%s"`, r.pidFile) From 394377c495325ca68567267676c11a79344ff7c5 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 18 Apr 2023 18:24:39 -0400 Subject: [PATCH 128/466] Get rid of SC_DEBUG --- commands/local_proxy_start.go | 2 +- commands/root.go | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/commands/local_proxy_start.go b/commands/local_proxy_start.go index 50182da9..f3952b14 100644 --- a/commands/local_proxy_start.go +++ b/commands/local_proxy_start.go @@ -134,7 +134,7 @@ var localProxyStartCmd = &console.Command{ logger = zerolog.New(lw).With().Timestamp().Logger() } - proxy := proxy.New(config, ca, log.New(logger, "", 0), terminal.GetLogLevel() >= 5) + proxy := proxy.New(config, ca, log.New(logger, "", 0), terminal.IsDebug()) errChan := make(chan error) go func() { errChan <- proxy.Start() diff --git a/commands/root.go b/commands/root.go index 0a6e17d6..019e2199 100644 --- a/commands/root.go +++ b/commands/root.go @@ -20,7 +20,6 @@ package commands import ( - "os" "os/exec" "path/filepath" "sync" @@ -115,11 +114,7 @@ func InitAppFunc(c *console.Context) error { if c.App.Channel == "stable" { // do not run auto-update in the cloud, CI or background jobs if !util.InCloud() && terminal.Stdin.IsInteractive() && !reexec.IsChild() { - debug := false - if os.Getenv("SC_DEBUG") == "1" { - debug = true - } - updater := updater.NewUpdater(filepath.Join(util.GetHomeDir(), "update"), c.App.ErrWriter, debug) + updater := updater.NewUpdater(filepath.Join(util.GetHomeDir(), "update"), c.App.ErrWriter, terminal.IsDebug()) updater.CheckForNewVersion(c.App.Version) } } From 5452c3d8eab745f919787ab04a76f991784f0e23 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 18 Apr 2023 18:03:32 -0400 Subject: [PATCH 129/466] code cleanup --- commands/root.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/commands/root.go b/commands/root.go index 019e2199..be211051 100644 --- a/commands/root.go +++ b/commands/root.go @@ -111,14 +111,17 @@ func GetPSH() (*platformshCLI, error) { } func InitAppFunc(c *console.Context) error { - if c.App.Channel == "stable" { - // do not run auto-update in the cloud, CI or background jobs - if !util.InCloud() && terminal.Stdin.IsInteractive() && !reexec.IsChild() { - updater := updater.NewUpdater(filepath.Join(util.GetHomeDir(), "update"), c.App.ErrWriter, terminal.IsDebug()) - updater.CheckForNewVersion(c.App.Version) - } + if c.App.Channel != "stable" { + return nil + } + // do not run auto-update in the cloud, CI or background jobs + if util.InCloud() || !terminal.Stdin.IsInteractive() || reexec.IsChild() { + return nil } + updater := updater.NewUpdater(filepath.Join(util.GetHomeDir(), "update"), c.App.ErrWriter, terminal.IsDebug()) + updater.CheckForNewVersion(c.App.Version) + return nil } From 08e3f7bc8d5cbff28ef506bd08841bac7baaf623 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 18 Apr 2023 18:07:19 -0400 Subject: [PATCH 130/466] Only show "new version is availble" once per day --- updater/updater.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updater/updater.go b/updater/updater.go index 483c69c4..3d70fc33 100644 --- a/updater/updater.go +++ b/updater/updater.go @@ -96,8 +96,8 @@ func (updater *Updater) CheckForNewVersion(currentVersionStr string) { case <-updater.timer.C: updater.logger.Printf("Checking for updates timeout expired") case newVersionFound := <-newVersionCh: + updater.silence() if newVersionFound == nil { - updater.silence() return } fmt.Fprintf(updater.Output, "\n INFO A new Symfony CLI version is available (%s, currently running %s).\n\n", newVersionFound, currentVersion) From 766a1a57d7d4ab67920bf6683007fd1d2ba4c898 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Apr 2023 08:10:37 +0000 Subject: [PATCH 131/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index ddf9909a..0c625d19 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -161,7 +161,7 @@ var availableServices = []*service{ Type: "mariadb", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6"}, }, }, { From c13edab95ef594786e9e5da878515e26e9753461 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Apr 2023 12:14:19 +0000 Subject: [PATCH 132/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 0c625d19..a2854b82 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -161,7 +161,7 @@ var availableServices = []*service{ Type: "mariadb", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11"}, }, }, { @@ -189,7 +189,7 @@ var availableServices = []*service{ Type: "mysql", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11"}, }, }, { From 5e6c0fa47801925d67d3ef40efe108b0395842d7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 24 Apr 2023 14:22:07 +0200 Subject: [PATCH 133/466] Check that the DB version is set before deploying --- commands/db_versions.go | 79 ++++++++++++++++++++++++++++++++++++ commands/platformsh_hooks.go | 62 ++++++++++++++++++++++++++++ commands/root.go | 1 - 3 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 commands/db_versions.go diff --git a/commands/db_versions.go b/commands/db_versions.go new file mode 100644 index 00000000..25bf5f8a --- /dev/null +++ b/commands/db_versions.go @@ -0,0 +1,79 @@ +package commands + +import ( + "io/ioutil" + "path/filepath" + "strings" + + "gopkg.in/yaml.v2" +) + +func readDBVersionFromPlatformServiceYAML(projectDir string) (string, string, error) { + servicesYAML, err := ioutil.ReadFile(filepath.Join(projectDir, ".platform", "services.yaml")) + if err != nil { + // no services.yaml or unreadable + return "", "", err + } + var services map[string]struct { + Type string `yaml:"type"` + } + if err := yaml.Unmarshal(servicesYAML, &services); err != nil { + // services.yaml format is wrong + return "", "", err + } + + dbName := "" + dbVersion := "" + for _, service := range services { + if strings.HasPrefix(service.Type, "mysql") || strings.HasPrefix(service.Type, "mariadb") || strings.HasPrefix(service.Type, "postgresql") { + if dbName != "" { + // give up as there are multiple DBs + return "", "", nil + } + + parts := strings.Split(service.Type, ":") + dbName = parts[0] + dbVersion = parts[1] + } + } + return dbName, dbVersion, nil +} + +func readDBVersionFromDotEnv(projectDir string) (string, error) { + dotEnv, err := ioutil.ReadFile(filepath.Join(projectDir, ".env")) + if err != nil { + return "", err + } + + lines := strings.Split(string(dotEnv), "\n") + for _, line := range lines { + if !strings.HasPrefix(line, "DATABASE_URL=") { + continue + } + if !strings.Contains(line, "serverVersion=") { + return "", nil + } + return strings.TrimRight(strings.Split(strings.Split(line, "serverVersion=")[1], "&")[0], "\""), nil + } + return "", nil +} + +func readDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { + doctrineConfigYAML, err := ioutil.ReadFile(filepath.Join(projectDir, "config", "packages", "doctrine.yaml")) + if err != nil { + return "", err + } + + var doctrineConfig struct { + Doctrine struct { + Dbal struct { + ServerVersion string `yaml:"server_version"` + } `yaml:"dbal"` + } `yaml:"doctrine"` + } + if err := yaml.Unmarshal(doctrineConfigYAML, &doctrineConfig); err != nil { + // format is wrong + return "", err + } + return doctrineConfig.Doctrine.Dbal.ServerVersion, nil +} diff --git a/commands/platformsh_hooks.go b/commands/platformsh_hooks.go index ea5d3ef9..28663b0c 100644 --- a/commands/platformsh_hooks.go +++ b/commands/platformsh_hooks.go @@ -1,6 +1,9 @@ package commands import ( + "errors" + "fmt" + "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/envs" "github.com/symfony-cli/symfony-cli/local/platformsh" @@ -8,6 +11,65 @@ import ( ) var platformshBeforeHooks = map[string]console.BeforeFunc{ + "cloud:environment:push": func(c *console.Context) error { + // check that project has a DB and that server version is set properly + projectDir, err := getProjectDir(c.String("dir")) + if err != nil { + return err + } + if len(platformsh.FindLocalApplications(projectDir)) > 0 { + // not implemented yet as more complex + return nil + } + + dbName, dbVersion, err := readDBVersionFromPlatformServiceYAML(projectDir) + if err != nil { + return nil + } + if dbName == "" { + // no DB + return nil + } + + errorTpl := fmt.Sprintf(` +The ".platform/services.yaml" file defines +a "%s" version %s database service +but %%s. + +Before deploying, fix the version mismatch. +`, dbName, dbVersion) + + dotEnvVersion, err := readDBVersionFromDotEnv(projectDir) + if err != nil { + return nil + } + if dotEnvVersion != "" && dotEnvVersion != dbVersion { + return fmt.Errorf(errorTpl, fmt.Sprintf("the \".env\" file requires version %s", dotEnvVersion)) + } + + doctrineConfigVersion, err := readDBVersionFromDoctrineConfigYAML(projectDir) + if err != nil { + return nil + } + if doctrineConfigVersion != "" && doctrineConfigVersion != dbVersion { + return fmt.Errorf(errorTpl, fmt.Sprintf("the \"config/packages/doctrine.yaml\" file requires version %s", doctrineConfigVersion)) + } + + if dotEnvVersion == "" && doctrineConfigVersion == "" { + return errors.New(` +The ".platform/services.yaml" file defines a "%s" database service. + +When deploying, Doctrine needs to know the database version to determine the supported SQL syntax. + +As the database is not available when Doctrine is warming up its cache on Platform.sh, +you need to explicitely set the database version in the ".env" or "config/packages/doctrine.yaml" file. + +The easiest is to set the "serverVersion" parameter in the "config/packages/doctrine.yaml" file. +`) + } + + return nil + }, "cloud:tunnel:close": func(c *console.Context) error { terminal.Eprintln("Stop exposing tunnel service environment variables") diff --git a/commands/root.go b/commands/root.go index 0a6e17d6..694e8892 100644 --- a/commands/root.go +++ b/commands/root.go @@ -183,7 +183,6 @@ Environment variables to use Platform.sh relationships or Docker services are au } func getProjectDir(dir string) (string, error) { - var err error if dir, err = filepath.Abs(dir); err != nil { return "", err From df11febfa28207724189e1c3bc7c4b88e04696f9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 25 Apr 2023 11:46:46 +0200 Subject: [PATCH 134/466] Add some tests --- commands/db_versions.go | 16 +++++- commands/local_new_test.go | 6 +-- commands/platformsh_hooks.go | 31 ++++++++--- commands/platformsh_hooks_test.go | 54 +++++++++++++++++++ .../postgresql/10/docker-compose.yml | 0 .../postgresql/next/docker-compose.yml | 0 .../postgresql/noversion/docker-compose.yml | 0 .../testdata/platformsh/missing-version/.env | 8 +++ .../missing-version/.platform/services.yaml | 3 ++ commands/testdata/platformsh/ok/.env | 8 +++ .../testdata/platformsh/ok/.platform.app.yaml | 27 ++++++++++ .../platformsh/ok/.platform/services.yaml | 3 ++ .../ok/config/packages/doctrine.yaml | 5 ++ .../.platform.app.yaml | 27 ++++++++++ .../.platform/services.yaml | 3 ++ .../config/packages/doctrine.yaml | 5 ++ .../platformsh/version-mismatch-env/.env | 8 +++ .../version-mismatch-env/.platform.app.yaml | 27 ++++++++++ .../.platform/services.yaml | 3 ++ 19 files changed, 223 insertions(+), 11 deletions(-) create mode 100644 commands/platformsh_hooks_test.go rename commands/testdata/{ => docker}/postgresql/10/docker-compose.yml (100%) rename commands/testdata/{ => docker}/postgresql/next/docker-compose.yml (100%) rename commands/testdata/{ => docker}/postgresql/noversion/docker-compose.yml (100%) create mode 100644 commands/testdata/platformsh/missing-version/.env create mode 100644 commands/testdata/platformsh/missing-version/.platform/services.yaml create mode 100644 commands/testdata/platformsh/ok/.env create mode 100644 commands/testdata/platformsh/ok/.platform.app.yaml create mode 100644 commands/testdata/platformsh/ok/.platform/services.yaml create mode 100644 commands/testdata/platformsh/ok/config/packages/doctrine.yaml create mode 100644 commands/testdata/platformsh/version-mismatch-config/.platform.app.yaml create mode 100644 commands/testdata/platformsh/version-mismatch-config/.platform/services.yaml create mode 100644 commands/testdata/platformsh/version-mismatch-config/config/packages/doctrine.yaml create mode 100644 commands/testdata/platformsh/version-mismatch-env/.env create mode 100644 commands/testdata/platformsh/version-mismatch-env/.platform.app.yaml create mode 100644 commands/testdata/platformsh/version-mismatch-env/.platform/services.yaml diff --git a/commands/db_versions.go b/commands/db_versions.go index 25bf5f8a..68298de4 100644 --- a/commands/db_versions.go +++ b/commands/db_versions.go @@ -1,7 +1,9 @@ package commands import ( + "errors" "io/ioutil" + "os" "path/filepath" "strings" @@ -40,7 +42,12 @@ func readDBVersionFromPlatformServiceYAML(projectDir string) (string, string, er } func readDBVersionFromDotEnv(projectDir string) (string, error) { - dotEnv, err := ioutil.ReadFile(filepath.Join(projectDir, ".env")) + path := filepath.Join(projectDir, ".env") + if _, err := os.Stat(path); errors.Is(err, os.ErrNotExist) { + return "", nil + } + + dotEnv, err := ioutil.ReadFile(path) if err != nil { return "", err } @@ -59,7 +66,12 @@ func readDBVersionFromDotEnv(projectDir string) (string, error) { } func readDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { - doctrineConfigYAML, err := ioutil.ReadFile(filepath.Join(projectDir, "config", "packages", "doctrine.yaml")) + path := filepath.Join(projectDir, "config", "packages", "doctrine.yaml") + if _, err := os.Stat(path); errors.Is(err, os.ErrNotExist) { + return "", nil + } + + doctrineConfigYAML, err := ioutil.ReadFile(path) if err != nil { return "", err } diff --git a/commands/local_new_test.go b/commands/local_new_test.go index 55882710..81a9e8f0 100644 --- a/commands/local_new_test.go +++ b/commands/local_new_test.go @@ -38,17 +38,17 @@ func TestParseDockerComposeServices(t *testing.T) { } for dir, expected := range map[string]CloudService{ - "testdata/postgresql/noversion/": { + "testdata/docker/postgresql/noversion/": { Name: "database", Type: "postgresql", Version: lastVersion, }, - "testdata/postgresql/10/": { + "testdata/docker/postgresql/10/": { Name: "database", Type: "postgresql", Version: "10", }, - "testdata/postgresql/next/": { + "testdata/docker/postgresql/next/": { Name: "database", Type: "postgresql", Version: lastVersion, diff --git a/commands/platformsh_hooks.go b/commands/platformsh_hooks.go index 28663b0c..758273ed 100644 --- a/commands/platformsh_hooks.go +++ b/commands/platformsh_hooks.go @@ -1,7 +1,25 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package commands import ( - "errors" "fmt" "github.com/symfony-cli/console" @@ -17,7 +35,7 @@ var platformshBeforeHooks = map[string]console.BeforeFunc{ if err != nil { return err } - if len(platformsh.FindLocalApplications(projectDir)) > 0 { + if len(platformsh.FindLocalApplications(projectDir)) > 1 { // not implemented yet as more complex return nil } @@ -49,6 +67,7 @@ Before deploying, fix the version mismatch. doctrineConfigVersion, err := readDBVersionFromDoctrineConfigYAML(projectDir) if err != nil { + fmt.Printf("%+v", err) return nil } if doctrineConfigVersion != "" && doctrineConfigVersion != dbVersion { @@ -56,16 +75,16 @@ Before deploying, fix the version mismatch. } if dotEnvVersion == "" && doctrineConfigVersion == "" { - return errors.New(` + return fmt.Errorf(` The ".platform/services.yaml" file defines a "%s" database service. When deploying, Doctrine needs to know the database version to determine the supported SQL syntax. As the database is not available when Doctrine is warming up its cache on Platform.sh, -you need to explicitely set the database version in the ".env" or "config/packages/doctrine.yaml" file. +you need to explicitly set the database version in the ".env" or "config/packages/doctrine.yaml" file. -The easiest is to set the "serverVersion" parameter in the "config/packages/doctrine.yaml" file. -`) +Set the "server_version" parameter to "%s" in "config/packages/doctrine.yaml". +`, dbName, dbVersion) } return nil diff --git a/commands/platformsh_hooks_test.go b/commands/platformsh_hooks_test.go new file mode 100644 index 00000000..8e1ae875 --- /dev/null +++ b/commands/platformsh_hooks_test.go @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2023-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +import ( + "flag" + "strings" + "testing" + + "github.com/symfony-cli/console" +) + +func TestDeployHook(t *testing.T) { + flags := flag.NewFlagSet("test", 0) + flags.String("dir", "", "") + c := console.NewContext(nil, flags, nil) + + for dir, expected := range map[string]string{ + "testdata/platformsh/version-mismatch-env/": `The ".platform/services.yaml" file defines a "postgresql" version 14 database service but the ".env" file requires version 13.`, + "testdata/platformsh/version-mismatch-config/": `The ".platform/services.yaml" file defines a "postgresql" version 14 database service but the "config/packages/doctrine.yaml" file requires version 13.`, + "testdata/platformsh/ok/": ``, + "testdata/platformsh/missing-version/": `Set the "server_version" parameter to "14" in "config/packages/doctrine.yaml".`, + } { + flags.Set("dir", dir) + err := platformshBeforeHooks["cloud:environment:push"](c) + if err == nil { + if expected != "" { + t.Errorf("TestDeployHook(%q): got %v, expected %v", dir, err, expected) + } + continue + } + errString := strings.ReplaceAll(err.Error(), "\n", " ") + if !strings.Contains(errString, expected) { + t.Errorf("TestDeployHook(%q): got %s, expected %s", dir, errString, expected) + } + } +} diff --git a/commands/testdata/postgresql/10/docker-compose.yml b/commands/testdata/docker/postgresql/10/docker-compose.yml similarity index 100% rename from commands/testdata/postgresql/10/docker-compose.yml rename to commands/testdata/docker/postgresql/10/docker-compose.yml diff --git a/commands/testdata/postgresql/next/docker-compose.yml b/commands/testdata/docker/postgresql/next/docker-compose.yml similarity index 100% rename from commands/testdata/postgresql/next/docker-compose.yml rename to commands/testdata/docker/postgresql/next/docker-compose.yml diff --git a/commands/testdata/postgresql/noversion/docker-compose.yml b/commands/testdata/docker/postgresql/noversion/docker-compose.yml similarity index 100% rename from commands/testdata/postgresql/noversion/docker-compose.yml rename to commands/testdata/docker/postgresql/noversion/docker-compose.yml diff --git a/commands/testdata/platformsh/missing-version/.env b/commands/testdata/platformsh/missing-version/.env new file mode 100644 index 00000000..127cdaa1 --- /dev/null +++ b/commands/testdata/platformsh/missing-version/.env @@ -0,0 +1,8 @@ +###> doctrine/doctrine-bundle ### +# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml +# +# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" +# DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7" +DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?charset=utf8" +###< doctrine/doctrine-bundle ### diff --git a/commands/testdata/platformsh/missing-version/.platform/services.yaml b/commands/testdata/platformsh/missing-version/.platform/services.yaml new file mode 100644 index 00000000..376f6a70 --- /dev/null +++ b/commands/testdata/platformsh/missing-version/.platform/services.yaml @@ -0,0 +1,3 @@ +pgsqldb: + type: postgresql:14 + disk: 512 diff --git a/commands/testdata/platformsh/ok/.env b/commands/testdata/platformsh/ok/.env new file mode 100644 index 00000000..1dc0a35e --- /dev/null +++ b/commands/testdata/platformsh/ok/.env @@ -0,0 +1,8 @@ +###> doctrine/doctrine-bundle ### +# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml +# +# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" +# DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7" +DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=14&charset=utf8" +###< doctrine/doctrine-bundle ### diff --git a/commands/testdata/platformsh/ok/.platform.app.yaml b/commands/testdata/platformsh/ok/.platform.app.yaml new file mode 100644 index 00000000..42aa30c9 --- /dev/null +++ b/commands/testdata/platformsh/ok/.platform.app.yaml @@ -0,0 +1,27 @@ +name: app + +type: php:8.2 + +relationships: + database: "pgsqldb:postgresql" + +web: + locations: + "/": + root: "public" + expires: 1d + passthru: "/index.php" + +disk: 8192 + +hooks: + build: | + set -x -e + + curl -s https://get.symfony.com/cloud/configurator | bash + symfony-build + + deploy: | + set -x -e + + symfony-deploy diff --git a/commands/testdata/platformsh/ok/.platform/services.yaml b/commands/testdata/platformsh/ok/.platform/services.yaml new file mode 100644 index 00000000..376f6a70 --- /dev/null +++ b/commands/testdata/platformsh/ok/.platform/services.yaml @@ -0,0 +1,3 @@ +pgsqldb: + type: postgresql:14 + disk: 512 diff --git a/commands/testdata/platformsh/ok/config/packages/doctrine.yaml b/commands/testdata/platformsh/ok/config/packages/doctrine.yaml new file mode 100644 index 00000000..49278b94 --- /dev/null +++ b/commands/testdata/platformsh/ok/config/packages/doctrine.yaml @@ -0,0 +1,5 @@ +doctrine: + dbal: + driver: pdo_pgsql + server_version: '13' + url: '%env(resolve:DATABASE_URL)%' diff --git a/commands/testdata/platformsh/version-mismatch-config/.platform.app.yaml b/commands/testdata/platformsh/version-mismatch-config/.platform.app.yaml new file mode 100644 index 00000000..42aa30c9 --- /dev/null +++ b/commands/testdata/platformsh/version-mismatch-config/.platform.app.yaml @@ -0,0 +1,27 @@ +name: app + +type: php:8.2 + +relationships: + database: "pgsqldb:postgresql" + +web: + locations: + "/": + root: "public" + expires: 1d + passthru: "/index.php" + +disk: 8192 + +hooks: + build: | + set -x -e + + curl -s https://get.symfony.com/cloud/configurator | bash + symfony-build + + deploy: | + set -x -e + + symfony-deploy diff --git a/commands/testdata/platformsh/version-mismatch-config/.platform/services.yaml b/commands/testdata/platformsh/version-mismatch-config/.platform/services.yaml new file mode 100644 index 00000000..376f6a70 --- /dev/null +++ b/commands/testdata/platformsh/version-mismatch-config/.platform/services.yaml @@ -0,0 +1,3 @@ +pgsqldb: + type: postgresql:14 + disk: 512 diff --git a/commands/testdata/platformsh/version-mismatch-config/config/packages/doctrine.yaml b/commands/testdata/platformsh/version-mismatch-config/config/packages/doctrine.yaml new file mode 100644 index 00000000..49278b94 --- /dev/null +++ b/commands/testdata/platformsh/version-mismatch-config/config/packages/doctrine.yaml @@ -0,0 +1,5 @@ +doctrine: + dbal: + driver: pdo_pgsql + server_version: '13' + url: '%env(resolve:DATABASE_URL)%' diff --git a/commands/testdata/platformsh/version-mismatch-env/.env b/commands/testdata/platformsh/version-mismatch-env/.env new file mode 100644 index 00000000..9692253e --- /dev/null +++ b/commands/testdata/platformsh/version-mismatch-env/.env @@ -0,0 +1,8 @@ +###> doctrine/doctrine-bundle ### +# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml +# +# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" +# DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7" +DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8" +###< doctrine/doctrine-bundle ### diff --git a/commands/testdata/platformsh/version-mismatch-env/.platform.app.yaml b/commands/testdata/platformsh/version-mismatch-env/.platform.app.yaml new file mode 100644 index 00000000..42aa30c9 --- /dev/null +++ b/commands/testdata/platformsh/version-mismatch-env/.platform.app.yaml @@ -0,0 +1,27 @@ +name: app + +type: php:8.2 + +relationships: + database: "pgsqldb:postgresql" + +web: + locations: + "/": + root: "public" + expires: 1d + passthru: "/index.php" + +disk: 8192 + +hooks: + build: | + set -x -e + + curl -s https://get.symfony.com/cloud/configurator | bash + symfony-build + + deploy: | + set -x -e + + symfony-deploy diff --git a/commands/testdata/platformsh/version-mismatch-env/.platform/services.yaml b/commands/testdata/platformsh/version-mismatch-env/.platform/services.yaml new file mode 100644 index 00000000..376f6a70 --- /dev/null +++ b/commands/testdata/platformsh/version-mismatch-env/.platform/services.yaml @@ -0,0 +1,3 @@ +pgsqldb: + type: postgresql:14 + disk: 512 From 6c6a669bfa2a1cf600cc3aff704e58854f24dda7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 25 Apr 2023 17:01:12 +0200 Subject: [PATCH 135/466] Add more artifacts in CI to ease testing --- .github/workflows/releaser.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 0bbc8f95..c872b127 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -98,7 +98,15 @@ jobs: uses: actions/upload-artifact@v3 with: retention-days: 5 + name: binaries path: dist + - + name: Archive Linux binary + uses: actions/upload-artifact@v3 + with: + retention-days: 5 + name: linux-binary + path: dist/symfony-cli_linux_amd64.tar.gz - name: Install Cloudsmith CLI run: pip install --upgrade cloudsmith-cli From 60d47ba768a9d56a3fb2577dd21a5390149f9066 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 27 Apr 2023 09:12:23 -0400 Subject: [PATCH 136/466] Make DB version check before deploy more robust --- commands/db_versions.go | 28 +++++++++++-------- .../platformsh/version-mismatch-env/.env | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/commands/db_versions.go b/commands/db_versions.go index 68298de4..9214b18e 100644 --- a/commands/db_versions.go +++ b/commands/db_versions.go @@ -3,10 +3,12 @@ package commands import ( "errors" "io/ioutil" + "net/url" "os" "path/filepath" "strings" + "github.com/joho/godotenv" "gopkg.in/yaml.v2" ) @@ -47,22 +49,26 @@ func readDBVersionFromDotEnv(projectDir string) (string, error) { return "", nil } - dotEnv, err := ioutil.ReadFile(path) + vars, err := godotenv.Read(path) if err != nil { return "", err } - lines := strings.Split(string(dotEnv), "\n") - for _, line := range lines { - if !strings.HasPrefix(line, "DATABASE_URL=") { - continue - } - if !strings.Contains(line, "serverVersion=") { - return "", nil - } - return strings.TrimRight(strings.Split(strings.Split(line, "serverVersion=")[1], "&")[0], "\""), nil + databaseUrl, defined := vars["DATABASE_URL"] + if !defined { + return "", nil + } + + if !strings.Contains(databaseUrl, "serverVersion=") { + return "", nil } - return "", nil + + url, err := url.Parse(databaseUrl) + if err != nil { + return "", err + } + + return url.Query().Get("serverVersion"), nil } func readDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { diff --git a/commands/testdata/platformsh/version-mismatch-env/.env b/commands/testdata/platformsh/version-mismatch-env/.env index 9692253e..bec9b2e0 100644 --- a/commands/testdata/platformsh/version-mismatch-env/.env +++ b/commands/testdata/platformsh/version-mismatch-env/.env @@ -4,5 +4,5 @@ # # DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" # DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7" -DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8" +DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?charset=utf8&serverVersion=13" ###< doctrine/doctrine-bundle ### From e25881eb5beaeecf85dd839330e8af838172cbfb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 08:10:27 +0000 Subject: [PATCH 137/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 117 +++++++++++++++++++++++++++++++++-- 1 file changed, 111 insertions(+), 6 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 98016d36..1efc76ca 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -437,7 +437,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:conclude", Hidden: true}, }, - Usage: "[ ALPHA ] Conclude a blue/green deployment", + Usage: " ALPHA Conclude a blue/green deployment", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -451,7 +451,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:deploy", Hidden: true}, }, - Usage: "[ ALPHA ] Perform a blue/green deployment", + Usage: " ALPHA Perform a blue/green deployment", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -466,7 +466,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:enable", Hidden: true}, }, - Usage: "[ ALPHA ] Enable blue/green deployments", + Usage: " ALPHA Enable blue/green deployments", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1372,6 +1372,81 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, + { + Category: "cloud:metrics", + Name: "all", + Aliases: []*console.Alias{ + {Name: "metrics:all", Hidden: true}, + {Name: "cloud:met"}, + {Name: "met", Hidden: true}, + {Name: "cloud:metrics"}, + {Name: "metrics", Hidden: true}, + }, + Usage: " BETA Show CPU, disk and memory metrics for an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "range", Aliases: []string{"r"},}, + &console.StringFlag{Name: "service", Aliases: []string{"s"},}, + &console.StringFlag{Name: "to",}, + &console.StringFlag{Name: "type",}, + }, + }, + { + Category: "cloud:metrics", + Name: "cpu", + Aliases: []*console.Alias{ + {Name: "metrics:cpu", Hidden: true}, + {Name: "cloud:cpu"}, + {Name: "cpu", Hidden: true}, + }, + Usage: " BETA Show CPU usage of an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "range", Aliases: []string{"r"},}, + &console.StringFlag{Name: "service", Aliases: []string{"s"},}, + &console.StringFlag{Name: "to",}, + &console.StringFlag{Name: "type",}, + }, + }, + { + Category: "cloud:metrics", + Name: "curl", + Aliases: []*console.Alias{ + {Name: "metrics:curl", Hidden: true}, + }, + Usage: "Run an authenticated cURL request on an environment's metrics API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"},}, + &console.BoolFlag{Name: "disable-compression",}, + &console.BoolFlag{Name: "enable-glob",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, + &console.StringFlag{Name: "header", Aliases: []string{"H"},}, + &console.StringFlag{Name: "host",}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, + &console.StringFlag{Name: "json",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + }, + }, { Category: "cloud:metrics", Name: "disk-usage", @@ -1380,7 +1455,35 @@ var Commands = []*console.Command{ {Name: "cloud:disk"}, {Name: "disk", Hidden: true}, }, - Usage: "Show disk usage on a service", + Usage: "Show disk usage of an environment", + Flags: []console.Flag{ + &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, + &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "range", Aliases: []string{"r"},}, + &console.StringFlag{Name: "service", Aliases: []string{"s"},}, + &console.StringFlag{Name: "to",}, + &console.StringFlag{Name: "type",}, + }, + }, + { + Category: "cloud:metrics", + Name: "memory", + Aliases: []*console.Alias{ + {Name: "metrics:memory", Hidden: true}, + {Name: "cloud:mem"}, + {Name: "mem", Hidden: true}, + {Name: "cloud:memory"}, + {Name: "memory", Hidden: true}, + }, + Usage: " BETA Show memory usage of an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -2092,7 +2195,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "session:switch", Hidden: true}, }, - Usage: "[ BETA ] Switch between sessions", + Usage: " BETA Switch between sessions", Hidden: console.Hide, }, { @@ -2397,6 +2500,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "prefix", DefaultValue: "none",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "sensitive",}, + &console.BoolFlag{Name: "update", Aliases: []string{"u"},}, &console.StringFlag{Name: "value",}, &console.StringFlag{Name: "visible-build",}, &console.BoolFlag{Name: "visible-runtime", DefaultValue: true,}, @@ -2469,6 +2573,7 @@ var Commands = []*console.Command{ }, Usage: "Update a variable", Flags: []console.Flag{ + &console.BoolFlag{Name: "allow-no-change",}, &console.BoolFlag{Name: "enabled", DefaultValue: true,}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "host",}, @@ -2492,7 +2597,7 @@ var Commands = []*console.Command{ {Name: "cloud:versions"}, {Name: "versions", Hidden: true}, }, - Usage: "[ ALPHA ] List environment versions", + Usage: " ALPHA List environment versions", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, From 535b32678832d371db4487012cfd5cf0441675e8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 16:20:06 +0000 Subject: [PATCH 138/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index a2854b82..fb208020 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -69,7 +69,7 @@ var availablePHPExts = map[string][]string{ "mysql": {"5.4", "5.5", "5.6"}, "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "newrelic": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "newrelic": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "oauth": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, From f8b5337b794cab0dc31f1095cacd6dce18defb4e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 6 May 2023 19:21:59 +0200 Subject: [PATCH 139/466] Relax DB check --- commands/db_versions.go | 12 ++++++--- commands/platformsh_hooks.go | 6 ++--- commands/platformsh_hooks_test.go | 4 +++ .../testdata/platformsh/mariadb-version/.env | 8 ++++++ .../mariadb-version/.platform.app.yaml | 27 +++++++++++++++++++ .../mariadb-version/.platform/services.yaml | 3 +++ .../ok/config/packages/doctrine.yaml | 2 +- 7 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 commands/testdata/platformsh/mariadb-version/.env create mode 100644 commands/testdata/platformsh/mariadb-version/.platform.app.yaml create mode 100644 commands/testdata/platformsh/mariadb-version/.platform/services.yaml diff --git a/commands/db_versions.go b/commands/db_versions.go index 9214b18e..bf635d8e 100644 --- a/commands/db_versions.go +++ b/commands/db_versions.go @@ -54,16 +54,16 @@ func readDBVersionFromDotEnv(projectDir string) (string, error) { return "", err } - databaseUrl, defined := vars["DATABASE_URL"] + databaseURL, defined := vars["DATABASE_URL"] if !defined { return "", nil } - if !strings.Contains(databaseUrl, "serverVersion=") { + if !strings.Contains(databaseURL, "serverVersion=") { return "", nil } - url, err := url.Parse(databaseUrl) + url, err := url.Parse(databaseURL) if err != nil { return "", err } @@ -95,3 +95,9 @@ func readDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { } return doctrineConfig.Doctrine.Dbal.ServerVersion, nil } + +func databaseVersiondUnsynced(providedVersion, dbVersion string) bool { + providedVersion = strings.Replace(providedVersion, "mariadb-", "", 1) + + return providedVersion != "" && !strings.HasPrefix(providedVersion, dbVersion) +} diff --git a/commands/platformsh_hooks.go b/commands/platformsh_hooks.go index 758273ed..82bc80f7 100644 --- a/commands/platformsh_hooks.go +++ b/commands/platformsh_hooks.go @@ -35,6 +35,7 @@ var platformshBeforeHooks = map[string]console.BeforeFunc{ if err != nil { return err } + if len(platformsh.FindLocalApplications(projectDir)) > 1 { // not implemented yet as more complex return nil @@ -61,16 +62,15 @@ Before deploying, fix the version mismatch. if err != nil { return nil } - if dotEnvVersion != "" && dotEnvVersion != dbVersion { + if databaseVersiondUnsynced(dotEnvVersion, dbVersion) { return fmt.Errorf(errorTpl, fmt.Sprintf("the \".env\" file requires version %s", dotEnvVersion)) } doctrineConfigVersion, err := readDBVersionFromDoctrineConfigYAML(projectDir) if err != nil { - fmt.Printf("%+v", err) return nil } - if doctrineConfigVersion != "" && doctrineConfigVersion != dbVersion { + if databaseVersiondUnsynced(doctrineConfigVersion, dbVersion) { return fmt.Errorf(errorTpl, fmt.Sprintf("the \"config/packages/doctrine.yaml\" file requires version %s", doctrineConfigVersion)) } diff --git a/commands/platformsh_hooks_test.go b/commands/platformsh_hooks_test.go index 8e1ae875..0886762e 100644 --- a/commands/platformsh_hooks_test.go +++ b/commands/platformsh_hooks_test.go @@ -36,6 +36,7 @@ func TestDeployHook(t *testing.T) { "testdata/platformsh/version-mismatch-env/": `The ".platform/services.yaml" file defines a "postgresql" version 14 database service but the ".env" file requires version 13.`, "testdata/platformsh/version-mismatch-config/": `The ".platform/services.yaml" file defines a "postgresql" version 14 database service but the "config/packages/doctrine.yaml" file requires version 13.`, "testdata/platformsh/ok/": ``, + "testdata/platformsh/mariadb-version/": ``, "testdata/platformsh/missing-version/": `Set the "server_version" parameter to "14" in "config/packages/doctrine.yaml".`, } { flags.Set("dir", dir) @@ -47,6 +48,9 @@ func TestDeployHook(t *testing.T) { continue } errString := strings.ReplaceAll(err.Error(), "\n", " ") + if expected == "" { + t.Errorf("TestDeployHook(%q): got %s, expected no errors", dir, errString) + } if !strings.Contains(errString, expected) { t.Errorf("TestDeployHook(%q): got %s, expected %s", dir, errString, expected) } diff --git a/commands/testdata/platformsh/mariadb-version/.env b/commands/testdata/platformsh/mariadb-version/.env new file mode 100644 index 00000000..0cc8154b --- /dev/null +++ b/commands/testdata/platformsh/mariadb-version/.env @@ -0,0 +1,8 @@ +###> doctrine/doctrine-bundle ### +# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml +# +# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" +# DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7" +DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=mariadb-10.6.12&charset=utf8" +###< doctrine/doctrine-bundle ### diff --git a/commands/testdata/platformsh/mariadb-version/.platform.app.yaml b/commands/testdata/platformsh/mariadb-version/.platform.app.yaml new file mode 100644 index 00000000..06798c32 --- /dev/null +++ b/commands/testdata/platformsh/mariadb-version/.platform.app.yaml @@ -0,0 +1,27 @@ +name: app + +type: php:8.2 + +relationships: + database: "mysqldb:mysql" + +web: + locations: + "/": + root: "public" + expires: 1d + passthru: "/index.php" + +disk: 8192 + +hooks: + build: | + set -x -e + + curl -s https://get.symfony.com/cloud/configurator | bash + symfony-build + + deploy: | + set -x -e + + symfony-deploy diff --git a/commands/testdata/platformsh/mariadb-version/.platform/services.yaml b/commands/testdata/platformsh/mariadb-version/.platform/services.yaml new file mode 100644 index 00000000..d7c1672c --- /dev/null +++ b/commands/testdata/platformsh/mariadb-version/.platform/services.yaml @@ -0,0 +1,3 @@ +mysqldb: + type: mysql:10.6 + disk: 512 diff --git a/commands/testdata/platformsh/ok/config/packages/doctrine.yaml b/commands/testdata/platformsh/ok/config/packages/doctrine.yaml index 49278b94..36b818e2 100644 --- a/commands/testdata/platformsh/ok/config/packages/doctrine.yaml +++ b/commands/testdata/platformsh/ok/config/packages/doctrine.yaml @@ -1,5 +1,5 @@ doctrine: dbal: driver: pdo_pgsql - server_version: '13' + server_version: '14' url: '%env(resolve:DATABASE_URL)%' From 0313ca14232075f180d8a8a8424d95cede8a4f36 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 16 May 2023 15:17:17 +0200 Subject: [PATCH 140/466] Update deps --- go.mod | 40 ++++++++++++++-------------- go.sum | 82 ++++++++++++++++++++++++++++++---------------------------- 2 files changed, 62 insertions(+), 60 deletions(-) diff --git a/go.mod b/go.mod index 57b78811..973ff935 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,8 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 - github.com/compose-spec/compose-go v1.13.0 - github.com/docker/docker v23.0.1+incompatible + github.com/compose-spec/compose-go v1.13.5 + github.com/docker/docker v23.0.6+incompatible github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 @@ -14,8 +14,8 @@ require ( github.com/mitchellh/go-homedir v1.1.0 github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 - github.com/rs/xid v1.4.0 - github.com/rs/zerolog v1.29.0 + github.com/rs/xid v1.5.0 + github.com/rs/zerolog v1.29.1 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 @@ -24,48 +24,48 @@ require ( github.com/symfony-cli/phpstore v1.0.7 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 - golang.org/x/sync v0.1.0 - golang.org/x/text v0.8.0 + golang.org/x/sync v0.2.0 + golang.org/x/text v0.9.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) require ( - github.com/Microsoft/go-winio v0.6.0 // indirect - github.com/distribution/distribution/v3 v3.0.0-20230223072852-e5d5810851d1 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/distribution/distribution/v3 v3.0.0-20230511163743-f7717b7855ca // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/imdario/mergo v0.3.15 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.18 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect + github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc2 // indirect + github.com/opencontainers/image-spec v1.1.0-rc3 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.6.0 // indirect - golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect + golang.org/x/crypto v0.9.0 // indirect + golang.org/x/mod v0.10.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/term v0.8.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.6.0 // indirect + golang.org/x/tools v0.9.1 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 133aa4db..f66c1daf 100644 --- a/go.sum +++ b/go.sum @@ -1,21 +1,21 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/compose-spec/compose-go v1.13.0 h1:HHMc1XvnHJr9LUS7fPiiQeTSmGtEp+myn7jGnXgIoXE= -github.com/compose-spec/compose-go v1.13.0/go.mod h1:uo+YhhqDpkW9MjZNzJgOLX3MlbK6zHaBo9n8LhGDwsg= -github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/compose-spec/compose-go v1.13.5 h1:ogqJOGEbe3uRxMg0ZEufOoCQTpX61l8tUeyW4UQgEBk= +github.com/compose-spec/compose-go v1.13.5/go.mod h1:m0o4G6MQDHjjz9rY7No9FpnNi+9sKic262rzrwuCqic= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20230223072852-e5d5810851d1 h1:OtfRoaZ54jKZ7jl9WuxqekousLR9T63iJf0y2EdC2S4= -github.com/distribution/distribution/v3 v3.0.0-20230223072852-e5d5810851d1/go.mod h1:r5XLH1cp+Wau2jxdptkYsFvvvzPPQTIe8eUuQ0vq30Q= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= -github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/distribution/distribution/v3 v3.0.0-20230511163743-f7717b7855ca h1:yGaIDzPWkgU+yRvI2x/rGdOU1hl6bLZzm0mETEUSHwk= +github.com/distribution/distribution/v3 v3.0.0-20230511163743-f7717b7855ca/go.mod h1:t1IxPNGdTGez+YGKyJyQrtSSqisfMIm1hnFhvMPlxtE= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v23.0.6+incompatible h1:aBD4np894vatVX99UTx/GyOUOK4uEcROwA3+bQhEcoU= +github.com/docker/docker v23.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -44,8 +44,8 @@ github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5 github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= +github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= @@ -63,8 +63,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -74,16 +74,16 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= -github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= +github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -95,12 +95,14 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= +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/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= -github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= +github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -136,25 +138,25 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk 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-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/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= @@ -167,24 +169,25 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= 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.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= 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= @@ -200,7 +203,6 @@ gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa 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-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= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= From 39a3e731a201cc0690f86025ddf0c09cf72e4fe2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 08:10:25 +0000 Subject: [PATCH 141/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 415 ++--------------------------------- 1 file changed, 18 insertions(+), 397 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 1efc76ca..dbc975dc 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -27,28 +27,6 @@ import ( ) var Commands = []*console.Command{ - { - Category: "cloud", - Name: "_completion", - Usage: "BASH completion hook.", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "generate-hook", Aliases: []string{"g"},}, - &console.BoolFlag{Name: "multiple", Aliases: []string{"m"},}, - &console.StringFlag{Name: "program", Aliases: []string{"p"},}, - &console.StringFlag{Name: "shell-type",}, - }, - }, - { - Category: "cloud", - Name: "bot", - Usage: "The Platform.sh Bot", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "parrot",}, - &console.BoolFlag{Name: "party",}, - }, - }, { Category: "cloud", Name: "clear-cache", @@ -67,15 +45,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "pipe",}, }, }, - { - Category: "cloud", - Name: "legacy-migrate", - Usage: "Migrate from the legacy file structure", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "no-backup",}, - }, - }, { Category: "cloud", Name: "multi", @@ -94,23 +63,10 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "browser",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, - { - Category: "cloud", - Name: "welcome", - Usage: "Welcome to Platform.sh", - Hidden: console.Hide, - }, - { - Category: "cloud", - Name: "winky", - Usage: "", - Hidden: console.Hide, - }, { Category: "cloud:activity", Name: "cancel", @@ -122,7 +78,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "type",}, }, @@ -141,7 +96,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -169,7 +123,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, &console.StringFlag{Name: "limit",}, &console.BoolFlag{Name: "no-header",}, @@ -192,7 +145,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "refresh",}, @@ -202,26 +154,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "type",}, }, }, - { - Category: "cloud:api", - Name: "curl", - Aliases: []*console.Alias{ - {Name: "api:curl", Hidden: true}, - }, - Usage: "Run an authenticated cURL request on the Platform.sh API", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "data", Aliases: []string{"d"},}, - &console.BoolFlag{Name: "disable-compression",}, - &console.BoolFlag{Name: "enable-glob",}, - &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, - &console.StringFlag{Name: "header", Aliases: []string{"H"},}, - &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, - &console.StringFlag{Name: "json",}, - &console.StringFlag{Name: "request", Aliases: []string{"X"},}, - }, - }, { Category: "cloud:app", Name: "config-get", @@ -232,7 +164,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, @@ -252,8 +183,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, @@ -311,19 +242,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "other",}, }, }, - { - Category: "cloud:auth", - Name: "token", - Aliases: []*console.Alias{ - {Name: "auth:token", Hidden: true}, - }, - Usage: "Obtain an OAuth 2 access token for requests to Platform.sh APIs", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "header", Aliases: []string{"H"},}, - &console.BoolFlag{Name: "no-warn", Aliases: []string{"W"},}, - }, - }, { Category: "cloud:auth", Name: "verify-phone-number", @@ -339,19 +257,13 @@ var Commands = []*console.Command{ {Name: "backup:create", Hidden: true}, {Name: "cloud:backup"}, {Name: "backup", Hidden: true}, - {Name: "cloud:snapshot:create"}, - {Name: "snapshot:create", Hidden: true}, - {Name: "cloud:environment:backup"}, - {Name: "environment:backup", Hidden: true}, }, Usage: "Make a backup of an environment", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "live",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "unsafe",}, &console.BoolFlag{Name: "wait",}, }, }, @@ -364,7 +276,6 @@ var Commands = []*console.Command{ Usage: "Delete an environment backup", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -380,7 +291,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -392,10 +302,6 @@ var Commands = []*console.Command{ {Name: "backup:list", Hidden: true}, {Name: "cloud:backups"}, {Name: "backups", Hidden: true}, - {Name: "cloud:snapshots"}, - {Name: "snapshots", Hidden: true}, - {Name: "cloud:snapshot:list"}, - {Name: "snapshot:list", Hidden: true}, }, Usage: "List available backups of an environment", Flags: []console.Flag{ @@ -403,11 +309,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, - &console.StringFlag{Name: "limit",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "start",}, }, }, { @@ -415,66 +318,17 @@ var Commands = []*console.Command{ Name: "restore", Aliases: []*console.Alias{ {Name: "backup:restore", Hidden: true}, - {Name: "cloud:environment:restore"}, - {Name: "environment:restore", Hidden: true}, - {Name: "cloud:snapshot:restore"}, - {Name: "snapshot:restore", Hidden: true}, }, Usage: "Restore an environment backup", Flags: []console.Flag{ &console.StringFlag{Name: "branch-from",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "target",}, &console.BoolFlag{Name: "wait",}, }, }, - { - Category: "cloud:blue-green", - Name: "conclude", - Aliases: []*console.Alias{ - {Name: "blue-green:conclude", Hidden: true}, - }, - Usage: " ALPHA Conclude a blue/green deployment", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - }, - }, - { - Category: "cloud:blue-green", - Name: "deploy", - Aliases: []*console.Alias{ - {Name: "blue-green:deploy", Hidden: true}, - }, - Usage: " ALPHA Perform a blue/green deployment", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "routing-percentage",}, - }, - }, - { - Category: "cloud:blue-green", - Name: "enable", - Aliases: []*console.Alias{ - {Name: "blue-green:enable", Hidden: true}, - }, - Usage: " ALPHA Enable blue/green deployments", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "routing-percentage", Aliases: []string{"%"},}, - }, - }, { Category: "cloud:certificate", Name: "add", @@ -485,7 +339,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -500,7 +353,6 @@ var Commands = []*console.Command{ }, Usage: "Delete a certificate from the project", Flags: []console.Flag{ - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -515,7 +367,6 @@ var Commands = []*console.Command{ Usage: "View a certificate", Flags: []console.Flag{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -537,7 +388,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "domain",}, &console.StringFlag{Name: "exclude-domain",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "ignore-expiry",}, &console.StringFlag{Name: "issuer",}, &console.BoolFlag{Name: "no-auto",}, @@ -557,12 +407,8 @@ var Commands = []*console.Command{ }, Usage: "Show commit details", Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format",}, - &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, @@ -581,7 +427,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "limit",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -592,10 +437,6 @@ var Commands = []*console.Command{ Name: "dump", Aliases: []*console.Alias{ {Name: "db:dump", Hidden: true}, - {Name: "cloud:sql-dump"}, - {Name: "sql-dump", Hidden: true}, - {Name: "cloud:environment:sql-dump"}, - {Name: "environment:sql-dump", Hidden: true}, }, Usage: "Create a local dump of the remote database", Flags: []console.Flag{ @@ -606,7 +447,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "exclude-table",}, &console.StringFlag{Name: "file", Aliases: []string{"f"},}, &console.BoolFlag{Name: "gzip", Aliases: []string{"z"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -631,7 +471,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -645,14 +484,11 @@ var Commands = []*console.Command{ {Name: "db:sql", Hidden: true}, {Name: "cloud:sql"}, {Name: "sql", Hidden: true}, - {Name: "cloud:environment:sql"}, - {Name: "environment:sql", Hidden: true}, }, Usage: "Run SQL on the remote database", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "raw",}, @@ -671,7 +507,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -688,7 +523,6 @@ var Commands = []*console.Command{ Usage: "Delete a domain from the project", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -706,7 +540,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, @@ -725,7 +558,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, @@ -741,7 +573,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "key",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -757,7 +588,6 @@ var Commands = []*console.Command{ Usage: "Activate an environment", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "parent",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -776,7 +606,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "force",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.BoolFlag{Name: "no-clone-parent",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, @@ -799,36 +628,11 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, }, }, - { - Category: "cloud:environment", - Name: "curl", - Aliases: []*console.Alias{ - {Name: "environment:curl", Hidden: true}, - }, - Usage: "Run an authenticated cURL request on an environment's API", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "data", Aliases: []string{"d"},}, - &console.BoolFlag{Name: "disable-compression",}, - &console.BoolFlag{Name: "enable-glob",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, - &console.StringFlag{Name: "header", Aliases: []string{"H"},}, - &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, - &console.StringFlag{Name: "json",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "request", Aliases: []string{"X"},}, - }, - }, { Category: "cloud:environment", Name: "delete", Aliases: []*console.Alias{ {Name: "environment:delete", Hidden: true}, - {Name: "cloud:environment:deactivate"}, - {Name: "environment:deactivate", Hidden: true}, }, Usage: "Delete one or more environments", Flags: []console.Flag{ @@ -836,7 +640,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude",}, &console.StringFlag{Name: "exclude-type",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "inactive",}, &console.BoolFlag{Name: "merged",}, &console.BoolFlag{Name: "no-delete-branch",}, @@ -861,7 +664,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "auth",}, &console.StringFlag{Name: "enabled",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -872,8 +674,6 @@ var Commands = []*console.Command{ Name: "info", Aliases: []*console.Alias{ {Name: "environment:info", Hidden: true}, - {Name: "cloud:environment:metadata"}, - {Name: "environment:metadata", Hidden: true}, }, Usage: "Read or set properties for an environment", Flags: []console.Flag{ @@ -881,7 +681,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -898,7 +697,6 @@ var Commands = []*console.Command{ Usage: "Initialize an environment from a public Git repository", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "profile",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -919,7 +717,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.BoolFlag{Name: "no-inactive", Aliases: []string{"I"},}, &console.BoolFlag{Name: "pipe",}, @@ -937,14 +734,11 @@ var Commands = []*console.Command{ {Name: "environment:logs", Hidden: true}, {Name: "cloud:log"}, {Name: "log", Hidden: true}, - {Name: "cloud:logs"}, - {Name: "logs", Hidden: true}, }, Usage: "Read an environment's logs", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "lines",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -963,7 +757,6 @@ var Commands = []*console.Command{ Usage: "Merge an environment", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -982,11 +775,9 @@ var Commands = []*console.Command{ Usage: "Push code to an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "activate",}, - &console.BoolFlag{Name: "branch",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, &console.BoolFlag{Name: "force-with-lease",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.BoolFlag{Name: "no-clone-parent",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, @@ -1009,7 +800,6 @@ var Commands = []*console.Command{ Usage: "Redeploy an environment", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -1027,7 +817,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, @@ -1046,7 +835,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -1054,15 +842,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "worker",}, }, }, - { - Category: "cloud:environment", - Name: "set-remote", - Aliases: []*console.Alias{ - {Name: "environment:set-remote", Hidden: true}, - }, - Usage: "Set the remote environment to map to a branch", - Hidden: console.Hide, - }, { Category: "cloud:environment", Name: "ssh", @@ -1076,7 +855,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "all",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.BoolFlag{Name: "pipe",}, @@ -1095,7 +873,6 @@ var Commands = []*console.Command{ Usage: "Synchronize an environment's code and/or data from its parent", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "rebase",}, @@ -1114,7 +891,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "browser",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "pipe",}, &console.BoolFlag{Name: "primary", Aliases: []string{"1"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -1132,7 +908,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "port",}, @@ -1152,7 +927,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, @@ -1165,8 +939,6 @@ var Commands = []*console.Command{ {Name: "integration:activity:list", Hidden: true}, {Name: "cloud:i:act"}, {Name: "i:act", Hidden: true}, - {Name: "cloud:integration:activities"}, - {Name: "integration:activities", Hidden: true}, }, Usage: "Get a list of activities for an integration", Flags: []console.Flag{ @@ -1175,7 +947,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, &console.StringFlag{Name: "limit",}, &console.BoolFlag{Name: "no-header",}, @@ -1196,7 +967,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "timestamps", Aliases: []string{"t"},}, }, @@ -1227,7 +997,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "fetch-branches", DefaultValue: true,}, &console.StringFlag{Name: "file",}, &console.StringFlag{Name: "from-address",}, - &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "header",}, &console.StringFlag{Name: "index",}, &console.StringFlag{Name: "key",}, &console.StringFlag{Name: "license-key",}, @@ -1265,7 +1035,6 @@ var Commands = []*console.Command{ }, Usage: "Delete an integration from a project", Flags: []console.Flag{ - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -1281,7 +1050,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, @@ -1299,7 +1067,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, @@ -1330,7 +1097,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "fetch-branches", DefaultValue: true,}, &console.StringFlag{Name: "file",}, &console.StringFlag{Name: "from-address",}, - &console.StringFlag{Name: "host",}, + &console.StringFlag{Name: "header",}, &console.StringFlag{Name: "index",}, &console.StringFlag{Name: "key",}, &console.StringFlag{Name: "license-key",}, @@ -1368,7 +1135,6 @@ var Commands = []*console.Command{ }, Usage: "Validate an existing integration", Flags: []console.Flag{ - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1388,7 +1154,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, &console.BoolFlag{Name: "no-header",}, @@ -1413,7 +1178,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, &console.BoolFlag{Name: "no-header",}, @@ -1424,29 +1188,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "type",}, }, }, - { - Category: "cloud:metrics", - Name: "curl", - Aliases: []*console.Alias{ - {Name: "metrics:curl", Hidden: true}, - }, - Usage: "Run an authenticated cURL request on an environment's metrics API", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "data", Aliases: []string{"d"},}, - &console.BoolFlag{Name: "disable-compression",}, - &console.BoolFlag{Name: "enable-glob",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, - &console.StringFlag{Name: "header", Aliases: []string{"H"},}, - &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, - &console.StringFlag{Name: "json",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "request", Aliases: []string{"X"},}, - }, - }, { Category: "cloud:metrics", Name: "disk-usage", @@ -1462,13 +1203,13 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "range", Aliases: []string{"r"},}, &console.StringFlag{Name: "service", Aliases: []string{"s"},}, + &console.BoolFlag{Name: "tmp",}, &console.StringFlag{Name: "to",}, &console.StringFlag{Name: "type",}, }, @@ -1490,7 +1231,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, &console.BoolFlag{Name: "no-header",}, @@ -1514,7 +1254,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "delete",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "include",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, @@ -1540,7 +1279,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.BoolFlag{Name: "no-header",}, &console.BoolFlag{Name: "paths",}, @@ -1562,7 +1300,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.BoolFlag{Name: "no-header",}, @@ -1583,7 +1320,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "delete",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "include",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, @@ -1607,6 +1343,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1622,6 +1359,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1637,27 +1375,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "name",}, }, }, - { - Category: "cloud:organization", - Name: "curl", - Aliases: []*console.Alias{ - {Name: "organization:curl", Hidden: true}, - }, - Usage: "Run an authenticated cURL request on an organization's API", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "data", Aliases: []string{"d"},}, - &console.BoolFlag{Name: "disable-compression",}, - &console.BoolFlag{Name: "enable-glob",}, - &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, - &console.StringFlag{Name: "header", Aliases: []string{"H"},}, - &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, - &console.StringFlag{Name: "json",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "request", Aliases: []string{"X"},}, - }, - }, { Category: "cloud:organization", Name: "delete", @@ -1667,6 +1384,7 @@ var Commands = []*console.Command{ Usage: "Delete an organization", Flags: []console.Flag{ &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1682,6 +1400,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1720,6 +1439,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "page",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1732,6 +1452,7 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "permission",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1743,6 +1464,7 @@ var Commands = []*console.Command{ Usage: "Remove a user from an organization", Flags: []console.Flag{ &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1758,6 +1480,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, }, @@ -1776,6 +1499,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1794,6 +1518,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "list-all",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "reverse",}, &console.BoolFlag{Name: "sort-granted",}, }, @@ -1808,6 +1533,7 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "permission",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1818,7 +1544,6 @@ var Commands = []*console.Command{ }, Usage: "Clear a project's build cache", Flags: []console.Flag{ - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1838,6 +1563,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "no-set-remote",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "plan", DefaultValue: "development",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "region",}, &console.BoolFlag{Name: "set-remote",}, &console.StringFlag{Name: "storage",}, @@ -1845,28 +1571,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "title", DefaultValue: "Untitled Project",}, }, }, - { - Category: "cloud:project", - Name: "curl", - Aliases: []*console.Alias{ - {Name: "project:curl", Hidden: true}, - }, - Usage: "Run an authenticated cURL request on a project's API", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "data", Aliases: []string{"d"},}, - &console.BoolFlag{Name: "disable-compression",}, - &console.BoolFlag{Name: "enable-glob",}, - &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, - &console.StringFlag{Name: "header", Aliases: []string{"H"},}, - &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, - &console.StringFlag{Name: "json",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "request", Aliases: []string{"X"},}, - }, - }, { Category: "cloud:project", Name: "delete", @@ -1875,7 +1579,6 @@ var Commands = []*console.Command{ }, Usage: "Delete a project", Flags: []console.Flag{ - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1892,7 +1595,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "build",}, &console.StringFlag{Name: "depth",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, @@ -1902,15 +1604,12 @@ var Commands = []*console.Command{ Name: "info", Aliases: []*console.Alias{ {Name: "project:info", Hidden: true}, - {Name: "cloud:project:metadata"}, - {Name: "project:metadata", Hidden: true}, }, Usage: "Read or set properties for a project", Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -1964,7 +1663,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1981,7 +1679,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "files", Aliases: []string{"f"},}, &console.BoolFlag{Name: "git-style",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -1997,7 +1694,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2012,7 +1708,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "id",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.BoolFlag{Name: "primary", Aliases: []string{"1"},}, @@ -2028,15 +1723,12 @@ var Commands = []*console.Command{ {Name: "route:list", Hidden: true}, {Name: "cloud:routes"}, {Name: "routes", Hidden: true}, - {Name: "cloud:environment:routes"}, - {Name: "environment:routes", Hidden: true}, }, Usage: "List all routes for an environment", Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, @@ -2045,9 +1737,6 @@ var Commands = []*console.Command{ { Category: "cloud:self", Name: "install", - Aliases: []*console.Alias{ - {Name: "cloud:local:install"}, - }, Usage: "Install or update CLI configuration files", Hidden: console.Hide, Flags: []console.Flag{ @@ -2059,7 +1748,6 @@ var Commands = []*console.Command{ Name: "update", Aliases: []*console.Alias{ {Name: "cloud:self-update"}, - {Name: "cloud:update"}, }, Usage: "Update the CLI to the latest version", Hidden: console.Hide, @@ -2084,8 +1772,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, @@ -2104,7 +1792,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gzip", Aliases: []string{"z"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -2125,7 +1812,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "fields", Aliases: []string{"f"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.BoolFlag{Name: "jsonArray",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -2146,7 +1832,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -2165,7 +1850,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "eval",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -2183,21 +1867,11 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, }, - { - Category: "cloud:session", - Name: "switch", - Aliases: []*console.Alias{ - {Name: "session:switch", Hidden: true}, - }, - Usage: " BETA Switch between sessions", - Hidden: console.Hide, - }, { Category: "cloud:source-operation", Name: "list", @@ -2212,7 +1886,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "full",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, @@ -2226,27 +1899,12 @@ var Commands = []*console.Command{ Usage: "Run a source operation", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "variable",}, &console.BoolFlag{Name: "wait",}, }, }, - { - Category: "cloud:ssh-cert", - Name: "info", - Aliases: []*console.Alias{ - {Name: "ssh-cert:info", Hidden: true}, - }, - Usage: "Display information about the current SSH certificate", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.BoolFlag{Name: "no-refresh",}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, - }, - }, { Category: "cloud:ssh-cert", Name: "load", @@ -2305,7 +1963,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "id", Aliases: []string{"s"},}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -2322,7 +1979,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2339,7 +1995,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "encode", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, @@ -2360,7 +2015,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, @@ -2376,7 +2030,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, @@ -2392,7 +2045,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "port",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -2408,7 +2060,6 @@ var Commands = []*console.Command{ Usage: "Add a user to the project", Flags: []console.Flag{ &console.BoolFlag{Name: "force-invite",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "role", Aliases: []string{"r"},}, @@ -2423,7 +2074,6 @@ var Commands = []*console.Command{ }, Usage: "Delete a user from the project", Flags: []console.Flag{ - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "wait",}, @@ -2434,13 +2084,10 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "user:get", Hidden: true}, - {Name: "cloud:user:role"}, - {Name: "user:role", Hidden: true}, }, Usage: "View a user's role(s)", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.BoolFlag{Name: "pipe",}, @@ -2461,7 +2108,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, @@ -2474,7 +2120,6 @@ var Commands = []*console.Command{ }, Usage: "Update user role(s) on a project", Flags: []console.Flag{ - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "role", Aliases: []string{"r"},}, @@ -2491,7 +2136,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.BoolFlag{Name: "enabled", DefaultValue: true,}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "inheritable", DefaultValue: true,}, &console.BoolFlag{Name: "json",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, @@ -2516,7 +2160,6 @@ var Commands = []*console.Command{ Usage: "Delete a variable", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -2536,7 +2179,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, &console.BoolFlag{Name: "no-header",}, &console.BoolFlag{Name: "pipe",}, @@ -2559,7 +2201,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -2576,7 +2217,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "allow-no-change",}, &console.BoolFlag{Name: "enabled", DefaultValue: true,}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "inheritable", DefaultValue: true,}, &console.BoolFlag{Name: "json",}, &console.StringFlag{Name: "level", Aliases: []string{"l"},}, @@ -2589,25 +2229,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "wait",}, }, }, - { - Category: "cloud:version", - Name: "list", - Aliases: []*console.Alias{ - {Name: "version:list", Hidden: true}, - {Name: "cloud:versions"}, - {Name: "versions", Hidden: true}, - }, - Usage: " ALPHA List environment versions", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - }, - }, { Category: "cloud:worker", Name: "list", @@ -2621,8 +2242,8 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "no-header",}, + &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "refresh",}, }, From 36b3c92c255e2d2c213e64573d0bcdda2a531783 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 24 May 2023 16:09:39 +0000 Subject: [PATCH 142/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 129 ----------------------------------- 1 file changed, 129 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index dbc975dc..63f7955f 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -30,10 +30,6 @@ var Commands = []*console.Command{ { Category: "cloud", Name: "clear-cache", - Aliases: []*console.Alias{ - {Name: "cloud:clearcache"}, - {Name: "cloud:cc"}, - }, Usage: "Clear the CLI cache", }, { @@ -110,10 +106,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "activity:list", Hidden: true}, - {Name: "cloud:activities"}, - {Name: "activities", Hidden: true}, - {Name: "cloud:act"}, - {Name: "act", Hidden: true}, }, Usage: "Get a list of activities for an environment or project", Flags: []console.Flag{ @@ -175,8 +167,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "app:list", Hidden: true}, - {Name: "cloud:apps"}, - {Name: "apps", Hidden: true}, }, Usage: "List apps in the project", Flags: []console.Flag{ @@ -202,8 +192,6 @@ var Commands = []*console.Command{ Name: "browser-login", Aliases: []*console.Alias{ {Name: "auth:browser-login", Hidden: true}, - {Name: "cloud:login"}, - {Name: "login", Hidden: true}, }, Usage: "Log in to Platform.sh via a browser", Flags: []console.Flag{ @@ -233,8 +221,6 @@ var Commands = []*console.Command{ Name: "logout", Aliases: []*console.Alias{ {Name: "auth:logout", Hidden: true}, - {Name: "cloud:logout"}, - {Name: "logout", Hidden: true}, }, Usage: "Log out of Platform.sh", Flags: []console.Flag{ @@ -255,8 +241,6 @@ var Commands = []*console.Command{ Name: "create", Aliases: []*console.Alias{ {Name: "backup:create", Hidden: true}, - {Name: "cloud:backup"}, - {Name: "backup", Hidden: true}, }, Usage: "Make a backup of an environment", Flags: []console.Flag{ @@ -300,8 +284,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "backup:list", Hidden: true}, - {Name: "cloud:backups"}, - {Name: "backups", Hidden: true}, }, Usage: "List available backups of an environment", Flags: []console.Flag{ @@ -376,10 +358,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "certificate:list", Hidden: true}, - {Name: "cloud:certificates"}, - {Name: "certificates", Hidden: true}, - {Name: "cloud:certs"}, - {Name: "certs", Hidden: true}, }, Usage: "List project certificates", Flags: []console.Flag{ @@ -418,8 +396,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "commit:list", Hidden: true}, - {Name: "cloud:commits"}, - {Name: "commits", Hidden: true}, }, Usage: "List commits", Flags: []console.Flag{ @@ -482,8 +458,6 @@ var Commands = []*console.Command{ Name: "sql", Aliases: []*console.Alias{ {Name: "db:sql", Hidden: true}, - {Name: "cloud:sql"}, - {Name: "sql", Hidden: true}, }, Usage: "Run SQL on the remote database", Flags: []console.Flag{ @@ -550,8 +524,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "domain:list", Hidden: true}, - {Name: "cloud:domains"}, - {Name: "domains", Hidden: true}, }, Usage: "Get a list of all domains", Flags: []console.Flag{ @@ -599,8 +571,6 @@ var Commands = []*console.Command{ Name: "branch", Aliases: []*console.Alias{ {Name: "environment:branch", Hidden: true}, - {Name: "cloud:branch"}, - {Name: "branch", Hidden: true}, }, Usage: "Branch an environment", Flags: []console.Flag{ @@ -620,8 +590,6 @@ var Commands = []*console.Command{ Name: "checkout", Aliases: []*console.Alias{ {Name: "environment:checkout", Hidden: true}, - {Name: "cloud:checkout"}, - {Name: "checkout", Hidden: true}, }, Usage: "Check out an environment", Flags: []console.Flag{ @@ -655,8 +623,6 @@ var Commands = []*console.Command{ Name: "http-access", Aliases: []*console.Alias{ {Name: "environment:http-access", Hidden: true}, - {Name: "cloud:httpaccess"}, - {Name: "httpaccess", Hidden: true}, }, Usage: "Update HTTP access settings for an environment", Flags: []console.Flag{ @@ -708,10 +674,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "environment:list", Hidden: true}, - {Name: "cloud:environments"}, - {Name: "environments", Hidden: true}, - {Name: "cloud:env"}, - {Name: "env", Hidden: true}, }, Usage: "Get a list of environments", Flags: []console.Flag{ @@ -732,8 +694,6 @@ var Commands = []*console.Command{ Name: "logs", Aliases: []*console.Alias{ {Name: "environment:logs", Hidden: true}, - {Name: "cloud:log"}, - {Name: "log", Hidden: true}, }, Usage: "Read an environment's logs", Flags: []console.Flag{ @@ -751,8 +711,6 @@ var Commands = []*console.Command{ Name: "merge", Aliases: []*console.Alias{ {Name: "environment:merge", Hidden: true}, - {Name: "cloud:merge"}, - {Name: "merge", Hidden: true}, }, Usage: "Merge an environment", Flags: []console.Flag{ @@ -767,8 +725,6 @@ var Commands = []*console.Command{ Name: "push", Aliases: []*console.Alias{ {Name: "environment:push", Hidden: true}, - {Name: "cloud:push"}, - {Name: "push", Hidden: true}, {Name: "deploy"}, {Name: "cloud:deploy"}, }, @@ -794,8 +750,6 @@ var Commands = []*console.Command{ Name: "redeploy", Aliases: []*console.Alias{ {Name: "environment:redeploy", Hidden: true}, - {Name: "cloud:redeploy"}, - {Name: "redeploy", Hidden: true}, }, Usage: "Redeploy an environment", Flags: []console.Flag{ @@ -810,8 +764,6 @@ var Commands = []*console.Command{ Name: "relationships", Aliases: []*console.Alias{ {Name: "environment:relationships", Hidden: true}, - {Name: "cloud:relationships"}, - {Name: "relationships", Hidden: true}, }, Usage: "Show an environment's relationships", Flags: []console.Flag{ @@ -828,8 +780,6 @@ var Commands = []*console.Command{ Name: "scp", Aliases: []*console.Alias{ {Name: "environment:scp", Hidden: true}, - {Name: "cloud:scp"}, - {Name: "scp", Hidden: true}, }, Usage: "Copy files to and from an environment using scp", Flags: []console.Flag{ @@ -847,8 +797,6 @@ var Commands = []*console.Command{ Name: "ssh", Aliases: []*console.Alias{ {Name: "environment:ssh", Hidden: true}, - {Name: "cloud:ssh"}, - {Name: "ssh", Hidden: true}, }, Usage: "SSH to the current environment", Flags: []console.Flag{ @@ -867,8 +815,6 @@ var Commands = []*console.Command{ Name: "synchronize", Aliases: []*console.Alias{ {Name: "environment:synchronize", Hidden: true}, - {Name: "cloud:sync"}, - {Name: "sync", Hidden: true}, }, Usage: "Synchronize an environment's code and/or data from its parent", Flags: []console.Flag{ @@ -884,8 +830,6 @@ var Commands = []*console.Command{ Name: "url", Aliases: []*console.Alias{ {Name: "environment:url", Hidden: true}, - {Name: "cloud:url"}, - {Name: "url", Hidden: true}, }, Usage: "Get the public URLs of an environment", Flags: []console.Flag{ @@ -901,8 +845,6 @@ var Commands = []*console.Command{ Name: "xdebug", Aliases: []*console.Alias{ {Name: "environment:xdebug", Hidden: true}, - {Name: "cloud:xdebug"}, - {Name: "xdebug", Hidden: true}, }, Usage: "Open a tunnel to Xdebug on the environment", Flags: []console.Flag{ @@ -937,8 +879,6 @@ var Commands = []*console.Command{ Name: "activity:list", Aliases: []*console.Alias{ {Name: "integration:activity:list", Hidden: true}, - {Name: "cloud:i:act"}, - {Name: "i:act", Hidden: true}, }, Usage: "Get a list of activities for an integration", Flags: []console.Flag{ @@ -1060,8 +1000,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "integration:list", Hidden: true}, - {Name: "cloud:integrations"}, - {Name: "integrations", Hidden: true}, }, Usage: "View a list of project integration(s)", Flags: []console.Flag{ @@ -1143,10 +1081,6 @@ var Commands = []*console.Command{ Name: "all", Aliases: []*console.Alias{ {Name: "metrics:all", Hidden: true}, - {Name: "cloud:met"}, - {Name: "met", Hidden: true}, - {Name: "cloud:metrics"}, - {Name: "metrics", Hidden: true}, }, Usage: " BETA Show CPU, disk and memory metrics for an environment", Flags: []console.Flag{ @@ -1169,8 +1103,6 @@ var Commands = []*console.Command{ Name: "cpu", Aliases: []*console.Alias{ {Name: "metrics:cpu", Hidden: true}, - {Name: "cloud:cpu"}, - {Name: "cpu", Hidden: true}, }, Usage: " BETA Show CPU usage of an environment", Flags: []console.Flag{ @@ -1193,8 +1125,6 @@ var Commands = []*console.Command{ Name: "disk-usage", Aliases: []*console.Alias{ {Name: "metrics:disk-usage", Hidden: true}, - {Name: "cloud:disk"}, - {Name: "disk", Hidden: true}, }, Usage: "Show disk usage of an environment", Flags: []console.Flag{ @@ -1219,10 +1149,6 @@ var Commands = []*console.Command{ Name: "memory", Aliases: []*console.Alias{ {Name: "metrics:memory", Hidden: true}, - {Name: "cloud:mem"}, - {Name: "mem", Hidden: true}, - {Name: "cloud:memory"}, - {Name: "memory", Hidden: true}, }, Usage: " BETA Show memory usage of an environment", Flags: []console.Flag{ @@ -1270,8 +1196,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "mount:list", Hidden: true}, - {Name: "cloud:mounts"}, - {Name: "mounts", Hidden: true}, }, Usage: "Get a list of mounts", Flags: []console.Flag{ @@ -1408,10 +1332,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "organization:list", Hidden: true}, - {Name: "cloud:orgs"}, - {Name: "orgs", Hidden: true}, - {Name: "cloud:organizations"}, - {Name: "organizations", Hidden: true}, }, Usage: "List organizations", Flags: []console.Flag{ @@ -1428,8 +1348,6 @@ var Commands = []*console.Command{ Name: "subscription:list", Aliases: []*console.Alias{ {Name: "organization:subscription:list", Hidden: true}, - {Name: "cloud:organization:subscriptions"}, - {Name: "organization:subscriptions", Hidden: true}, }, Usage: "List subscriptions within an organization", Flags: []console.Flag{ @@ -1489,8 +1407,6 @@ var Commands = []*console.Command{ Name: "user:list", Aliases: []*console.Alias{ {Name: "organization:user:list", Hidden: true}, - {Name: "cloud:organization:users"}, - {Name: "organization:users", Hidden: true}, }, Usage: "List organization users", Flags: []console.Flag{ @@ -1507,8 +1423,6 @@ var Commands = []*console.Command{ Name: "user:projects", Aliases: []*console.Alias{ {Name: "organization:user:projects", Hidden: true}, - {Name: "cloud:oups"}, - {Name: "oups", Hidden: true}, }, Usage: "List the projects a user can access", Flags: []console.Flag{ @@ -1552,8 +1466,6 @@ var Commands = []*console.Command{ Name: "create", Aliases: []*console.Alias{ {Name: "project:create", Hidden: true}, - {Name: "cloud:create"}, - {Name: "create", Hidden: true}, }, Usage: "Create a new project", Flags: []console.Flag{ @@ -1587,8 +1499,6 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "project:get", Hidden: true}, - {Name: "cloud:get"}, - {Name: "get", Hidden: true}, }, Usage: "Clone a project locally", Flags: []console.Flag{ @@ -1622,10 +1532,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "project:list", Hidden: true}, - {Name: "cloud:projects"}, - {Name: "projects", Hidden: true}, - {Name: "cloud:pro"}, - {Name: "pro", Hidden: true}, }, Usage: "Get a list of all active projects", Flags: []console.Flag{ @@ -1687,8 +1593,6 @@ var Commands = []*console.Command{ Name: "read", Aliases: []*console.Alias{ {Name: "repo:read", Hidden: true}, - {Name: "cloud:read"}, - {Name: "read", Hidden: true}, }, Usage: "Read a directory or file in the project repository", Flags: []console.Flag{ @@ -1721,8 +1625,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "route:list", Hidden: true}, - {Name: "cloud:routes"}, - {Name: "routes", Hidden: true}, }, Usage: "List all routes for an environment", Flags: []console.Flag{ @@ -1746,9 +1648,6 @@ var Commands = []*console.Command{ { Category: "cloud:self", Name: "update", - Aliases: []*console.Alias{ - {Name: "cloud:self-update"}, - }, Usage: "Update the CLI to the latest version", Hidden: console.Hide, Flags: []console.Flag{ @@ -1764,8 +1663,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "service:list", Hidden: true}, - {Name: "cloud:services"}, - {Name: "services", Hidden: true}, }, Usage: "List services in the project", Flags: []console.Flag{ @@ -1783,8 +1680,6 @@ var Commands = []*console.Command{ Name: "mongo:dump", Aliases: []*console.Alias{ {Name: "service:mongo:dump", Hidden: true}, - {Name: "cloud:mongodump"}, - {Name: "mongodump", Hidden: true}, }, Usage: "Create a binary archive dump of data from MongoDB", Flags: []console.Flag{ @@ -1803,8 +1698,6 @@ var Commands = []*console.Command{ Name: "mongo:export", Aliases: []*console.Alias{ {Name: "service:mongo:export", Hidden: true}, - {Name: "cloud:mongoexport"}, - {Name: "mongoexport", Hidden: true}, }, Usage: "Export data from MongoDB", Flags: []console.Flag{ @@ -1824,8 +1717,6 @@ var Commands = []*console.Command{ Name: "mongo:restore", Aliases: []*console.Alias{ {Name: "service:mongo:restore", Hidden: true}, - {Name: "cloud:mongorestore"}, - {Name: "mongorestore", Hidden: true}, }, Usage: "Restore a binary archive dump of data into MongoDB", Flags: []console.Flag{ @@ -1842,8 +1733,6 @@ var Commands = []*console.Command{ Name: "mongo:shell", Aliases: []*console.Alias{ {Name: "service:mongo:shell", Hidden: true}, - {Name: "cloud:mongo"}, - {Name: "mongo", Hidden: true}, }, Usage: "Use the MongoDB shell", Flags: []console.Flag{ @@ -1860,8 +1749,6 @@ var Commands = []*console.Command{ Name: "redis-cli", Aliases: []*console.Alias{ {Name: "service:redis-cli", Hidden: true}, - {Name: "cloud:redis"}, - {Name: "redis", Hidden: true}, }, Usage: "Access the Redis CLI", Flags: []console.Flag{ @@ -1877,8 +1764,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "source-operation:list", Hidden: true}, - {Name: "cloud:source-ops"}, - {Name: "source-ops", Hidden: true}, }, Usage: "List source operations on an environment", Flags: []console.Flag{ @@ -1942,8 +1827,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "ssh-key:list", Hidden: true}, - {Name: "cloud:ssh-keys"}, - {Name: "ssh-keys", Hidden: true}, }, Usage: "Get a list of SSH keys in your account", Flags: []console.Flag{ @@ -2005,8 +1888,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "tunnel:list", Hidden: true}, - {Name: "cloud:tunnels"}, - {Name: "tunnels", Hidden: true}, }, Usage: "List SSH tunnels", Flags: []console.Flag{ @@ -2101,8 +1982,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "user:list", Hidden: true}, - {Name: "cloud:users"}, - {Name: "users", Hidden: true}, }, Usage: "List project users", Flags: []console.Flag{ @@ -2171,8 +2050,6 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "variable:get", Hidden: true}, - {Name: "cloud:vget"}, - {Name: "vget", Hidden: true}, }, Usage: "View a variable", Flags: []console.Flag{ @@ -2191,10 +2068,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "variable:list", Hidden: true}, - {Name: "cloud:variables"}, - {Name: "variables", Hidden: true}, - {Name: "cloud:var"}, - {Name: "var", Hidden: true}, }, Usage: "List variables", Flags: []console.Flag{ @@ -2234,8 +2107,6 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "worker:list", Hidden: true}, - {Name: "cloud:workers"}, - {Name: "workers", Hidden: true}, }, Usage: "Get a list of all deployed workers", Flags: []console.Flag{ From aabac2884fade44c3f679f4faff5b78d7b8fccc6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 14 Jun 2023 08:10:01 +0000 Subject: [PATCH 143/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index fb208020..c62f003e 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -133,13 +133,13 @@ var availableServices = []*service{ Type: "chrome-headless", Versions: serviceVersions{ Deprecated: []string{}, - Supported: []string{"73", "80", "81", "83", "84", "86", "91", "95"}, + Supported: []string{"73", "80", "81", "83", "84", "86", "91", "95", "113"}, }, }, { Type: "elasticsearch", Versions: serviceVersions{ - Deprecated: []string{"0.9", "1.4", "1.7", "2.4", "5.2", "5.4", "6.5", "6.8", "7.2", "7.5", "7.7", "7.9", "7.10"}, + Deprecated: []string{"1.4", "1.7", "2.4", "5.2", "5.4", "6.5", "6.8", "7.2", "7.5", "7.7", "7.9", "7.10"}, Supported: []string{}, }, }, @@ -161,7 +161,7 @@ var availableServices = []*service{ Type: "mariadb", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6"}, }, }, { @@ -174,7 +174,7 @@ var availableServices = []*service{ { Type: "mongodb", Versions: serviceVersions{ - Deprecated: []string{"3.0", "3.2", "3.4", "3.6"}, + Deprecated: []string{"3.0", "3.2", "3.4", "3.6", "4.0.3"}, Supported: []string{}, }, }, @@ -182,14 +182,14 @@ var availableServices = []*service{ Type: "mongodb-enterprise", Versions: serviceVersions{ Deprecated: []string{"4.0"}, - Supported: []string{"4.2", "4.4", "5.0"}, + Supported: []string{"4.2", "4.4", "5.0", "6.0"}, }, }, { Type: "mysql", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6"}, }, }, { @@ -244,8 +244,8 @@ var availableServices = []*service{ { Type: "varnish", Versions: serviceVersions{ - Deprecated: []string{"5.1", "5.2"}, - Supported: []string{"6.0", "6.3", "7.1", "7.2"}, + Deprecated: []string{"5.1", "5.2", "6.0", "7.1"}, + Supported: []string{"6.3", "7.2"}, }, }, { From 5e7acf16c7d83bc7354404756d93d55eb18917c9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 14 Jun 2023 16:10:40 +0000 Subject: [PATCH 144/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 63f7955f..4cc6062a 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -720,6 +720,20 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "wait",}, }, }, + { + Category: "cloud:environment", + Name: "pause", + Aliases: []*console.Alias{ + {Name: "environment:pause", Hidden: true}, + }, + Usage: "Pause an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.BoolFlag{Name: "wait",}, + }, + }, { Category: "cloud:environment", Name: "push", @@ -775,6 +789,20 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "refresh",}, }, }, + { + Category: "cloud:environment", + Name: "resume", + Aliases: []*console.Alias{ + {Name: "environment:resume", Hidden: true}, + }, + Usage: "Resume a paused environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.BoolFlag{Name: "wait",}, + }, + }, { Category: "cloud:environment", Name: "scp", From 85f3ece37fdb768fe576ab6717350c0912ccee16 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 29 Jun 2023 08:11:43 +0000 Subject: [PATCH 145/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 1 + 1 file changed, 1 insertion(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 4cc6062a..04b55470 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -604,6 +604,7 @@ var Commands = []*console.Command{ }, Usage: "Delete one or more environments", Flags: []console.Flag{ + &console.BoolFlag{Name: "allow-delete-parent",}, &console.BoolFlag{Name: "delete-branch",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude",}, From dd6e73f32c9710f5d38ce8a323f4690ad0d03b26 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 29 Jun 2023 12:15:54 +0000 Subject: [PATCH 146/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index c62f003e..c1a5c8da 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -154,7 +154,7 @@ var availableServices = []*service{ Type: "kafka", Versions: serviceVersions{ Deprecated: []string{"2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7"}, - Supported: []string{"3.2"}, + Supported: []string{"3.2", "3.4"}, }, }, { From 72535a6b4febb030fafbeb718f532e9512715ff9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 7 Jul 2023 08:12:09 +0000 Subject: [PATCH 147/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index c1a5c8da..e640a781 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -47,6 +47,7 @@ var availablePHPExts = map[string][]string{ "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "gmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "gnupg": {"8.2"}, "http": {"5.4", "5.5", "7.3", "7.4", "8.0", "8.1", "8.2"}, "iconv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, @@ -161,7 +162,7 @@ var availableServices = []*service{ Type: "mariadb", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11"}, }, }, { @@ -189,7 +190,7 @@ var availableServices = []*service{ Type: "mysql", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11"}, }, }, { From 56a1ac7883856f8c7e2bfe93d48b86be3ec9adad Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 20 Jul 2023 16:30:56 +0200 Subject: [PATCH 148/466] Update deps --- go.mod | 40 +++++++++--------- go.sum | 89 +++++++++++++++++++-------------------- local/proxy/cert_store.go | 6 +-- 3 files changed, 67 insertions(+), 68 deletions(-) diff --git a/go.mod b/go.mod index 973ff935..e638163a 100644 --- a/go.mod +++ b/go.mod @@ -2,13 +2,13 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 - github.com/compose-spec/compose-go v1.13.5 - github.com/docker/docker v23.0.6+incompatible + github.com/compose-spec/compose-go v1.17.0 + github.com/docker/docker v24.0.4+incompatible github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 - github.com/hashicorp/golang-lru/v2 v2.0.2 + github.com/hashicorp/golang-lru/arc/v2 v2.0.4 github.com/hpcloud/tail v1.0.0 github.com/joho/godotenv v1.5.1 github.com/mitchellh/go-homedir v1.1.0 @@ -21,18 +21,18 @@ require ( github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.2 github.com/symfony-cli/console v1.0.3 - github.com/symfony-cli/phpstore v1.0.7 + github.com/symfony-cli/phpstore v1.0.8 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 - golang.org/x/sync v0.2.0 - golang.org/x/text v0.9.0 + golang.org/x/sync v0.3.0 + golang.org/x/text v0.11.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/distribution/distribution/v3 v3.0.0-20230511163743-f7717b7855ca // indirect + github.com/distribution/distribution/v3 v3.0.0-20230719040215-46b3d6201649 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -40,37 +40,39 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect - github.com/imdario/mergo v0.3.15 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.4 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc3 // indirect + github.com/opencontainers/image-spec v1.1.0-rc4 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.9.1 // indirect + golang.org/x/tools v0.11.0 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.0 // indirect - software.sslmate.com/src/go-pkcs12 v0.2.0 // indirect + software.sslmate.com/src/go-pkcs12 v0.2.1 // indirect ) go 1.20 diff --git a/go.sum b/go.sum index f66c1daf..25e76e81 100644 --- a/go.sum +++ b/go.sum @@ -3,19 +3,19 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/compose-spec/compose-go v1.13.5 h1:ogqJOGEbe3uRxMg0ZEufOoCQTpX61l8tUeyW4UQgEBk= -github.com/compose-spec/compose-go v1.13.5/go.mod h1:m0o4G6MQDHjjz9rY7No9FpnNi+9sKic262rzrwuCqic= +github.com/compose-spec/compose-go v1.17.0 h1:cvje90CU94dQyTnJoHJYjx9yE4Iggse1XmGcO3Qi5ts= +github.com/compose-spec/compose-go v1.17.0/go.mod h1:zR2tP1+kZHi5vJz7PjpW6oMoDji/Js3GHjP+hfjf70Q= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20230511163743-f7717b7855ca h1:yGaIDzPWkgU+yRvI2x/rGdOU1hl6bLZzm0mETEUSHwk= -github.com/distribution/distribution/v3 v3.0.0-20230511163743-f7717b7855ca/go.mod h1:t1IxPNGdTGez+YGKyJyQrtSSqisfMIm1hnFhvMPlxtE= +github.com/distribution/distribution/v3 v3.0.0-20230719040215-46b3d6201649 h1:JYTx15GvES2j5aMazxCO3znn7YsLDxDaBGsx7d/bSD8= +github.com/distribution/distribution/v3 v3.0.0-20230719040215-46b3d6201649/go.mod h1:+fqBJ4vPYo4Uu1ZE4d+bUtTLRXfdSL3NvCZIZ9GHv58= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.6+incompatible h1:aBD4np894vatVX99UTx/GyOUOK4uEcROwA3+bQhEcoU= -github.com/docker/docker v23.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.4+incompatible h1:s/LVDftw9hjblvqIeTiGYXBCD95nOEEl7qRsRrIOuQI= +github.com/docker/docker v24.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -40,12 +40,14 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= -github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/golang-lru/arc/v2 v2.0.4 h1:+tHnVSaabYlClRqUq4/+xzeyy9nAf8ju/JJsb4KTNBc= +github.com/hashicorp/golang-lru/arc/v2 v2.0.4/go.mod h1:rbQ1sKlUmbE1QbWxZbqtbpw8frA8ecNEhI0cQBxYtaU= +github.com/hashicorp/golang-lru/v2 v2.0.4 h1:7GHuZcgid37q8o5i3QI9KMT4nCWQQ3Kx3Ov6bb9MfK0= +github.com/hashicorp/golang-lru/v2 v2.0.4/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= -github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= @@ -63,8 +65,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -82,8 +84,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= -github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0= +github.com/opencontainers/image-spec v1.1.0-rc4/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -96,15 +98,15 @@ github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -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.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= @@ -114,13 +116,13 @@ github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081/go.mod h1:mXF6uSY github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/symfony-cli/cert v1.0.2 h1:rvveFVIoH6JwdfbsjDy5crsFFBiUwJsfEEZduuBtRNg= github.com/symfony-cli/cert v1.0.2/go.mod h1:m2aZC0qLifAgsa0uLshMlJRIkS6hx2bqvDLJgGEbY6Q= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= -github.com/symfony-cli/phpstore v1.0.7 h1:8f14UQ504V0XBTPU+4kEpBv54ztDCoCqcl3gx8+b4QE= -github.com/symfony-cli/phpstore v1.0.7/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= +github.com/symfony-cli/phpstore v1.0.8 h1:vwr3dIMV4et12K4oMEBiqm4FSyIItAFkYLvX8vALpK8= +github.com/symfony-cli/phpstore v1.0.8/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.4 h1:jam7aN7g7WQ9uOwV9UC+iVGBLTlzK8kAC5EKcxq21Z8= github.com/symfony-cli/terminal v1.0.4/go.mod h1:+OxxnU05wyRHKYyQkTzTaCSSxmmIBcvAHLcQ099odj4= github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 h1:F4snRP//nIuTTW9LYEzVH4HVwDG9T3M4t8y/2nqMbiY= @@ -137,57 +139,52 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec 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-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/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-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-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-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= 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.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= +golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= 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= @@ -208,5 +205,5 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= -software.sslmate.com/src/go-pkcs12 v0.2.0 h1:nlFkj7bTysH6VkC4fGphtjXRbezREPgrHuJG20hBGPE= -software.sslmate.com/src/go-pkcs12 v0.2.0/go.mod h1:23rNcYsMabIc1otwLpTkCCPwUq6kQsTyowttG/as0kQ= +software.sslmate.com/src/go-pkcs12 v0.2.1 h1:tbT1jjaeFOF230tzOIRJ6U5S1jNqpsSyNjzDd58H3J8= +software.sslmate.com/src/go-pkcs12 v0.2.1/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= diff --git a/local/proxy/cert_store.go b/local/proxy/cert_store.go index 365bcd7d..29002d95 100644 --- a/local/proxy/cert_store.go +++ b/local/proxy/cert_store.go @@ -23,7 +23,7 @@ import ( "crypto/tls" "sync" - lru "github.com/hashicorp/golang-lru/v2" + "github.com/hashicorp/golang-lru/arc/v2" "github.com/symfony-cli/cert" ) @@ -31,12 +31,12 @@ type certStore struct { proxyCfg *Config ca *cert.CA lock sync.Mutex - cache *lru.ARCCache[string, tls.Certificate] + cache *arc.ARCCache[string, tls.Certificate] } // newCertStore creates a store to keep SSL certificates in memory func (p *Proxy) newCertStore(ca *cert.CA) *certStore { - cache, _ := lru.NewARC[string, tls.Certificate](1024) + cache, _ := arc.NewARC[string, tls.Certificate](1024) return &certStore{ proxyCfg: p.Config, ca: ca, From aaaa1f174d8da6a498aa78663335a6cd1e1f7f49 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 21 Jul 2023 11:06:57 +0200 Subject: [PATCH 149/466] Update deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e638163a..faaea616 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.2 github.com/symfony-cli/console v1.0.3 - github.com/symfony-cli/phpstore v1.0.8 + github.com/symfony-cli/phpstore v1.0.9 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 golang.org/x/sync v0.3.0 diff --git a/go.sum b/go.sum index 25e76e81..eca16d37 100644 --- a/go.sum +++ b/go.sum @@ -121,8 +121,8 @@ github.com/symfony-cli/cert v1.0.2 h1:rvveFVIoH6JwdfbsjDy5crsFFBiUwJsfEEZduuBtRN github.com/symfony-cli/cert v1.0.2/go.mod h1:m2aZC0qLifAgsa0uLshMlJRIkS6hx2bqvDLJgGEbY6Q= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= -github.com/symfony-cli/phpstore v1.0.8 h1:vwr3dIMV4et12K4oMEBiqm4FSyIItAFkYLvX8vALpK8= -github.com/symfony-cli/phpstore v1.0.8/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= +github.com/symfony-cli/phpstore v1.0.9 h1:XBy2Qtk8YKhnzee+Wivb29B8kCoR7QSMAK4qDgnUC34= +github.com/symfony-cli/phpstore v1.0.9/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.4 h1:jam7aN7g7WQ9uOwV9UC+iVGBLTlzK8kAC5EKcxq21Z8= github.com/symfony-cli/terminal v1.0.4/go.mod h1:+OxxnU05wyRHKYyQkTzTaCSSxmmIBcvAHLcQ099odj4= github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 h1:F4snRP//nIuTTW9LYEzVH4HVwDG9T3M4t8y/2nqMbiY= From 6159a03b530f3b23170d3e8dcb4df5a5349f3726 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 21 Jul 2023 11:20:50 +0200 Subject: [PATCH 150/466] Fix Platform.sh command list --- local/platformsh/commands.go | 383 +++++++++++++++++++++++++ local/platformsh/generator/commands.go | 35 ++- 2 files changed, 413 insertions(+), 5 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 04b55470..16ef592d 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -27,9 +27,35 @@ import ( ) var Commands = []*console.Command{ + { + Category: "cloud", + Name: "_completion", + Usage: "BASH completion hook.", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "generate-hook", Aliases: []string{"g"},}, + &console.BoolFlag{Name: "multiple", Aliases: []string{"m"},}, + &console.StringFlag{Name: "program", Aliases: []string{"p"},}, + &console.StringFlag{Name: "shell-type",}, + }, + }, + { + Category: "cloud", + Name: "bot", + Usage: "The Platform.sh Bot", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "parrot",}, + &console.BoolFlag{Name: "party",}, + }, + }, { Category: "cloud", Name: "clear-cache", + Aliases: []*console.Alias{ + {Name: "cloud:clearcache"}, + {Name: "cloud:cc"}, + }, Usage: "Clear the CLI cache", }, { @@ -41,6 +67,15 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "pipe",}, }, }, + { + Category: "cloud", + Name: "legacy-migrate", + Usage: "Migrate from the legacy file structure", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "no-backup",}, + }, + }, { Category: "cloud", Name: "multi", @@ -63,6 +98,18 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, + { + Category: "cloud", + Name: "welcome", + Usage: "Welcome to Platform.sh", + Hidden: console.Hide, + }, + { + Category: "cloud", + Name: "winky", + Usage: "", + Hidden: console.Hide, + }, { Category: "cloud:activity", Name: "cancel", @@ -106,6 +153,10 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "activity:list", Hidden: true}, + {Name: "cloud:activities"}, + {Name: "activities", Hidden: true}, + {Name: "cloud:act"}, + {Name: "act", Hidden: true}, }, Usage: "Get a list of activities for an environment or project", Flags: []console.Flag{ @@ -146,6 +197,26 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "type",}, }, }, + { + Category: "cloud:api", + Name: "curl", + Aliases: []*console.Alias{ + {Name: "api:curl", Hidden: true}, + }, + Usage: "Run an authenticated cURL request on the Platform.sh API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"},}, + &console.BoolFlag{Name: "disable-compression",}, + &console.BoolFlag{Name: "enable-glob",}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, + &console.StringFlag{Name: "header", Aliases: []string{"H"},}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, + &console.StringFlag{Name: "json",}, + &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + }, + }, { Category: "cloud:app", Name: "config-get", @@ -167,6 +238,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "app:list", Hidden: true}, + {Name: "cloud:apps"}, + {Name: "apps", Hidden: true}, }, Usage: "List apps in the project", Flags: []console.Flag{ @@ -192,6 +265,8 @@ var Commands = []*console.Command{ Name: "browser-login", Aliases: []*console.Alias{ {Name: "auth:browser-login", Hidden: true}, + {Name: "cloud:login"}, + {Name: "login", Hidden: true}, }, Usage: "Log in to Platform.sh via a browser", Flags: []console.Flag{ @@ -221,6 +296,8 @@ var Commands = []*console.Command{ Name: "logout", Aliases: []*console.Alias{ {Name: "auth:logout", Hidden: true}, + {Name: "cloud:logout"}, + {Name: "logout", Hidden: true}, }, Usage: "Log out of Platform.sh", Flags: []console.Flag{ @@ -228,6 +305,19 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "other",}, }, }, + { + Category: "cloud:auth", + Name: "token", + Aliases: []*console.Alias{ + {Name: "auth:token", Hidden: true}, + }, + Usage: "Obtain an OAuth 2 access token for requests to Platform.sh APIs", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "header", Aliases: []string{"H"},}, + &console.BoolFlag{Name: "no-warn", Aliases: []string{"W"},}, + }, + }, { Category: "cloud:auth", Name: "verify-phone-number", @@ -241,6 +331,8 @@ var Commands = []*console.Command{ Name: "create", Aliases: []*console.Alias{ {Name: "backup:create", Hidden: true}, + {Name: "cloud:backup"}, + {Name: "backup", Hidden: true}, }, Usage: "Make a backup of an environment", Flags: []console.Flag{ @@ -284,6 +376,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "backup:list", Hidden: true}, + {Name: "cloud:backups"}, + {Name: "backups", Hidden: true}, }, Usage: "List available backups of an environment", Flags: []console.Flag{ @@ -311,6 +405,47 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "wait",}, }, }, + { + Category: "cloud:blue-green", + Name: "conclude", + Aliases: []*console.Alias{ + {Name: "blue-green:conclude", Hidden: true}, + }, + Usage: " ALPHA Conclude a blue/green deployment", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + }, + }, + { + Category: "cloud:blue-green", + Name: "deploy", + Aliases: []*console.Alias{ + {Name: "blue-green:deploy", Hidden: true}, + }, + Usage: " ALPHA Perform a blue/green deployment", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "routing-percentage",}, + }, + }, + { + Category: "cloud:blue-green", + Name: "enable", + Aliases: []*console.Alias{ + {Name: "blue-green:enable", Hidden: true}, + }, + Usage: " ALPHA Enable blue/green deployments", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "routing-percentage", Aliases: []string{"%"},}, + }, + }, { Category: "cloud:certificate", Name: "add", @@ -358,6 +493,10 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "certificate:list", Hidden: true}, + {Name: "cloud:certificates"}, + {Name: "certificates", Hidden: true}, + {Name: "cloud:certs"}, + {Name: "certs", Hidden: true}, }, Usage: "List project certificates", Flags: []console.Flag{ @@ -396,6 +535,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "commit:list", Hidden: true}, + {Name: "cloud:commits"}, + {Name: "commits", Hidden: true}, }, Usage: "List commits", Flags: []console.Flag{ @@ -458,6 +599,8 @@ var Commands = []*console.Command{ Name: "sql", Aliases: []*console.Alias{ {Name: "db:sql", Hidden: true}, + {Name: "cloud:sql"}, + {Name: "sql", Hidden: true}, }, Usage: "Run SQL on the remote database", Flags: []console.Flag{ @@ -524,6 +667,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "domain:list", Hidden: true}, + {Name: "cloud:domains"}, + {Name: "domains", Hidden: true}, }, Usage: "Get a list of all domains", Flags: []console.Flag{ @@ -571,6 +716,8 @@ var Commands = []*console.Command{ Name: "branch", Aliases: []*console.Alias{ {Name: "environment:branch", Hidden: true}, + {Name: "cloud:branch"}, + {Name: "branch", Hidden: true}, }, Usage: "Branch an environment", Flags: []console.Flag{ @@ -590,12 +737,36 @@ var Commands = []*console.Command{ Name: "checkout", Aliases: []*console.Alias{ {Name: "environment:checkout", Hidden: true}, + {Name: "cloud:checkout"}, + {Name: "checkout", Hidden: true}, }, Usage: "Check out an environment", Flags: []console.Flag{ &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, }, }, + { + Category: "cloud:environment", + Name: "curl", + Aliases: []*console.Alias{ + {Name: "environment:curl", Hidden: true}, + }, + Usage: "Run an authenticated cURL request on an environment's API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"},}, + &console.BoolFlag{Name: "disable-compression",}, + &console.BoolFlag{Name: "enable-glob",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, + &console.StringFlag{Name: "header", Aliases: []string{"H"},}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, + &console.StringFlag{Name: "json",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + }, + }, { Category: "cloud:environment", Name: "delete", @@ -624,6 +795,8 @@ var Commands = []*console.Command{ Name: "http-access", Aliases: []*console.Alias{ {Name: "environment:http-access", Hidden: true}, + {Name: "cloud:httpaccess"}, + {Name: "httpaccess", Hidden: true}, }, Usage: "Update HTTP access settings for an environment", Flags: []console.Flag{ @@ -675,6 +848,10 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "environment:list", Hidden: true}, + {Name: "cloud:environments"}, + {Name: "environments", Hidden: true}, + {Name: "cloud:env"}, + {Name: "env", Hidden: true}, }, Usage: "Get a list of environments", Flags: []console.Flag{ @@ -695,6 +872,8 @@ var Commands = []*console.Command{ Name: "logs", Aliases: []*console.Alias{ {Name: "environment:logs", Hidden: true}, + {Name: "cloud:log"}, + {Name: "log", Hidden: true}, }, Usage: "Read an environment's logs", Flags: []console.Flag{ @@ -712,6 +891,8 @@ var Commands = []*console.Command{ Name: "merge", Aliases: []*console.Alias{ {Name: "environment:merge", Hidden: true}, + {Name: "cloud:merge"}, + {Name: "merge", Hidden: true}, }, Usage: "Merge an environment", Flags: []console.Flag{ @@ -740,6 +921,8 @@ var Commands = []*console.Command{ Name: "push", Aliases: []*console.Alias{ {Name: "environment:push", Hidden: true}, + {Name: "cloud:push"}, + {Name: "push", Hidden: true}, {Name: "deploy"}, {Name: "cloud:deploy"}, }, @@ -765,6 +948,8 @@ var Commands = []*console.Command{ Name: "redeploy", Aliases: []*console.Alias{ {Name: "environment:redeploy", Hidden: true}, + {Name: "cloud:redeploy"}, + {Name: "redeploy", Hidden: true}, }, Usage: "Redeploy an environment", Flags: []console.Flag{ @@ -779,6 +964,8 @@ var Commands = []*console.Command{ Name: "relationships", Aliases: []*console.Alias{ {Name: "environment:relationships", Hidden: true}, + {Name: "cloud:relationships"}, + {Name: "relationships", Hidden: true}, }, Usage: "Show an environment's relationships", Flags: []console.Flag{ @@ -809,6 +996,8 @@ var Commands = []*console.Command{ Name: "scp", Aliases: []*console.Alias{ {Name: "environment:scp", Hidden: true}, + {Name: "cloud:scp"}, + {Name: "scp", Hidden: true}, }, Usage: "Copy files to and from an environment using scp", Flags: []console.Flag{ @@ -821,11 +1010,22 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "worker",}, }, }, + { + Category: "cloud:environment", + Name: "set-remote", + Aliases: []*console.Alias{ + {Name: "environment:set-remote", Hidden: true}, + }, + Usage: "Set the remote environment to map to a branch", + Hidden: console.Hide, + }, { Category: "cloud:environment", Name: "ssh", Aliases: []*console.Alias{ {Name: "environment:ssh", Hidden: true}, + {Name: "cloud:ssh"}, + {Name: "ssh", Hidden: true}, }, Usage: "SSH to the current environment", Flags: []console.Flag{ @@ -844,6 +1044,8 @@ var Commands = []*console.Command{ Name: "synchronize", Aliases: []*console.Alias{ {Name: "environment:synchronize", Hidden: true}, + {Name: "cloud:sync"}, + {Name: "sync", Hidden: true}, }, Usage: "Synchronize an environment's code and/or data from its parent", Flags: []console.Flag{ @@ -859,6 +1061,8 @@ var Commands = []*console.Command{ Name: "url", Aliases: []*console.Alias{ {Name: "environment:url", Hidden: true}, + {Name: "cloud:url"}, + {Name: "url", Hidden: true}, }, Usage: "Get the public URLs of an environment", Flags: []console.Flag{ @@ -874,6 +1078,8 @@ var Commands = []*console.Command{ Name: "xdebug", Aliases: []*console.Alias{ {Name: "environment:xdebug", Hidden: true}, + {Name: "cloud:xdebug"}, + {Name: "xdebug", Hidden: true}, }, Usage: "Open a tunnel to Xdebug on the environment", Flags: []console.Flag{ @@ -908,6 +1114,8 @@ var Commands = []*console.Command{ Name: "activity:list", Aliases: []*console.Alias{ {Name: "integration:activity:list", Hidden: true}, + {Name: "cloud:i:act"}, + {Name: "i:act", Hidden: true}, }, Usage: "Get a list of activities for an integration", Flags: []console.Flag{ @@ -1029,6 +1237,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "integration:list", Hidden: true}, + {Name: "cloud:integrations"}, + {Name: "integrations", Hidden: true}, }, Usage: "View a list of project integration(s)", Flags: []console.Flag{ @@ -1110,6 +1320,10 @@ var Commands = []*console.Command{ Name: "all", Aliases: []*console.Alias{ {Name: "metrics:all", Hidden: true}, + {Name: "cloud:met"}, + {Name: "met", Hidden: true}, + {Name: "cloud:metrics"}, + {Name: "metrics", Hidden: true}, }, Usage: " BETA Show CPU, disk and memory metrics for an environment", Flags: []console.Flag{ @@ -1132,6 +1346,8 @@ var Commands = []*console.Command{ Name: "cpu", Aliases: []*console.Alias{ {Name: "metrics:cpu", Hidden: true}, + {Name: "cloud:cpu"}, + {Name: "cpu", Hidden: true}, }, Usage: " BETA Show CPU usage of an environment", Flags: []console.Flag{ @@ -1149,11 +1365,35 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "type",}, }, }, + { + Category: "cloud:metrics", + Name: "curl", + Aliases: []*console.Alias{ + {Name: "metrics:curl", Hidden: true}, + }, + Usage: "Run an authenticated cURL request on an environment's metrics API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"},}, + &console.BoolFlag{Name: "disable-compression",}, + &console.BoolFlag{Name: "enable-glob",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, + &console.StringFlag{Name: "header", Aliases: []string{"H"},}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, + &console.StringFlag{Name: "json",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + }, + }, { Category: "cloud:metrics", Name: "disk-usage", Aliases: []*console.Alias{ {Name: "metrics:disk-usage", Hidden: true}, + {Name: "cloud:disk"}, + {Name: "disk", Hidden: true}, }, Usage: "Show disk usage of an environment", Flags: []console.Flag{ @@ -1178,6 +1418,10 @@ var Commands = []*console.Command{ Name: "memory", Aliases: []*console.Alias{ {Name: "metrics:memory", Hidden: true}, + {Name: "cloud:mem"}, + {Name: "mem", Hidden: true}, + {Name: "cloud:memory"}, + {Name: "memory", Hidden: true}, }, Usage: " BETA Show memory usage of an environment", Flags: []console.Flag{ @@ -1225,6 +1469,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "mount:list", Hidden: true}, + {Name: "cloud:mounts"}, + {Name: "mounts", Hidden: true}, }, Usage: "Get a list of mounts", Flags: []console.Flag{ @@ -1328,6 +1574,28 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "name",}, }, }, + { + Category: "cloud:organization", + Name: "curl", + Aliases: []*console.Alias{ + {Name: "organization:curl", Hidden: true}, + }, + Usage: "Run an authenticated cURL request on an organization's API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"},}, + &console.BoolFlag{Name: "disable-compression",}, + &console.BoolFlag{Name: "enable-glob",}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, + &console.StringFlag{Name: "header", Aliases: []string{"H"},}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, + &console.StringFlag{Name: "json",}, + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + }, + }, { Category: "cloud:organization", Name: "delete", @@ -1361,6 +1629,10 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "organization:list", Hidden: true}, + {Name: "cloud:orgs"}, + {Name: "orgs", Hidden: true}, + {Name: "cloud:organizations"}, + {Name: "organizations", Hidden: true}, }, Usage: "List organizations", Flags: []console.Flag{ @@ -1377,6 +1649,8 @@ var Commands = []*console.Command{ Name: "subscription:list", Aliases: []*console.Alias{ {Name: "organization:subscription:list", Hidden: true}, + {Name: "cloud:organization:subscriptions"}, + {Name: "organization:subscriptions", Hidden: true}, }, Usage: "List subscriptions within an organization", Flags: []console.Flag{ @@ -1436,6 +1710,8 @@ var Commands = []*console.Command{ Name: "user:list", Aliases: []*console.Alias{ {Name: "organization:user:list", Hidden: true}, + {Name: "cloud:organization:users"}, + {Name: "organization:users", Hidden: true}, }, Usage: "List organization users", Flags: []console.Flag{ @@ -1452,6 +1728,8 @@ var Commands = []*console.Command{ Name: "user:projects", Aliases: []*console.Alias{ {Name: "organization:user:projects", Hidden: true}, + {Name: "cloud:oups"}, + {Name: "oups", Hidden: true}, }, Usage: "List the projects a user can access", Flags: []console.Flag{ @@ -1495,6 +1773,8 @@ var Commands = []*console.Command{ Name: "create", Aliases: []*console.Alias{ {Name: "project:create", Hidden: true}, + {Name: "cloud:create"}, + {Name: "create", Hidden: true}, }, Usage: "Create a new project", Flags: []console.Flag{ @@ -1512,6 +1792,27 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "title", DefaultValue: "Untitled Project",}, }, }, + { + Category: "cloud:project", + Name: "curl", + Aliases: []*console.Alias{ + {Name: "project:curl", Hidden: true}, + }, + Usage: "Run an authenticated cURL request on a project's API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"},}, + &console.BoolFlag{Name: "disable-compression",}, + &console.BoolFlag{Name: "enable-glob",}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, + &console.StringFlag{Name: "header", Aliases: []string{"H"},}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, + &console.StringFlag{Name: "json",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + }, + }, { Category: "cloud:project", Name: "delete", @@ -1528,6 +1829,8 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "project:get", Hidden: true}, + {Name: "cloud:get"}, + {Name: "get", Hidden: true}, }, Usage: "Clone a project locally", Flags: []console.Flag{ @@ -1561,6 +1864,10 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "project:list", Hidden: true}, + {Name: "cloud:projects"}, + {Name: "projects", Hidden: true}, + {Name: "cloud:pro"}, + {Name: "pro", Hidden: true}, }, Usage: "Get a list of all active projects", Flags: []console.Flag{ @@ -1622,6 +1929,8 @@ var Commands = []*console.Command{ Name: "read", Aliases: []*console.Alias{ {Name: "repo:read", Hidden: true}, + {Name: "cloud:read"}, + {Name: "read", Hidden: true}, }, Usage: "Read a directory or file in the project repository", Flags: []console.Flag{ @@ -1654,6 +1963,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "route:list", Hidden: true}, + {Name: "cloud:routes"}, + {Name: "routes", Hidden: true}, }, Usage: "List all routes for an environment", Flags: []console.Flag{ @@ -1677,6 +1988,9 @@ var Commands = []*console.Command{ { Category: "cloud:self", Name: "update", + Aliases: []*console.Alias{ + {Name: "cloud:self-update"}, + }, Usage: "Update the CLI to the latest version", Hidden: console.Hide, Flags: []console.Flag{ @@ -1692,6 +2006,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "service:list", Hidden: true}, + {Name: "cloud:services"}, + {Name: "services", Hidden: true}, }, Usage: "List services in the project", Flags: []console.Flag{ @@ -1709,6 +2025,8 @@ var Commands = []*console.Command{ Name: "mongo:dump", Aliases: []*console.Alias{ {Name: "service:mongo:dump", Hidden: true}, + {Name: "cloud:mongodump"}, + {Name: "mongodump", Hidden: true}, }, Usage: "Create a binary archive dump of data from MongoDB", Flags: []console.Flag{ @@ -1727,6 +2045,8 @@ var Commands = []*console.Command{ Name: "mongo:export", Aliases: []*console.Alias{ {Name: "service:mongo:export", Hidden: true}, + {Name: "cloud:mongoexport"}, + {Name: "mongoexport", Hidden: true}, }, Usage: "Export data from MongoDB", Flags: []console.Flag{ @@ -1746,6 +2066,8 @@ var Commands = []*console.Command{ Name: "mongo:restore", Aliases: []*console.Alias{ {Name: "service:mongo:restore", Hidden: true}, + {Name: "cloud:mongorestore"}, + {Name: "mongorestore", Hidden: true}, }, Usage: "Restore a binary archive dump of data into MongoDB", Flags: []console.Flag{ @@ -1762,6 +2084,8 @@ var Commands = []*console.Command{ Name: "mongo:shell", Aliases: []*console.Alias{ {Name: "service:mongo:shell", Hidden: true}, + {Name: "cloud:mongo"}, + {Name: "mongo", Hidden: true}, }, Usage: "Use the MongoDB shell", Flags: []console.Flag{ @@ -1778,6 +2102,8 @@ var Commands = []*console.Command{ Name: "redis-cli", Aliases: []*console.Alias{ {Name: "service:redis-cli", Hidden: true}, + {Name: "cloud:redis"}, + {Name: "redis", Hidden: true}, }, Usage: "Access the Redis CLI", Flags: []console.Flag{ @@ -1788,11 +2114,22 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, }, + { + Category: "cloud:session", + Name: "switch", + Aliases: []*console.Alias{ + {Name: "session:switch", Hidden: true}, + }, + Usage: " BETA Switch between sessions", + Hidden: console.Hide, + }, { Category: "cloud:source-operation", Name: "list", Aliases: []*console.Alias{ {Name: "source-operation:list", Hidden: true}, + {Name: "cloud:source-ops"}, + {Name: "source-ops", Hidden: true}, }, Usage: "List source operations on an environment", Flags: []console.Flag{ @@ -1819,6 +2156,20 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "wait",}, }, }, + { + Category: "cloud:ssh-cert", + Name: "info", + Aliases: []*console.Alias{ + {Name: "ssh-cert:info", Hidden: true}, + }, + Usage: "Display information about the current SSH certificate", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.BoolFlag{Name: "no-refresh",}, + &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + }, + }, { Category: "cloud:ssh-cert", Name: "load", @@ -1856,6 +2207,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "ssh-key:list", Hidden: true}, + {Name: "cloud:ssh-keys"}, + {Name: "ssh-keys", Hidden: true}, }, Usage: "Get a list of SSH keys in your account", Flags: []console.Flag{ @@ -1917,6 +2270,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "tunnel:list", Hidden: true}, + {Name: "cloud:tunnels"}, + {Name: "tunnels", Hidden: true}, }, Usage: "List SSH tunnels", Flags: []console.Flag{ @@ -2011,6 +2366,8 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "user:list", Hidden: true}, + {Name: "cloud:users"}, + {Name: "users", Hidden: true}, }, Usage: "List project users", Flags: []console.Flag{ @@ -2079,6 +2436,8 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "variable:get", Hidden: true}, + {Name: "cloud:vget"}, + {Name: "vget", Hidden: true}, }, Usage: "View a variable", Flags: []console.Flag{ @@ -2097,6 +2456,10 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "variable:list", Hidden: true}, + {Name: "cloud:variables"}, + {Name: "variables", Hidden: true}, + {Name: "cloud:var"}, + {Name: "var", Hidden: true}, }, Usage: "List variables", Flags: []console.Flag{ @@ -2131,11 +2494,31 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "wait",}, }, }, + { + Category: "cloud:version", + Name: "list", + Aliases: []*console.Alias{ + {Name: "version:list", Hidden: true}, + {Name: "cloud:versions"}, + {Name: "versions", Hidden: true}, + }, + Usage: " ALPHA List environment versions", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + }, + }, { Category: "cloud:worker", Name: "list", Aliases: []*console.Alias{ {Name: "worker:list", Hidden: true}, + {Name: "cloud:workers"}, + {Name: "workers", Hidden: true}, }, Usage: "Get a list of all deployed workers", Flags: []console.Flag{ diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index 4c5e6602..f98560db 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -35,6 +35,7 @@ type command struct { Help string Definition definition Hidden bool + Aliases []string } type definition struct { @@ -121,7 +122,7 @@ func parseCommands(home string) (string, error) { var buf bytes.Buffer e := &php.Executor{ BinName: "php", - Args: []string{"php", filepath.Join(dir, "platform"), "list", "--format=json"}, + Args: []string{"php", filepath.Join(dir, "platform"), "list", "--format=json", "--all"}, } e.Paths = append([]string{dir}, e.Paths...) e.Dir = dir @@ -193,11 +194,16 @@ func parseCommands(home string) (string, error) { if namespace != "cloud" && !strings.HasPrefix(command.Name, "self:") { aliases = append(aliases, fmt.Sprintf("{Name: \"%s\", Hidden: true}", command.Name)) } - for _, usage := range command.Usage { - if allCommandNames[usage] { - aliases = append(aliases, fmt.Sprintf("{Name: \"cloud:%s\"}", usage)) + + cmdAliases, err := getCommandAliases(command.Name, dir) + if err != nil { + return "", err + } + for _, alias := range cmdAliases { + if allCommandNames[alias] { + aliases = append(aliases, fmt.Sprintf("{Name: \"cloud:%s\"}", alias)) if namespace != "cloud" && !strings.HasPrefix(command.Name, "self:") { - aliases = append(aliases, fmt.Sprintf("{Name: \"%s\", Hidden: true}", usage)) + aliases = append(aliases, fmt.Sprintf("{Name: \"%s\", Hidden: true}", alias)) } } } @@ -278,3 +284,22 @@ func parseCommands(home string) (string, error) { return definitionAsString, nil } + +func getCommandAliases(name, dir string) ([]string, error) { + var buf bytes.Buffer + e := &php.Executor{ + BinName: "php", + Args: []string{"php", filepath.Join(dir, "platform"), name, "--help", "--format=json"}, + } + e.Paths = append([]string{dir}, e.Paths...) + e.Dir = dir + e.Stdout = &buf + if ret := e.Execute(false); ret != 0 { + return nil, errors.Errorf("unable to get definition for command %s: %s", name, buf.String()) + } + var cmd command + if err := json.Unmarshal(buf.Bytes(), &cmd); err != nil { + return nil, err + } + return cmd.Aliases, nil +} From 8ac055a06a1c00dabc526a86f0c1be9c1c5dd622 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:09:43 +0000 Subject: [PATCH 151/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index e640a781..b71e4469 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -225,7 +225,7 @@ var availableServices = []*service{ Type: "rabbitmq", Versions: serviceVersions{ Deprecated: []string{"3.5", "3.6", "3.7", "3.8"}, - Supported: []string{"3.9", "3.10", "3.11"}, + Supported: []string{"3.9", "3.10", "3.11", "3.12"}, }, }, { From b1a3e72a246bda948cb3c17f152054f9231e8feb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 08:10:38 +0000 Subject: [PATCH 152/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index b71e4469..8d082851 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -162,7 +162,7 @@ var availableServices = []*service{ Type: "mariadb", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11", "11"}, }, }, { @@ -239,7 +239,7 @@ var availableServices = []*service{ Type: "solr", Versions: serviceVersions{ Deprecated: []string{"3.6", "4.10", "6.3", "6.6", "7.6", "7.7", "8.0", "8.4", "8.6"}, - Supported: []string{"8.11", "9.1"}, + Supported: []string{"8.11", "9.1", "9.2"}, }, }, { From e55645aff3d8755f9425636af0ee12cf7647934e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 16:09:33 +0000 Subject: [PATCH 153/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 8d082851..d92f9946 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -141,7 +141,7 @@ var availableServices = []*service{ Type: "elasticsearch", Versions: serviceVersions{ Deprecated: []string{"1.4", "1.7", "2.4", "5.2", "5.4", "6.5", "6.8", "7.2", "7.5", "7.7", "7.9", "7.10"}, - Supported: []string{}, + Supported: []string{"7.17", "8.5"}, }, }, { From 564a526909a25ba32ed866d9347ea251de5a3ddd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 08:11:41 +0000 Subject: [PATCH 154/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index d92f9946..d1d8e344 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -100,7 +100,7 @@ var availablePHPExts = map[string][]string{ "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sourceguardian": {"7.0", "7.1"}, + "sourceguardian": {"7.0", "7.1", "8.2"}, "spplus": {"5.4", "5.5"}, "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, From ad5d2d352e8a1eb117e1fc315a4b0f272341076c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 12:16:03 +0000 Subject: [PATCH 155/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index d1d8e344..14cb223f 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -71,7 +71,7 @@ var availablePHPExts = map[string][]string{ "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "newrelic": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "oauth": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "oauth": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, From 2c24d41ed3a0d2c762b25ec477b84eb76145222c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 16:10:37 +0000 Subject: [PATCH 156/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 14cb223f..0f597426 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -148,7 +148,7 @@ var availableServices = []*service{ Type: "influxdb", Versions: serviceVersions{ Deprecated: []string{"1.2", "1.3", "1.7", "1.8", "2.2"}, - Supported: []string{"2.3"}, + Supported: []string{"2.3", "2.7"}, }, }, { From 78f58438f99e006b22889f685f420f5294eefdcd Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 3 Aug 2023 13:35:26 +0200 Subject: [PATCH 157/466] Bump deps --- go.mod | 18 +++++++++--------- go.sum | 37 ++++++++++++++++++------------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index faaea616..22a05671 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 github.com/compose-spec/compose-go v1.17.0 - github.com/docker/docker v24.0.4+incompatible - github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 + github.com/docker/docker v24.0.5+incompatible + github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 @@ -15,13 +15,13 @@ require ( github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 github.com/rs/xid v1.5.0 - github.com/rs/zerolog v1.29.1 + github.com/rs/zerolog v1.30.0 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.2 github.com/symfony-cli/console v1.0.3 - github.com/symfony-cli/phpstore v1.0.9 + github.com/symfony-cli/phpstore v1.0.10 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 golang.org/x/sync v0.3.0 @@ -32,7 +32,7 @@ require ( require ( github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/distribution/distribution/v3 v3.0.0-20230719040215-46b3d6201649 // indirect + github.com/distribution/distribution/v3 v3.0.0-20230802173126-807a836852c0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -46,7 +46,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/term v0.5.0 // indirect @@ -61,13 +61,13 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect golang.org/x/crypto v0.11.0 // indirect - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect + golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.13.0 // indirect golang.org/x/sys v0.10.0 // indirect golang.org/x/term v0.10.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.11.0 // indirect + golang.org/x/tools v0.11.1 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index eca16d37..34a6fb32 100644 --- a/go.sum +++ b/go.sum @@ -10,18 +10,18 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20230719040215-46b3d6201649 h1:JYTx15GvES2j5aMazxCO3znn7YsLDxDaBGsx7d/bSD8= -github.com/distribution/distribution/v3 v3.0.0-20230719040215-46b3d6201649/go.mod h1:+fqBJ4vPYo4Uu1ZE4d+bUtTLRXfdSL3NvCZIZ9GHv58= +github.com/distribution/distribution/v3 v3.0.0-20230802173126-807a836852c0 h1:quhsUbJzbkyyVVcLam9TMZ0zlE5cBhWJEdaAZcLgEHc= +github.com/distribution/distribution/v3 v3.0.0-20230802173126-807a836852c0/go.mod h1:+fqBJ4vPYo4Uu1ZE4d+bUtTLRXfdSL3NvCZIZ9GHv58= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.4+incompatible h1:s/LVDftw9hjblvqIeTiGYXBCD95nOEEl7qRsRrIOuQI= -github.com/docker/docker v24.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY= +github.com/docker/docker v24.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0= -github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027 h1:1L0aalTpPz7YlMxETKpmQoWMBkeiuorElZIXoNmgiPE= +github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/fabpot/local-php-security-checker/v2 v2.0.6 h1:m1znXkwzIPFkJWOnH8Fgt1mHY9hq8u+GY4AC6CPnDME= @@ -68,8 +68,8 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +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-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -100,11 +100,10 @@ github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYe github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -121,8 +120,8 @@ github.com/symfony-cli/cert v1.0.2 h1:rvveFVIoH6JwdfbsjDy5crsFFBiUwJsfEEZduuBtRN github.com/symfony-cli/cert v1.0.2/go.mod h1:m2aZC0qLifAgsa0uLshMlJRIkS6hx2bqvDLJgGEbY6Q= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= -github.com/symfony-cli/phpstore v1.0.9 h1:XBy2Qtk8YKhnzee+Wivb29B8kCoR7QSMAK4qDgnUC34= -github.com/symfony-cli/phpstore v1.0.9/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= +github.com/symfony-cli/phpstore v1.0.10 h1:KEgMYIhxHMex1zxt9Tzxpfy5zWXZ3207DWhJrIU6VGE= +github.com/symfony-cli/phpstore v1.0.10/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.4 h1:jam7aN7g7WQ9uOwV9UC+iVGBLTlzK8kAC5EKcxq21Z8= github.com/symfony-cli/terminal v1.0.4/go.mod h1:+OxxnU05wyRHKYyQkTzTaCSSxmmIBcvAHLcQ099odj4= github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 h1:F4snRP//nIuTTW9LYEzVH4HVwDG9T3M4t8y/2nqMbiY= @@ -141,8 +140,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI= +golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= @@ -152,8 +151,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -183,8 +182,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= -golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.11.1 h1:ojD5zOW8+7dOGzdnNgersm8aPfcDjhMp12UfG93NIMc= +golang.org/x/tools v0.11.1/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= 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= From c310322b1ded07ee156db372c1d09a124ae793e0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:14:29 +0000 Subject: [PATCH 158/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 58 +++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 16ef592d..30e05d1e 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -120,9 +120,9 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude-type",}, + &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "type",}, + &console.StringFlag{Name: "type", Aliases: []string{"t"},}, }, }, { @@ -137,7 +137,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude-type",}, + &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, &console.BoolFlag{Name: "no-header",}, @@ -145,7 +145,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "property", Aliases: []string{"P"},}, &console.StringFlag{Name: "result",}, &console.StringFlag{Name: "state",}, - &console.StringFlag{Name: "type",}, + &console.StringFlag{Name: "type", Aliases: []string{"t"},}, }, }, { @@ -187,7 +187,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude-type",}, + &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "refresh",}, @@ -621,13 +621,13 @@ var Commands = []*console.Command{ }, Usage: "Add a new domain to the project", Flags: []console.Flag{ + &console.StringFlag{Name: "attach",}, &console.StringFlag{Name: "cert",}, &console.StringFlag{Name: "chain",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "key",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "replace", Aliases: []string{"r"},}, &console.BoolFlag{Name: "wait",}, }, }, @@ -722,8 +722,6 @@ var Commands = []*console.Command{ Usage: "Branch an environment", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "force",}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.BoolFlag{Name: "no-clone-parent",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -1529,6 +1527,42 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "worker",}, }, }, + { + Category: "cloud:operation", + Name: "list", + Aliases: []*console.Alias{ + {Name: "operation:list", Hidden: true}, + {Name: "cloud:ops"}, + {Name: "ops", Hidden: true}, + }, + Usage: " BETA List runtime operations on an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"},}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "full",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "worker",}, + }, + }, + { + Category: "cloud:operation", + Name: "run", + Aliases: []*console.Alias{ + {Name: "operation:run", Hidden: true}, + }, + Usage: " BETA Run an operation on the environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"},}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.BoolFlag{Name: "wait",}, + &console.StringFlag{Name: "worker",}, + }, + }, { Category: "cloud:organization", Name: "billing:address", @@ -1892,6 +1926,8 @@ var Commands = []*console.Command{ Name: "set-remote", Aliases: []*console.Alias{ {Name: "project:set-remote", Hidden: true}, + {Name: "cloud:set-remote"}, + {Name: "set-remote", Hidden: true}, }, Usage: "Set the remote project for the current Git repository", }, @@ -1976,6 +2012,12 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "refresh",}, }, }, + { + Category: "cloud:self", + Name: "config", + Usage: "Read CLI config", + Hidden: console.Hide, + }, { Category: "cloud:self", Name: "install", From fd74a24456ae9ee62c8c11360dba1a41ffb86b7c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 16:10:08 +0000 Subject: [PATCH 159/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 0f597426..6ce0883e 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -162,7 +162,7 @@ var availableServices = []*service{ Type: "mariadb", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11", "11"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11", "11.0"}, }, }, { @@ -190,7 +190,7 @@ var availableServices = []*service{ Type: "mysql", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11"}, + Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11", "11.0"}, }, }, { From 4b48c9d52cfb7013b7dc98fff3c6fda58818d158 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 11 Aug 2023 08:55:28 -0400 Subject: [PATCH 160/466] Prevent potential panic when proxy fails connecting to local server --- local/proxy/proxy.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/local/proxy/proxy.go b/local/proxy/proxy.go index 041b4886..ad10c381 100644 --- a/local/proxy/proxy.go +++ b/local/proxy/proxy.go @@ -93,8 +93,10 @@ func tlsToLocalWebServer(proxy *goproxy.ProxyHttpServer, tlsConfig *tls.Config, ctx.Logf("Assuming CONNECT is TLS, TLS proxying it") targetSiteCon, err := connectDial(proxy, "tcp", fmt.Sprintf("127.0.0.1:%d", localPort)) if err != nil { - targetSiteCon.Close() httpError(proxyClientTls, ctx, err) + if targetSiteCon != nil { + targetSiteCon.Close() + } return } From a19c5f684ff30203bf2af275195be2aec7ee9f90 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 5 Sep 2023 19:58:23 +0200 Subject: [PATCH 161/466] Fix supported Platform.sh services generation --- local/platformsh/config.go | 4 ++-- local/platformsh/generator/config.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 6ce0883e..23ae0e0a 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -203,8 +203,8 @@ var availableServices = []*service{ { Type: "opensearch", Versions: serviceVersions{ - Deprecated: []string{}, - Supported: []string{"1.1", "1.2", "2"}, + Deprecated: []string{"1.1", "1.2"}, + Supported: []string{"1", "2"}, }, }, { diff --git a/local/platformsh/generator/config.go b/local/platformsh/generator/config.go index a868cd50..c6e6a5d5 100644 --- a/local/platformsh/generator/config.go +++ b/local/platformsh/generator/config.go @@ -86,7 +86,7 @@ func generateConfig() { } func parseServices() (string, error) { - resp, err := http.Get("https://raw.githubusercontent.com/platformsh/platformsh-docs/master/docs/data/registry.json") + resp, err := http.Get("https://raw.githubusercontent.com/platformsh/platformsh-docs/master/shared/data/registry.json") if err != nil { return "", err } @@ -138,7 +138,7 @@ func parseServices() (string, error) { } func parsePHPExtensions() (string, error) { - resp, err := http.Get("https://raw.githubusercontent.com/platformsh/platformsh-docs/master/docs/data/php_extensions.yaml") + resp, err := http.Get("https://raw.githubusercontent.com/platformsh/platformsh-docs/master/shared/data/php_extensions.yaml") if err != nil { return "", err } From 805d1133cc51a9fd0b6aa4f199a0f4057eaac452 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 7 Sep 2023 08:19:05 +0200 Subject: [PATCH 162/466] Update Go to 1.21 --- .github/workflows/go_generate_update.yml | 2 +- .github/workflows/releaser.yml | 2 +- go.mod | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go_generate_update.yml b/.github/workflows/go_generate_update.yml index ad7ee449..ca56f44d 100644 --- a/.github/workflows/go_generate_update.yml +++ b/.github/workflows/go_generate_update.yml @@ -17,7 +17,7 @@ jobs: name: Set up Go uses: actions/setup-go@v3 with: - go-version: '^1.20.1' + go-version: '^1.21.1' - uses: actions/cache@v3 with: path: | diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index c872b127..95071cad 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -35,7 +35,7 @@ jobs: name: Set up Go uses: actions/setup-go@v3 with: - go-version: '^1.20.1' + go-version: '^1.21.1' - uses: actions/cache@v3 with: path: | diff --git a/go.mod b/go.mod index 22a05671..7b1d4c21 100644 --- a/go.mod +++ b/go.mod @@ -75,4 +75,4 @@ require ( software.sslmate.com/src/go-pkcs12 v0.2.1 // indirect ) -go 1.20 +go 1.21 From 796adc557b17f99d2e9c5d51dd8afc9aba124f42 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 12:14:47 +0000 Subject: [PATCH 163/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 30e05d1e..2f9df408 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -90,7 +90,7 @@ var Commands = []*console.Command{ { Category: "cloud", Name: "web", - Usage: "Open the Web UI", + Usage: "Open the project in the Web Console", Flags: []console.Flag{ &console.StringFlag{Name: "browser",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1325,6 +1325,7 @@ var Commands = []*console.Command{ }, Usage: " BETA Show CPU, disk and memory metrics for an environment", Flags: []console.Flag{ + &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -2298,11 +2299,8 @@ var Commands = []*console.Command{ Usage: "View relationship info for SSH tunnels", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "columns",}, &console.BoolFlag{Name: "encode", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, From d7d944a910218b4f4c2b36ad4d13e1322a4ce0b3 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 7 Sep 2023 08:20:41 +0200 Subject: [PATCH 164/466] Bump deps --- go.mod | 26 +++++++++++++------------- go.sum | 56 ++++++++++++++++++++++++++++++-------------------------- 2 files changed, 43 insertions(+), 39 deletions(-) diff --git a/go.mod b/go.mod index 7b1d4c21..7cd0a741 100644 --- a/go.mod +++ b/go.mod @@ -2,13 +2,13 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 - github.com/compose-spec/compose-go v1.17.0 - github.com/docker/docker v24.0.5+incompatible - github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027 + github.com/compose-spec/compose-go v1.18.4 + github.com/docker/docker v24.0.6+incompatible + github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 - github.com/hashicorp/golang-lru/arc/v2 v2.0.4 + github.com/hashicorp/golang-lru/arc/v2 v2.0.6 github.com/hpcloud/tail v1.0.0 github.com/joho/godotenv v1.5.1 github.com/mitchellh/go-homedir v1.1.0 @@ -25,14 +25,14 @@ require ( github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 golang.org/x/sync v0.3.0 - golang.org/x/text v0.11.0 + golang.org/x/text v0.13.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) require ( github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/distribution/distribution/v3 v3.0.0-20230802173126-807a836852c0 // indirect + github.com/distribution/reference v0.5.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -40,7 +40,7 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.4 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.6 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -60,14 +60,14 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b // indirect + golang.org/x/crypto v0.13.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.13.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect + golang.org/x/net v0.15.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.12.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.11.1 // indirect + golang.org/x/tools v0.13.0 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 34a6fb32..43c16b4c 100644 --- a/go.sum +++ b/go.sum @@ -1,27 +1,28 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/compose-spec/compose-go v1.17.0 h1:cvje90CU94dQyTnJoHJYjx9yE4Iggse1XmGcO3Qi5ts= -github.com/compose-spec/compose-go v1.17.0/go.mod h1:zR2tP1+kZHi5vJz7PjpW6oMoDji/Js3GHjP+hfjf70Q= +github.com/compose-spec/compose-go v1.18.4 h1:yLYfsc3ATAYZVAJcXyx/V847/JVBmf3pfKfR13mXU4s= +github.com/compose-spec/compose-go v1.18.4/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/distribution/v3 v3.0.0-20230802173126-807a836852c0 h1:quhsUbJzbkyyVVcLam9TMZ0zlE5cBhWJEdaAZcLgEHc= -github.com/distribution/distribution/v3 v3.0.0-20230802173126-807a836852c0/go.mod h1:+fqBJ4vPYo4Uu1ZE4d+bUtTLRXfdSL3NvCZIZ9GHv58= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY= -github.com/docker/docker v24.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.6+incompatible h1:hceabKCtUgDqPu+qm0NgsaXf28Ljf4/pWFL7xjWWDgE= +github.com/docker/docker v24.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027 h1:1L0aalTpPz7YlMxETKpmQoWMBkeiuorElZIXoNmgiPE= -github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/fabpot/local-php-security-checker/v2 v2.0.6 h1:m1znXkwzIPFkJWOnH8Fgt1mHY9hq8u+GY4AC6CPnDME= @@ -36,14 +37,15 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru/arc/v2 v2.0.4 h1:+tHnVSaabYlClRqUq4/+xzeyy9nAf8ju/JJsb4KTNBc= -github.com/hashicorp/golang-lru/arc/v2 v2.0.4/go.mod h1:rbQ1sKlUmbE1QbWxZbqtbpw8frA8ecNEhI0cQBxYtaU= -github.com/hashicorp/golang-lru/v2 v2.0.4 h1:7GHuZcgid37q8o5i3QI9KMT4nCWQQ3Kx3Ov6bb9MfK0= -github.com/hashicorp/golang-lru/v2 v2.0.4/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/golang-lru/arc/v2 v2.0.6 h1:4NU7uP5vSoK6TbaMj3NtY478TTAWLso/vL1gpNrInHg= +github.com/hashicorp/golang-lru/arc/v2 v2.0.6/go.mod h1:cfdDIX05DWvYV6/shsxDfa/OVcRieOt+q4FnM8x+Xno= +github.com/hashicorp/golang-lru/v2 v2.0.6 h1:3xi/Cafd1NaoEnS/yDssIiuVeDVywU0QdFGl3aQaQHM= +github.com/hashicorp/golang-lru/v2 v2.0.6/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= @@ -116,6 +118,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/symfony-cli/cert v1.0.2 h1:rvveFVIoH6JwdfbsjDy5crsFFBiUwJsfEEZduuBtRNg= github.com/symfony-cli/cert v1.0.2/go.mod h1:m2aZC0qLifAgsa0uLshMlJRIkS6hx2bqvDLJgGEbY6Q= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= @@ -138,10 +141,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec 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.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= @@ -151,8 +154,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -168,22 +171,22 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= 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.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.11.1 h1:ojD5zOW8+7dOGzdnNgersm8aPfcDjhMp12UfG93NIMc= -golang.org/x/tools v0.11.1/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= 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= @@ -202,6 +205,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= software.sslmate.com/src/go-pkcs12 v0.2.1 h1:tbT1jjaeFOF230tzOIRJ6U5S1jNqpsSyNjzDd58H3J8= From aa0ebf21624ef7e262522f721b31ebc2baf8b397 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 08:10:51 +0000 Subject: [PATCH 165/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 63 ++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 2f9df408..64a161f5 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1976,6 +1976,69 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, + { + Category: "cloud:resources", + Name: "get", + Aliases: []*console.Alias{ + {Name: "resources:get", Hidden: true}, + {Name: "cloud:resources"}, + {Name: "resources", Hidden: true}, + {Name: "cloud:res"}, + {Name: "res", Hidden: true}, + }, + Usage: "View the resources of apps and services on an environment", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "app",}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "service", Aliases: []string{"s"},}, + &console.StringFlag{Name: "type",}, + &console.StringFlag{Name: "worker",}, + }, + }, + { + Category: "cloud:resources", + Name: "set", + Aliases: []*console.Alias{ + {Name: "resources:set", Hidden: true}, + }, + Usage: "Set the resources of apps and services on an environment", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "count", Aliases: []string{"C"},}, + &console.StringFlag{Name: "disk", Aliases: []string{"D"},}, + &console.BoolFlag{Name: "dry-run",}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "size", Aliases: []string{"S"},}, + &console.BoolFlag{Name: "wait",}, + }, + }, + { + Category: "cloud:resources", + Name: "size:list", + Aliases: []*console.Alias{ + {Name: "resources:size:list", Hidden: true}, + {Name: "cloud:resources:sizes"}, + {Name: "resources:sizes", Hidden: true}, + }, + Usage: "List container profile sizes", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "profile",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "service", Aliases: []string{"s"},}, + }, + }, { Category: "cloud:route", Name: "get", From 62a9d19afa84909374350a302fc3007584546a4e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 18 Sep 2023 10:03:36 +0200 Subject: [PATCH 166/466] Remove unneeded code --- updater/updater.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updater/updater.go b/updater/updater.go index 3d70fc33..c77bee4d 100644 --- a/updater/updater.go +++ b/updater/updater.go @@ -153,7 +153,7 @@ func (updater *Updater) check(currentVersion *version.Version, enableCache bool) updater.logger.Printf("Checking for updates (current version: %s)", currentVersion) if manifestBody == nil { - req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest"), nil) + req, err := http.NewRequest(http.MethodGet, "https://api.github.com/repos/symfony-cli/symfony-cli/releases/latest", nil) if err != nil { updater.logger.Err(err).Msg("") return nil From 8bd8a67e0993e4fe54950ceed2dc695a4338ae31 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 18 Sep 2023 10:38:51 +0200 Subject: [PATCH 167/466] Remove ioutil usage --- commands/db_versions.go | 5 ++--- commands/init_templating.go | 11 +++++------ commands/init_templating_php.go | 6 +++--- commands/local_check_requirements.go | 4 ++-- commands/local_new.go | 3 +-- envs/docker.go | 3 +-- envs/envs.go | 3 +-- envs/local_tunnel.go | 3 +-- local/fcgi_client/fcgiclient.go | 5 ++--- local/php/composer.go | 9 ++++----- local/php/executor_test.go | 7 +++---- local/php/php_server.go | 7 +++---- local/php/platformsh.go | 10 +++++----- local/php/toolbar.go | 16 ++++++++-------- local/pid/pidfile.go | 7 +++---- local/platformsh/applications.go | 3 +-- local/platformsh/generator/commands.go | 3 +-- local/platformsh/generator/config.go | 6 +++--- local/platformsh/project.go | 3 +-- local/project/config.go | 3 +-- local/project/project.go | 3 +-- local/proxy/config.go | 9 ++++----- local/proxy/proxy_test.go | 10 +++++----- main.go | 4 ++-- reexec/reexec.go | 5 ++--- updater/updater.go | 7 +++---- 26 files changed, 68 insertions(+), 87 deletions(-) diff --git a/commands/db_versions.go b/commands/db_versions.go index bf635d8e..39448e09 100644 --- a/commands/db_versions.go +++ b/commands/db_versions.go @@ -2,7 +2,6 @@ package commands import ( "errors" - "io/ioutil" "net/url" "os" "path/filepath" @@ -13,7 +12,7 @@ import ( ) func readDBVersionFromPlatformServiceYAML(projectDir string) (string, string, error) { - servicesYAML, err := ioutil.ReadFile(filepath.Join(projectDir, ".platform", "services.yaml")) + servicesYAML, err := os.ReadFile(filepath.Join(projectDir, ".platform", "services.yaml")) if err != nil { // no services.yaml or unreadable return "", "", err @@ -77,7 +76,7 @@ func readDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { return "", nil } - doctrineConfigYAML, err := ioutil.ReadFile(path) + doctrineConfigYAML, err := os.ReadFile(path) if err != nil { return "", err } diff --git a/commands/init_templating.go b/commands/init_templating.go index 859cd50a..b1abe10f 100644 --- a/commands/init_templating.go +++ b/commands/init_templating.go @@ -22,7 +22,6 @@ package commands import ( "fmt" "io" - "io/ioutil" "net/http" "net/url" "os" @@ -194,7 +193,7 @@ func getTemplates(rootDirectory, chosenTemplateName string, minorPHPVersion stri ) if isFile { - templateConfigBytes, err = ioutil.ReadFile(chosenTemplateName) + templateConfigBytes, err = os.ReadFile(chosenTemplateName) } else { var resp *http.Response resp, err = http.Get(chosenTemplateName) @@ -206,7 +205,7 @@ func getTemplates(rootDirectory, chosenTemplateName string, minorPHPVersion stri } defer resp.Body.Close() - templateConfigBytes, err = ioutil.ReadAll(resp.Body) + templateConfigBytes, err = io.ReadAll(resp.Body) } if err != nil { @@ -219,7 +218,7 @@ func getTemplates(rootDirectory, chosenTemplateName string, minorPHPVersion stri terminal.Logger.Info().Msg("Using template " + chosenTemplateName) } else { - files, err := ioutil.ReadDir(directory) + files, err := os.ReadDir(directory) if err != nil { return nil, errors.Wrap(err, "could not read configuration templates") } @@ -240,7 +239,7 @@ func getTemplates(rootDirectory, chosenTemplateName string, minorPHPVersion stri continue } - templateConfigBytes, err := ioutil.ReadFile(filepath.Join(directory, file.Name())) + templateConfigBytes, err := os.ReadFile(filepath.Join(directory, file.Name())) if err != nil { if isTemplateChosen { return nil, errors.Wrap(err, "could not apply configuration template") @@ -275,7 +274,7 @@ func getTemplates(rootDirectory, chosenTemplateName string, minorPHPVersion stri return nil, errors.New("no matching template found") } - phpini, err := ioutil.ReadFile(filepath.Join(directory, "php.ini")) + phpini, err := os.ReadFile(filepath.Join(directory, "php.ini")) if err != nil { return nil, errors.New("unable to find the php.ini template") } diff --git a/commands/init_templating_php.go b/commands/init_templating_php.go index 5b57399f..595449cc 100644 --- a/commands/init_templating_php.go +++ b/commands/init_templating_php.go @@ -22,7 +22,7 @@ package commands import ( "encoding/json" "fmt" - "io/ioutil" + "os" "path/filepath" "strings" @@ -158,7 +158,7 @@ type composerLock struct { } func parseComposerLock(directory string) (*composerLock, error) { - b, err := ioutil.ReadFile(filepath.Join(directory, "composer.lock")) + b, err := os.ReadFile(filepath.Join(directory, "composer.lock")) if err != nil { return nil, err } @@ -181,7 +181,7 @@ type composerJSON struct { } func parseComposerJSON(directory string) (*composerJSON, error) { - b, err := ioutil.ReadFile(filepath.Join(directory, "composer.json")) + b, err := os.ReadFile(filepath.Join(directory, "composer.json")) if err != nil { return nil, err } diff --git a/commands/local_check_requirements.go b/commands/local_check_requirements.go index 6671a9ce..44489a58 100644 --- a/commands/local_check_requirements.go +++ b/commands/local_check_requirements.go @@ -21,7 +21,6 @@ package commands import ( _ "embed" - "io/ioutil" "os" "path/filepath" @@ -33,6 +32,7 @@ import ( // To generate, run in symfony/requirements-checker // php bin/release.php > data/check-requirements.php +// //go:embed data/check-requirements.php var phpChecker []byte @@ -63,7 +63,7 @@ var localRequirementsCheckCmd = &console.Command{ cachePath := filepath.Join(cacheDir, "check.php") defer os.Remove(cachePath) - if err := ioutil.WriteFile(cachePath, phpChecker, 0600); err != nil { + if err := os.WriteFile(cachePath, phpChecker, 0600); err != nil { return err } diff --git a/commands/local_new.go b/commands/local_new.go index e94fafc4..7955074c 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -24,7 +24,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net/http" "os" "os/exec" @@ -397,7 +396,7 @@ func getSpecialVersion(version string) (string, error) { } defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return "", err } diff --git a/envs/docker.go b/envs/docker.go index 94880fec..e1ec94cc 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -23,7 +23,6 @@ import ( "bytes" "context" "fmt" - "io/ioutil" "net" "net/url" "os" @@ -495,7 +494,7 @@ func (l *Local) getComposeProjectName() string { // COMPOSE_PROJECT_NAME can be set in a .env file if _, err := os.Stat(filepath.Join(composeDir, ".env")); err == nil { - if contents, err := ioutil.ReadFile(filepath.Join(composeDir, ".env")); err == nil { + if contents, err := os.ReadFile(filepath.Join(composeDir, ".env")); err == nil { for _, line := range bytes.Split(contents, []byte("\n")) { if bytes.HasPrefix(line, []byte("COMPOSE_PROJECT_NAME=")) { return string(line[len("COMPOSE_PROJECT_NAME="):]) diff --git a/envs/envs.go b/envs/envs.go index 76e5f9c8..e32c134c 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -22,7 +22,6 @@ package envs import ( "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" "strconv" @@ -90,7 +89,7 @@ func AsMap(env Environment) map[string]string { // appID returns the Symfony project's ID from composer.json func appID(path string) string { - content, err := ioutil.ReadFile(filepath.Join(path, "composer.json")) + content, err := os.ReadFile(filepath.Join(path, "composer.json")) if err != nil { return "" } diff --git a/envs/local_tunnel.go b/envs/local_tunnel.go index 452bb820..fd38ae2e 100644 --- a/envs/local_tunnel.go +++ b/envs/local_tunnel.go @@ -23,7 +23,6 @@ import ( "bytes" "encoding/json" "fmt" - "io/ioutil" "os" "path" "path/filepath" @@ -58,7 +57,7 @@ func (l *Local) relationshipsFromTunnel() Relationships { userHomeDir = "" } tunnelFile := filepath.Join(userHomeDir, ".platformsh", "tunnel-info.json") - data, err := ioutil.ReadFile(tunnelFile) + data, err := os.ReadFile(tunnelFile) if err != nil { if l.Debug { fmt.Fprintf(os.Stderr, "WARNING: unable to read relationships from %s: %s\n", tunnelFile, err) diff --git a/local/fcgi_client/fcgiclient.go b/local/fcgi_client/fcgiclient.go index d9bdc565..77ff9da6 100644 --- a/local/fcgi_client/fcgiclient.go +++ b/local/fcgi_client/fcgiclient.go @@ -10,7 +10,6 @@ import ( "bytes" "encoding/binary" "io" - "io/ioutil" "mime/multipart" "net" "net/http" @@ -376,9 +375,9 @@ func (f *FCGIClient) Request(p map[string]string, req io.Reader) (resp *http.Res } if chunked(resp.TransferEncoding) { - resp.Body = ioutil.NopCloser(httputil.NewChunkedReader(rb)) + resp.Body = io.NopCloser(httputil.NewChunkedReader(rb)) } else { - resp.Body = ioutil.NopCloser(rb) + resp.Body = io.NopCloser(rb) } return } diff --git a/local/php/composer.go b/local/php/composer.go index 3d2566cf..04d20983 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -27,7 +27,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net/http" "os" "path/filepath" @@ -123,7 +122,7 @@ func composerVersion() int { if err != nil { return DefaultComposerVersion } - contents, err := ioutil.ReadFile(filepath.Join(cwd, "composer.lock")) + contents, err := os.ReadFile(filepath.Join(cwd, "composer.lock")) if err != nil { return DefaultComposerVersion } @@ -182,7 +181,7 @@ func downloadComposer(dir string) (string, error) { return "", errors.New("signature was wrong when downloading Composer; please try again") } setupPath := filepath.Join(dir, "composer-setup.php") - ioutil.WriteFile(setupPath, installer, 0666) + os.WriteFile(setupPath, installer, 0666) var stdout bytes.Buffer e := &Executor{ @@ -213,7 +212,7 @@ func downloadComposerInstaller() ([]byte, error) { return nil, err } defer resp.Body.Close() - return ioutil.ReadAll(resp.Body) + return io.ReadAll(resp.Body) } func downloadComposerInstallerSignature() ([]byte, error) { @@ -222,5 +221,5 @@ func downloadComposerInstallerSignature() ([]byte, error) { return nil, err } defer resp.Body.Close() - return ioutil.ReadAll(resp.Body) + return io.ReadAll(resp.Body) } diff --git a/local/php/executor_test.go b/local/php/executor_test.go index 52216ce7..9123960d 100644 --- a/local/php/executor_test.go +++ b/local/php/executor_test.go @@ -23,7 +23,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -165,10 +164,10 @@ func (s *ExecutorSuite) TestEnvInjection(c *C) { // change the project name to get exposed env vars projectFile := filepath.Join(".platform", "local", "project.yaml") - contents, err := ioutil.ReadFile(projectFile) + contents, err := os.ReadFile(projectFile) c.Assert(err, IsNil) - defer ioutil.WriteFile(projectFile, contents, 0644) - ioutil.WriteFile(projectFile, bytes.Replace(contents, []byte("bew7pfa7t2ut2"), []byte("aew7pfa7t2ut2"), 1), 0644) + defer os.WriteFile(projectFile, contents, 0644) + os.WriteFile(projectFile, bytes.Replace(contents, []byte("bew7pfa7t2ut2"), []byte("aew7pfa7t2ut2"), 1), 0644) output.Reset() outCloser = testStdoutCapture(c, &output) diff --git a/local/php/php_server.go b/local/php/php_server.go index 676e88a0..2663d102 100644 --- a/local/php/php_server.go +++ b/local/php/php_server.go @@ -24,7 +24,6 @@ import ( "crypto/sha1" "fmt" "io" - "io/ioutil" "net" "net/http" "net/http/httptest" @@ -99,7 +98,7 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, var args []string if p.Version.IsFPMServer() { fpmConfigFile := p.fpmConfigFile() - if err := ioutil.WriteFile(fpmConfigFile, []byte(p.defaultFPMConf()), 0644); err != nil { + if err := os.WriteFile(fpmConfigFile, []byte(p.defaultFPMConf()), 0644); err != nil { return nil, nil, errors.WithStack(err) } pathsToRemove = append(pathsToRemove, fpmConfigFile) @@ -124,7 +123,7 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, args = []string{p.Version.ServerPath(), "-b", strconv.Itoa(port), "-d", "error_log=" + errorLog} } else { routerPath := p.phpRouterFile() - if err := ioutil.WriteFile(routerPath, phprouter, 0644); err != nil { + if err := os.WriteFile(routerPath, phprouter, 0644); err != nil { return nil, nil, errors.WithStack(err) } pathsToRemove = append(pathsToRemove, routerPath) @@ -205,7 +204,7 @@ func (p *Server) Serve(w http.ResponseWriter, r *http.Request, env map[string]st for k, v := range env { envContent += fmt.Sprintf("$_ENV['%s'] = '%s';\n", addslashes.Replace(k), addslashes.Replace(v)) } - err := errors.WithStack(ioutil.WriteFile(envPath, []byte(envContent), 0644)) + err := errors.WithStack(os.WriteFile(envPath, []byte(envContent), 0644)) if err != nil { return err } diff --git a/local/php/platformsh.go b/local/php/platformsh.go index 689e9f52..1040f003 100644 --- a/local/php/platformsh.go +++ b/local/php/platformsh.go @@ -2,7 +2,7 @@ package php import ( "bytes" - "io/ioutil" + "io" "net/http" "os" "path/filepath" @@ -25,7 +25,7 @@ func InstallPlatformPhar(home string) error { dir := filepath.Join(home, ".platformsh", "bin") if _, err := os.Stat(filepath.Join(dir, "platform")); err == nil { // check "API version" (we never upgrade automatically the psh CLI except if we need to if our code would not be compatible with old versions) - if v, err := ioutil.ReadFile(versionPath); err == nil && bytes.Equal(v, internalVersion) { + if v, err := os.ReadFile(versionPath); err == nil && bytes.Equal(v, internalVersion) { return nil } } @@ -39,13 +39,13 @@ func InstallPlatformPhar(home string) error { return err } defer resp.Body.Close() - installer, err := ioutil.ReadAll(resp.Body) + installer, err := io.ReadAll(resp.Body) if err != nil { return err } installerPath := filepath.Join(home, "platformsh-installer.php") - ioutil.WriteFile(installerPath, installer, 0666) + os.WriteFile(installerPath, installer, 0666) defer os.Remove(installerPath) var stdout bytes.Buffer @@ -62,5 +62,5 @@ func InstallPlatformPhar(home string) error { return errors.Errorf("unable to setup platformsh CLI: %s", stdout.String()) } - return ioutil.WriteFile(versionPath, internalVersion, 0644) + return os.WriteFile(versionPath, internalVersion, 0644) } diff --git a/local/php/toolbar.go b/local/php/toolbar.go index 9dca0dfc..24843160 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -22,14 +22,14 @@ package php import ( "bytes" "fmt" + "io" + "regexp" + "github.com/pkg/errors" "github.com/symfony-cli/symfony-cli/envs" "github.com/symfony-cli/terminal" "golang.org/x/text/cases" "golang.org/x/text/language" - "io" - "io/ioutil" - "regexp" ) func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.ReadCloser, error) { @@ -38,13 +38,13 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea n, err := body.Read(bn) // if body is empty, return immediately if n == 0 && err == io.EOF { - return ioutil.NopCloser(bytes.NewReader([]byte{})), nil + return io.NopCloser(bytes.NewReader([]byte{})), nil } if n == len(bn) && err != nil { return nil, errors.WithStack(err) } if bn[0] != '\n' && bn[0] != '<' { - return ioutil.NopCloser(io.MultiReader(bytes.NewReader(bn), body)), nil + return io.NopCloser(io.MultiReader(bytes.NewReader(bn), body)), nil } toolbarHint := []byte("") @@ -57,7 +57,7 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea return nil, errors.WithStack(err) } if n != len(toolbarHint) || !bytes.Equal(start, toolbarHint) { - return ioutil.NopCloser(io.MultiReader(bytes.NewReader(bn), bytes.NewReader(start), body)), nil + return io.NopCloser(io.MultiReader(bytes.NewReader(bn), bytes.NewReader(start), body)), nil } logoBg := "sf-toolbar-status-normal" @@ -111,7 +111,7 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea } } - b, err := ioutil.ReadAll(body) + b, err := io.ReadAll(body) if err != nil { return body, errors.WithStack(err) } @@ -152,5 +152,5 @@ $1`) re := regexp.MustCompile(`(<(?:a|button)[^"]+?class="hide-button")`) b = re.ReplaceAll(b, content) - return ioutil.NopCloser(io.MultiReader(bytes.NewReader(bn), bytes.NewReader(start), bytes.NewReader(b))), nil + return io.NopCloser(io.MultiReader(bytes.NewReader(bn), bytes.NewReader(start), bytes.NewReader(b))), nil } diff --git a/local/pid/pidfile.go b/local/pid/pidfile.go index 9f3758ee..c182cfef 100644 --- a/local/pid/pidfile.go +++ b/local/pid/pidfile.go @@ -24,7 +24,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "os" "path/filepath" "strings" @@ -72,7 +71,7 @@ func New(dir string, args []string) *PidFile { } func Load(path string) (*PidFile, error) { - contents, err := ioutil.ReadFile(path) + contents, err := os.ReadFile(path) if err != nil { return nil, err } @@ -255,7 +254,7 @@ func (p *PidFile) Write(pid, port int, scheme string) error { return err } - return ioutil.WriteFile(p.path, b, 0644) + return os.WriteFile(p.path, b, 0644) } // Stop kills the current process @@ -333,7 +332,7 @@ func doAll(dir string) []*PidFile { if !strings.HasSuffix(p, ".pid") { return nil } - contents, err := ioutil.ReadFile(p) + contents, err := os.ReadFile(p) if err != nil { return nil } diff --git a/local/platformsh/applications.go b/local/platformsh/applications.go index 21a61ada..9a39db2c 100644 --- a/local/platformsh/applications.go +++ b/local/platformsh/applications.go @@ -20,7 +20,6 @@ package platformsh import ( - "io/ioutil" "os" "path/filepath" "sort" @@ -95,7 +94,7 @@ func FindLocalApplications(rootDirectory string) LocalApplications { go func() { for file := range appParser { - content, err := ioutil.ReadFile(file) + content, err := os.ReadFile(file) if err != nil { terminal.Logger.Warn().Msgf("Could not read %s file: %s\n", file, err) continue diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index f98560db..af3eceea 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -5,7 +5,6 @@ import ( "crypto/md5" "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" "sort" @@ -115,7 +114,7 @@ func parseCommands(home string) (string, error) { dir := filepath.Join(home, ".platformsh", "bin") var pharPath = filepath.Join(dir, "platform") hasher := md5.New() - if s, err := ioutil.ReadFile(pharPath); err != nil { + if s, err := os.ReadFile(pharPath); err != nil { hasher.Write(s) } diff --git a/local/platformsh/generator/config.go b/local/platformsh/generator/config.go index c6e6a5d5..eaa770be 100644 --- a/local/platformsh/generator/config.go +++ b/local/platformsh/generator/config.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "os" "sort" @@ -92,7 +92,7 @@ func parseServices() (string, error) { } defer resp.Body.Close() var services map[string]*service - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return "", err } @@ -147,7 +147,7 @@ func parsePHPExtensions() (string, error) { orderedExtensionNames := []string{} extensions := make(map[string][]string) - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return "", err } diff --git a/local/platformsh/project.go b/local/platformsh/project.go index f96abe7c..9e655bc6 100644 --- a/local/platformsh/project.go +++ b/local/platformsh/project.go @@ -22,7 +22,6 @@ package platformsh import ( goerr "errors" "fmt" - "io/ioutil" "os" "path/filepath" @@ -113,7 +112,7 @@ func guessProjectRoot(currentDir string, debug bool) (string, string) { } func getProjectConfig(projectRoot string, debug bool) string { - contents, err := ioutil.ReadFile(filepath.Join(projectRoot, ".platform", "local", "project.yaml")) + contents, err := os.ReadFile(filepath.Join(projectRoot, ".platform", "local", "project.yaml")) if err != nil { if debug { fmt.Fprintf(os.Stderr, "WARNING: unable to find Platform.sh config file: %s\n", err) diff --git a/local/project/config.go b/local/project/config.go index b1ef0825..c5d3767b 100644 --- a/local/project/config.go +++ b/local/project/config.go @@ -20,7 +20,6 @@ package project import ( - "io/ioutil" "os" "path/filepath" @@ -121,7 +120,7 @@ func newConfigFromFile(configFile string) (*FileConfig, error) { return nil, nil } - contents, err := ioutil.ReadFile(configFile) + contents, err := os.ReadFile(configFile) if err != nil { return nil, err } diff --git a/local/project/project.go b/local/project/project.go index 0813ec6c..81f4a46c 100644 --- a/local/project/project.go +++ b/local/project/project.go @@ -21,7 +21,6 @@ package project import ( "encoding/json" - "io/ioutil" "net/http" "os" "path/filepath" @@ -112,7 +111,7 @@ func realPassthru(documentRoot, passthru string) (string, error) { func guessDocumentRoot(path string) string { // for Symfony: check if public-dir is set up in composer.json first - if b, err := ioutil.ReadFile(filepath.Join(path, "composer.json")); err == nil { + if b, err := os.ReadFile(filepath.Join(path, "composer.json")); err == nil { var f map[string]interface{} if err := json.Unmarshal(b, &f); err == nil { if f1, ok := f["extra"]; ok { diff --git a/local/proxy/config.go b/local/proxy/config.go index 04c3831b..60b53179 100644 --- a/local/proxy/config.go +++ b/local/proxy/config.go @@ -22,7 +22,6 @@ package proxy import ( "encoding/json" "fmt" - "io/ioutil" "log" "net/http" "os" @@ -66,11 +65,11 @@ func Load(homeDir string) (*Config, error) { if err := os.MkdirAll(filepath.Dir(proxyFile), 0755); err != nil { return nil, errors.Wrapf(err, "unable to create directory for %s", proxyFile) } - if err := ioutil.WriteFile(proxyFile, DefaultConfig, 0644); err != nil { + if err := os.WriteFile(proxyFile, DefaultConfig, 0644); err != nil { return nil, errors.Wrapf(err, "unable to write %s", proxyFile) } } - data, err := ioutil.ReadFile(proxyFile) + data, err := os.ReadFile(proxyFile) if err != nil { return nil, errors.Wrapf(err, "unable to read the proxy configuration file, %s", proxyFile) } @@ -221,7 +220,7 @@ func (c *Config) Watch() { // reloads the TLD and the domains (not the port) func (c *Config) reload() { - data, err := ioutil.ReadFile(c.path) + data, err := os.ReadFile(c.path) if err != nil { return } @@ -249,7 +248,7 @@ func (c *Config) Save() error { if err != nil { return errors.WithStack(err) } - return errors.WithStack(ioutil.WriteFile(c.path, data, 0644)) + return errors.WithStack(os.WriteFile(c.path, data, 0644)) } // should be called with a lock a place diff --git a/local/proxy/proxy_test.go b/local/proxy/proxy_test.go index da3f84eb..55215193 100644 --- a/local/proxy/proxy_test.go +++ b/local/proxy/proxy_test.go @@ -22,7 +22,7 @@ package proxy import ( "crypto/tls" "crypto/x509" - "io/ioutil" + "io" "log" "net/http" "net/http/httptest" @@ -122,7 +122,7 @@ func (s *ProxySuite) TestProxy(c *C) { res, err := client.Do(req) c.Assert(err, IsNil) c.Assert(res.StatusCode, Equals, http.StatusNotFound) - body, _ := ioutil.ReadAll(res.Body) + body, _ := io.ReadAll(res.Body) c.Check(strings.Contains(string(body), "not linked"), Equals, true) } @@ -134,7 +134,7 @@ func (s *ProxySuite) TestProxy(c *C) { res, err := client.Do(req) c.Assert(err, IsNil) c.Assert(res.StatusCode, Equals, http.StatusNotFound) - body, _ := ioutil.ReadAll(res.Body) + body, _ := io.ReadAll(res.Body) c.Check(strings.Contains(string(body), "not started"), Equals, true) } /* @@ -164,7 +164,7 @@ func (s *ProxySuite) TestProxy(c *C) { res, err := client.Do(req) c.Assert(err, IsNil) c.Assert(res.StatusCode, Equals, http.StatusOK) - body, _ := ioutil.ReadAll(res.Body) + body, _ := io.ReadAll(res.Body) c.Check(string(body), Equals, "symfony.wip") } */ @@ -187,7 +187,7 @@ func (s *ProxySuite) TestProxy(c *C) { res, err := client.Do(req) c.Assert(err, IsNil) - body, _ := ioutil.ReadAll(res.Body) + body, _ := io.ReadAll(res.Body) c.Assert(res.StatusCode, Equals, http.StatusOK) c.Assert(string(body), Equals, "http://symfony-no-tls.wip") } diff --git a/main.go b/main.go index e4f95c1a..be3340cb 100644 --- a/main.go +++ b/main.go @@ -23,7 +23,7 @@ package main import ( "fmt" - "io/ioutil" + "io" "os" "time" @@ -83,7 +83,7 @@ func main() { } // called via "symfony composer"? if len(args) >= 2 && args[1] == "composer" { - res := php.Composer("", args[2:], getCliExtraEnv(), os.Stdout, os.Stderr, ioutil.Discard, zerolog.Nop()) + res := php.Composer("", args[2:], getCliExtraEnv(), os.Stdout, os.Stderr, io.Discard, zerolog.Nop()) terminal.Eprintln(res.Error()) os.Exit(res.ExitCode()) } diff --git a/reexec/reexec.go b/reexec/reexec.go index ab434f67..d447514e 100644 --- a/reexec/reexec.go +++ b/reexec/reexec.go @@ -21,7 +21,6 @@ package reexec import ( "fmt" - "io/ioutil" "os" "os/exec" "os/signal" @@ -90,7 +89,7 @@ func Background(homeDir string) error { return errors.New("Not applicable in a Go run context") } - statusFile, err := ioutil.TempFile(homeDir, "status-") + statusFile, err := os.CreateTemp(homeDir, "status-") if err != nil { return errors.Wrap(err, "Could not create status file") } @@ -192,7 +191,7 @@ func NotifyForeground(status string) error { os.Stderr.Close() return os.Remove(statusFile) } - return ioutil.WriteFile(statusFile, []byte(status), 0600) + return os.WriteFile(statusFile, []byte(status), 0600) } func WatchParent(stopCh chan bool) error { diff --git a/updater/updater.go b/updater/updater.go index c77bee4d..5aa66f1f 100644 --- a/updater/updater.go +++ b/updater/updater.go @@ -23,7 +23,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net/http" "os" "path/filepath" @@ -132,7 +131,7 @@ func (updater *Updater) check(currentVersion *version.Version, enableCache bool) if enableCache && manifestFileErr == nil { if stat, err := manifestFile.Stat(); err == nil { if time.Since(stat.ModTime()) < 1*time.Hour { - if manifestCacheBody, manifestCacheErr := ioutil.ReadAll(manifestFile); manifestCacheErr == nil { + if manifestCacheBody, manifestCacheErr := io.ReadAll(manifestFile); manifestCacheErr == nil { manifestBody = manifestCacheBody } } else { @@ -171,13 +170,13 @@ func (updater *Updater) check(currentVersion *version.Version, enableCache bool) return nil } - manifestBody, err = ioutil.ReadAll(resp.Body) + manifestBody, err = io.ReadAll(resp.Body) if err != nil { updater.logger.Err(err).Msg("") return nil } - if err := ioutil.WriteFile(manifestCachePath, manifestBody, 0644); err != nil { + if err := os.WriteFile(manifestCachePath, manifestBody, 0644); err != nil { updater.logger.Err(err).Msg("") return nil } From 88c6c770c49e5b074a08bb5ea5b24eb4dea8b70d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 25 Sep 2023 14:00:18 +0200 Subject: [PATCH 168/466] Fix wrong colors --- main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index be3340cb..7f5d4fe1 100644 --- a/main.go +++ b/main.go @@ -107,10 +107,16 @@ func main() { } cmds = append(cmds, psh.Commands...) console.HelpPrinter = psh.WrapHelpPrinter() + c1 := "#0057B7" + c2 := "#FFDD00" + if os.Getenv("COLORTERM") != "truecolor" { + c1 = "blue" + c2 = "yellow" + } app := &console.Application{ Name: "Symfony CLI", Usage: "Symfony CLI helps developers manage projects, from local code to remote infrastructure", - Copyright: fmt.Sprintf("(c) 2021-%d Fabien Potencier #StandWithUkraine Support Ukraine", time.Now().Year()), + Copyright: fmt.Sprintf("(c) 2021-%d Fabien Potencier #StandWithUkraine", time.Now().Year(), c1, c2, c2, c1), FlagEnvPrefix: []string{"SYMFONY", "PLATFORM"}, Commands: cmds, Action: func(ctx *console.Context) error { From 737b935b9106b2aa34e25d95633952dc79acd269 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 26 Sep 2023 18:43:33 +0200 Subject: [PATCH 169/466] Fix compatibility with Doctrine DBAL 4 --- envs/envs.go | 2 +- envs/remote_test.go | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/envs/envs.go b/envs/envs.go index e32c134c..811ba499 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -172,7 +172,7 @@ func extractRelationshipsEnvs(env Environment) Envs { if version == "10.2" { minor = 7 } - version = fmt.Sprintf("mariadb-%s.%d", version, minor) + version = fmt.Sprintf("%s.%d-MariaDB", version, minor) } values[versionKey] = version diff --git a/envs/remote_test.go b/envs/remote_test.go index b3d511de..0ffafc78 100644 --- a/envs/remote_test.go +++ b/envs/remote_test.go @@ -315,7 +315,7 @@ func (s *RemoteSuite) TestRelationships(c *C) { os.Setenv("PLATFORM_RELATIONSHIPS", "eyJyZWRpcyI6IFt7InVzZXJuYW1lIjogbnVsbCwgInBhc3N3b3JkIjogbnVsbCwgInNlcnZpY2UiOiAicmVkaXNfc2Vzc2lvbnMiLCAiZnJhZ21lbnQiOiBudWxsLCAiaXAiOiAiMTY5LjI1NC4yMy4yMDQiLCAiaG9zdG5hbWUiOiAidGVncTdqY3BqMjVuM3VnYjN0cm9rY2w1anEucmVkaXNfc2Vzc2lvbnMuc2VydmljZS5fLnM1eS5pbyIsICJwb3J0IjogNjM3OSwgImNsdXN0ZXIiOiAiN2NhbTRtbTUzN2ViZS1jbGVhbi11cC10bWVpd2hxIiwgImhvc3QiOiAicmVkaXMuaW50ZXJuYWwiLCAicmVsIjogInJlZGlzIiwgInBhdGgiOiBudWxsLCAicXVlcnkiOiB7fSwgInNjaGVtZSI6ICJyZWRpcyIsICJ0eXBlIjogInJlZGlzOjMuMiIsICJwdWJsaWMiOiBmYWxzZX1dLCAiZGF0YWJhc2UiOiBbeyJ1c2VybmFtZSI6ICJtYWluIiwgInBhc3N3b3JkIjogIjZlNjAyODg4NTc2NzAzMDMwZjUzYzE1NDA1MWJkNzc4IiwgInNlcnZpY2UiOiAibXlzcWwiLCAiaXAiOiAiMTY5LjI1NC4xMzQuMTEiLCAiaG9zdG5hbWUiOiAiaTNvNjJkbzV0eXh5MzV3NXdzdTY1YmdjcnUubXlzcWwuc2VydmljZS5fLnM1eS5pbyIsICJjbHVzdGVyIjogIjdjYW00bW01MzdlYmUtY2xlYW4tdXAtdG1laXdocSIsICJob3N0IjogImRhdGFiYXNlLmludGVybmFsIiwgInJlbCI6ICJtYWluIiwgInF1ZXJ5IjogeyJpc19tYXN0ZXIiOiB0cnVlfSwgInBhdGgiOiAibWFpbiIsICJzY2hlbWUiOiAibXlzcWwiLCAidHlwZSI6ICJteXNxbDoxMC4wIiwgInBvcnQiOiAzMzA2fV19") c.Assert(extractRelationshipsEnvs(r), DeepEquals, Envs{ - "DATABASE_URL": "mysql://main:6e602888576703030f53c154051bd778@database.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=mariadb-10.0.0", + "DATABASE_URL": "mysql://main:6e602888576703030f53c154051bd778@database.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=10.0.0-MariaDB", "DATABASE_DRIVER": "mysql", "DATABASE_NAME": "main", "DATABASE_DATABASE": "main", @@ -325,7 +325,7 @@ func (s *RemoteSuite) TestRelationships(c *C) { "DATABASE_USER": "main", "DATABASE_USERNAME": "main", "DATABASE_PASSWORD": "6e602888576703030f53c154051bd778", - "DATABASE_VERSION": "mariadb-10.0.0", + "DATABASE_VERSION": "10.0.0-MariaDB", "REDIS_URL": "redis://redis.internal:6379", "REDIS_HOST": "redis.internal", "REDIS_PORT": "6379", @@ -367,12 +367,12 @@ func (s *RemoteSuite) TestRelationships(c *C) { os.Setenv("PLATFORM_RELATIONSHIPS", "eyJkYXRhYmFzZSI6IFt7InNlcnZpY2UiOiAiZGF0YWJhc2VfbXlzcWxfbWFpbiIsICJpcCI6ICIxNjkuMjU0LjE4MC4yMjUiLCAiaG9zdG5hbWUiOiAibG03aDJld2Zvemc2cHVyamlhYmI1ZzRpYnUuZGF0YWJhc2VfbXlzcWxfbWFpbi5zZXJ2aWNlLl8uczV5LmlvIiwgImNsdXN0ZXIiOiAieHBzZm9vdGFwanc0YS1tYXN0ZXItN3JxdHd0aSIsICJob3N0IjogImRhdGFiYXNlLmludGVybmFsIiwgInJlbCI6ICJteXNxbCIsICJxdWVyeSI6IHt9LCAic2NoZW1lIjogIm15c3FsIiwgInR5cGUiOiAibXlzcWw6MTAuMSIsICJwb3J0IjogMzMwNn1dfQ==") c.Assert(extractRelationshipsEnvs(r), DeepEquals, Envs{ - "DATABASE_URL": "mysql://database.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=mariadb-10.1.0", + "DATABASE_URL": "mysql://database.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=10.1.0-MariaDB", "DATABASE_SERVER": "mysql://database.internal:3306", "DATABASE_DRIVER": "mysql", "DATABASE_HOST": "database.internal", "DATABASE_PORT": "3306", - "DATABASE_VERSION": "mariadb-10.1.0", + "DATABASE_VERSION": "10.1.0-MariaDB", "DATABASE_DATABASE": "main", "DATABASE_NAME": "main", }) @@ -380,25 +380,25 @@ func (s *RemoteSuite) TestRelationships(c *C) { os.Setenv("PLATFORM_RELATIONSHIPS", "eyJkYXRhYmFzZSI6IFt7InNlcnZpY2UiOiAiZGF0YWJhc2VfbXlzcWxfbWFpbiIsICJpcCI6ICIxNjkuMjU0LjE4MC4yMjUiLCAiaG9zdG5hbWUiOiAibG03aDJld2Zvemc2cHVyamlhYmI1ZzRpYnUuZGF0YWJhc2VfbXlzcWxfbWFpbi5zZXJ2aWNlLl8uczV5LmlvIiwgImNsdXN0ZXIiOiAieHBzZm9vdGFwanc0YS1tYXN0ZXItN3JxdHd0aSIsICJob3N0IjogImRhdGFiYXNlLmludGVybmFsIiwgInJlbCI6ICJteXNxbCIsICJxdWVyeSI6IHt9LCAic2NoZW1lIjogIm15c3FsIiwgInR5cGUiOiAibXlzcWw6MTAuMiIsICJwb3J0IjogMzMwNn1dfQo=") // Maria DB 10.2 == 10.2.7 c.Assert(extractRelationshipsEnvs(r), DeepEquals, Envs{ - "DATABASE_URL": "mysql://database.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=mariadb-10.2.7", + "DATABASE_URL": "mysql://database.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=10.2.7-MariaDB", "DATABASE_SERVER": "mysql://database.internal:3306", "DATABASE_DRIVER": "mysql", "DATABASE_HOST": "database.internal", "DATABASE_PORT": "3306", - "DATABASE_VERSION": "mariadb-10.2.7", + "DATABASE_VERSION": "10.2.7-MariaDB", "DATABASE_DATABASE": "main", "DATABASE_NAME": "main", }) - os.Setenv("DATABASE_VERSION", "mariadb-10.2.19") + os.Setenv("DATABASE_VERSION", "10.2.19-MariaDB") os.Setenv("DATABASE_CHARSET", "utf8") c.Assert(extractRelationshipsEnvs(r), DeepEquals, Envs{ - "DATABASE_URL": "mysql://database.internal:3306/main?sslmode=disable&charset=utf8&serverVersion=mariadb-10.2.19", + "DATABASE_URL": "mysql://database.internal:3306/main?sslmode=disable&charset=utf8&serverVersion=10.2.19-MariaDB", "DATABASE_SERVER": "mysql://database.internal:3306", "DATABASE_DRIVER": "mysql", "DATABASE_HOST": "database.internal", "DATABASE_PORT": "3306", - "DATABASE_VERSION": "mariadb-10.2.19", + "DATABASE_VERSION": "10.2.19-MariaDB", "DATABASE_DATABASE": "main", "DATABASE_NAME": "main", }) From c79d7bb01e2cf78179d44f7ae53f80d1a4c00a6c Mon Sep 17 00:00:00 2001 From: Simon Krull Date: Sat, 2 Sep 2023 18:27:03 +0200 Subject: [PATCH 170/466] Warn users to use sudo to mv command in bash-installer --- installer/bash-installer | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installer/bash-installer b/installer/bash-installer index a34d287e..2136f650 100755 --- a/installer/bash-installer +++ b/installer/bash-installer @@ -217,6 +217,7 @@ if [ "${custom_dir}" == "false" ]; then output "\nOr add the following line to your shell configuration file:" "info" output " export PATH=\"\$HOME/${CLI_CONFIG_DIR}/bin:\$PATH\"" output "\nOr install it globally on your system:" "info" - output " mv ${binary_dest}/${CLI_EXECUTABLE} /usr/local/bin/${CLI_EXECUTABLE}" + output " mv ${binary_dest}/${CLI_EXECUTABLE} /usr/local/bin/${CLI_EXECUTABLE}" + output "\nAccording to the Linux system, it is necessary to have sudo priviliges to move the file to /usr/local/bin/ directory" output "\nThen start a new shell and run '${CLI_EXECUTABLE}'" "info" fi From 2ba4c375ecb314a65461a7100285e924a64773b0 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 1 Oct 2023 09:35:52 +0200 Subject: [PATCH 171/466] Tweak a message in the bash installer --- installer/bash-installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/bash-installer b/installer/bash-installer index 2136f650..8b96937f 100755 --- a/installer/bash-installer +++ b/installer/bash-installer @@ -218,6 +218,6 @@ if [ "${custom_dir}" == "false" ]; then output " export PATH=\"\$HOME/${CLI_CONFIG_DIR}/bin:\$PATH\"" output "\nOr install it globally on your system:" "info" output " mv ${binary_dest}/${CLI_EXECUTABLE} /usr/local/bin/${CLI_EXECUTABLE}" - output "\nAccording to the Linux system, it is necessary to have sudo priviliges to move the file to /usr/local/bin/ directory" + output "\nIf moving the file does not work, you might have to prefix the command with sudo." output "\nThen start a new shell and run '${CLI_EXECUTABLE}'" "info" fi From 54605eb42b47b7289f920eb261ce057cd65a1c19 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 9 Jan 2023 12:41:30 +0100 Subject: [PATCH 172/466] Allow version 4 of the Platform.sh CLI to be installed --- commands/init_templating.go | 2 +- commands/platformsh.go | 101 +++++------ go.mod | 5 + go.sum | 15 ++ local/php/platformsh.go | 66 ------- local/platformsh/commands.go | 76 +++----- local/platformsh/generator/commands.go | 73 +++----- local/platformsh/installer.go | 242 +++++++++++++++++++++++++ 8 files changed, 370 insertions(+), 210 deletions(-) delete mode 100644 local/php/platformsh.go create mode 100644 local/platformsh/installer.go diff --git a/commands/init_templating.go b/commands/init_templating.go index b1abe10f..7ac1b258 100644 --- a/commands/init_templating.go +++ b/commands/init_templating.go @@ -318,7 +318,7 @@ type configTemplate struct { Template string } -func (c *configTemplate) Match(directory string, minorPHPVersion string) bool { +func (c *configTemplate) Match(directory, minorPHPVersion string) bool { for _, req := range c.Requirements { if !req.Check(directory, minorPHPVersion) { return false diff --git a/commands/platformsh.go b/commands/platformsh.go index e880eb57..ffa0c46b 100644 --- a/commands/platformsh.go +++ b/commands/platformsh.go @@ -24,13 +24,13 @@ import ( _ "embed" "io" "os" - "path/filepath" + "os/exec" "strings" + "github.com/kr/pty" "github.com/mitchellh/go-homedir" "github.com/rs/zerolog" "github.com/symfony-cli/console" - "github.com/symfony-cli/symfony-cli/local/php" "github.com/symfony-cli/symfony-cli/local/platformsh" "github.com/symfony-cli/symfony-cli/util" ) @@ -42,13 +42,7 @@ type platformshCLI struct { } func NewPlatformShCLI() (*platformshCLI, error) { - home, err := homedir.Dir() - if err != nil { - return nil, err - } - p := &platformshCLI{ - path: filepath.Join(home, ".platformsh", "bin", "platform"), - } + p := &platformshCLI{} for _, command := range platformsh.Commands { command.Action = p.proxyPSHCmd(strings.TrimPrefix(command.Category+":"+command.Name, "cloud:")) command.Args = []*console.Arg{ @@ -67,6 +61,26 @@ func NewPlatformShCLI() (*platformshCLI, error) { return p, nil } +func (p *platformshCLI) getPath() string { + if p.path != "" { + return p.path + } + + home, err := homedir.Dir() + if err != nil { + panic("unable to get home directory") + } + + // the Platform.sh CLI is always available on the containers thanks to the configurator + p.path = platformsh.BinaryPath(home) + if !util.InCloud() { + if cloudPath, err := platformsh.Install(home); err == nil { + p.path = cloudPath + } + } + return p.path +} + func (p *platformshCLI) PSHMainCommands() []*console.Command { names := map[string]bool{ "cloud:project:list": true, @@ -90,38 +104,25 @@ func (p *platformshCLI) PSHMainCommands() []*console.Command { func (p *platformshCLI) proxyPSHCmd(commandName string) console.ActionFunc { return func(commandName string) console.ActionFunc { - return func(c *console.Context) error { - // the Platform.sh CLI is always available on the containers thanks to the configurator - if !util.InCloud() { - home, err := homedir.Dir() - if err != nil { + return func(ctx *console.Context) error { + if hook, ok := platformshBeforeHooks["cloud:"+commandName]; ok && !console.IsHelp(ctx) { + if err := hook(ctx); err != nil { return err } - if err := php.InstallPlatformPhar(home); err != nil { - return console.Exit(err.Error(), 1) - } } - if hook, ok := platformshBeforeHooks["cloud:"+commandName]; ok && !console.IsHelp(c) { - if err := hook(c); err != nil { - return err - } + cmd := p.executor(append([]string{ctx.Command.UserName}, ctx.Args().Slice()...)) + f, err := pty.Start(cmd) + if err != nil { + return err } - - args := os.Args[1:] - for i := range args { - if args[i] == c.Command.UserName { - args[i] = commandName - break - } - } - e := p.executor(args) - return console.Exit("", e.Execute(false)) + _, err = io.Copy(cmd.Stdout, f) + return err } }(commandName) } -func (p *platformshCLI) executor(args []string) *php.Executor { +func (p *platformshCLI) executor(args []string) *exec.Cmd { env := []string{ "PLATFORMSH_CLI_APPLICATION_NAME=Platform.sh CLI for Symfony", "PLATFORMSH_CLI_APPLICATION_EXECUTABLE=symfony", @@ -131,34 +132,32 @@ func (p *platformshCLI) executor(args []string) *php.Executor { if util.InCloud() { env = append(env, "PLATFORMSH_CLI_UPDATES_CHECK=0") } - e := &php.Executor{ - BinName: "php", - Args: append([]string{"php", p.path}, args...), - ExtraEnv: env, - } - e.Paths = append([]string{filepath.Dir(p.path)}, e.Paths...) - return e + args[0] = strings.TrimPrefix(args[0], "cloud:") + cmd := exec.Command(p.getPath(), args...) + cmd.Env = append(os.Environ(), env...) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + return cmd } func (p *platformshCLI) RunInteractive(logger zerolog.Logger, projectDir string, args []string, debug bool, stdin io.Reader) (bytes.Buffer, bool) { var buf bytes.Buffer - - e := p.executor(args) + cmd := p.executor(args) if projectDir != "" { - e.Dir = projectDir + cmd.Dir = projectDir } if debug { - e.Stdout = io.MultiWriter(&buf, os.Stdout) - e.Stderr = io.MultiWriter(&buf, os.Stderr) + cmd.Stdout = io.MultiWriter(&buf, os.Stdout) + cmd.Stderr = io.MultiWriter(&buf, os.Stderr) } else { - e.Stdout = &buf - e.Stderr = &buf + cmd.Stdout = &buf + cmd.Stderr = &buf } if stdin != nil { - e.Stdin = stdin + cmd.Stdin = stdin } - logger.Debug().Str("cmd", strings.Join(e.Args, " ")).Msg("Executing Platform.sh CLI command interactively") - if ret := e.Execute(false); ret != 0 { + logger.Debug().Str("cmd", strings.Join(cmd.Args, " ")).Msg("Executing Platform.sh CLI command interactively") + if err := cmd.Run(); err != nil { return buf, false } return buf, true @@ -170,8 +169,8 @@ func (p *platformshCLI) WrapHelpPrinter() func(w io.Writer, templ string, data i switch cmd := data.(type) { case *console.Command: if strings.HasPrefix(cmd.Category, "cloud") { - e := p.executor([]string{strings.TrimPrefix(cmd.FullName(), "cloud:"), "--help", "--ansi"}) - e.Execute(false) + cmd := p.executor([]string{cmd.UserName, "--help"}) + cmd.Run() } else { currentHelpPrinter(w, templ, data) } diff --git a/go.mod b/go.mod index 7cd0a741..4a20a0c0 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,7 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 + github.com/blackfireio/osinfo v1.0.4 github.com/compose-spec/compose-go v1.18.4 github.com/docker/docker v24.0.6+incompatible github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a @@ -11,11 +12,13 @@ require ( github.com/hashicorp/golang-lru/arc/v2 v2.0.6 github.com/hpcloud/tail v1.0.0 github.com/joho/godotenv v1.5.1 + github.com/kr/pty v1.1.8 github.com/mitchellh/go-homedir v1.1.0 github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 github.com/rs/xid v1.5.0 github.com/rs/zerolog v1.30.0 + github.com/schollz/progressbar/v3 v3.13.1 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 @@ -32,6 +35,7 @@ require ( require ( github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/creack/pty v1.1.18 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect @@ -48,6 +52,7 @@ require ( github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect + github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect diff --git a/go.sum b/go.sum index 43c16b4c..e1e22e4e 100644 --- a/go.sum +++ b/go.sum @@ -4,10 +4,15 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/blackfireio/osinfo v1.0.4 h1:lQVXqDh+UDFZa9ZzTv/ReyBfu+vXMkjqeGO5CEwbCTs= +github.com/blackfireio/osinfo v1.0.4/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA= github.com/compose-spec/compose-go v1.18.4 h1:yLYfsc3ATAYZVAJcXyx/V847/JVBmf3pfKfR13mXU4s= github.com/compose-spec/compose-go v1.18.4/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -53,12 +58,15 @@ github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+h github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -67,13 +75,17 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 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-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= +github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= +github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -106,6 +118,8 @@ github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= +github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= +github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -173,6 +187,7 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/local/php/platformsh.go b/local/php/platformsh.go deleted file mode 100644 index 1040f003..00000000 --- a/local/php/platformsh.go +++ /dev/null @@ -1,66 +0,0 @@ -package php - -import ( - "bytes" - "io" - "net/http" - "os" - "path/filepath" - - "github.com/pkg/errors" - "github.com/symfony-cli/terminal" -) - -// Bump whenever we want to be sure we get a recent version of the psh CLI -var internalVersion = []byte("3") - -func InstallPlatformPhar(home string) error { - cacheDir := filepath.Join(os.TempDir(), ".symfony", "platformsh", "cache") - if _, err := os.Stat(cacheDir); err != nil { - if err := os.MkdirAll(cacheDir, 0755); err != nil { - return err - } - } - var versionPath = filepath.Join(cacheDir, "internal_version") - dir := filepath.Join(home, ".platformsh", "bin") - if _, err := os.Stat(filepath.Join(dir, "platform")); err == nil { - // check "API version" (we never upgrade automatically the psh CLI except if we need to if our code would not be compatible with old versions) - if v, err := os.ReadFile(versionPath); err == nil && bytes.Equal(v, internalVersion) { - return nil - } - } - - spinner := terminal.NewSpinner(terminal.Stderr) - spinner.PrefixText = "Download additional CLI tools..." - spinner.Start() - defer spinner.Stop() - resp, err := http.Get("https://platform.sh/cli/installer") - if err != nil { - return err - } - defer resp.Body.Close() - installer, err := io.ReadAll(resp.Body) - if err != nil { - return err - } - - installerPath := filepath.Join(home, "platformsh-installer.php") - os.WriteFile(installerPath, installer, 0666) - defer os.Remove(installerPath) - - var stdout bytes.Buffer - e := &Executor{ - Dir: home, - BinName: "php", - Args: []string{"php", installerPath}, - ExtraEnv: []string{"PLATFORMSH_CLI_NO_INTERACTION=1"}, - SkipNbArgs: 1, - Stdout: &stdout, - Stderr: &stdout, - } - if ret := e.Execute(false); ret == 1 { - return errors.Errorf("unable to setup platformsh CLI: %s", stdout.String()) - } - - return os.WriteFile(versionPath, internalVersion, 0644) -} diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 64a161f5..1f2295dc 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -53,7 +53,6 @@ var Commands = []*console.Command{ Category: "cloud", Name: "clear-cache", Aliases: []*console.Alias{ - {Name: "cloud:clearcache"}, {Name: "cloud:cc"}, }, Usage: "Clear the CLI cache", @@ -233,6 +232,14 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "refresh",}, }, }, + { + Category: "cloud:app", + Name: "config-validate", + Aliases: []*console.Alias{ + {Name: "app:config-validate", Hidden: true}, + }, + Usage: "Validate the config files of a project", + }, { Category: "cloud:app", Name: "list", @@ -411,7 +418,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:conclude", Hidden: true}, }, - Usage: " ALPHA Conclude a blue/green deployment", + Usage: " ALPHA Conclude a blue/green deployment", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -424,7 +431,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:deploy", Hidden: true}, }, - Usage: " ALPHA Perform a blue/green deployment", + Usage: " ALPHA Perform a blue/green deployment", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -438,7 +445,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:enable", Hidden: true}, }, - Usage: " ALPHA Enable blue/green deployments", + Usage: " ALPHA Enable blue/green deployments", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -964,6 +971,8 @@ var Commands = []*console.Command{ {Name: "environment:relationships", Hidden: true}, {Name: "cloud:relationships"}, {Name: "relationships", Hidden: true}, + {Name: "cloud:rel"}, + {Name: "rel", Hidden: true}, }, Usage: "Show an environment's relationships", Flags: []console.Flag{ @@ -1112,8 +1121,8 @@ var Commands = []*console.Command{ Name: "activity:list", Aliases: []*console.Alias{ {Name: "integration:activity:list", Hidden: true}, - {Name: "cloud:i:act"}, - {Name: "i:act", Hidden: true}, + {Name: "cloud:int:act"}, + {Name: "int:act", Hidden: true}, }, Usage: "Get a list of activities for an integration", Flags: []console.Flag{ @@ -1318,12 +1327,12 @@ var Commands = []*console.Command{ Name: "all", Aliases: []*console.Alias{ {Name: "metrics:all", Hidden: true}, - {Name: "cloud:met"}, - {Name: "met", Hidden: true}, {Name: "cloud:metrics"}, {Name: "metrics", Hidden: true}, + {Name: "cloud:met"}, + {Name: "met", Hidden: true}, }, - Usage: " BETA Show CPU, disk and memory metrics for an environment", + Usage: " BETA Show CPU, disk and memory metrics for an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1348,7 +1357,7 @@ var Commands = []*console.Command{ {Name: "cloud:cpu"}, {Name: "cpu", Hidden: true}, }, - Usage: " BETA Show CPU usage of an environment", + Usage: " BETA Show CPU usage of an environment", Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, @@ -1422,7 +1431,7 @@ var Commands = []*console.Command{ {Name: "cloud:memory"}, {Name: "memory", Hidden: true}, }, - Usage: " BETA Show memory usage of an environment", + Usage: " BETA Show memory usage of an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1536,7 +1545,7 @@ var Commands = []*console.Command{ {Name: "cloud:ops"}, {Name: "ops", Hidden: true}, }, - Usage: " BETA List runtime operations on an environment", + Usage: " BETA List runtime operations on an environment", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1554,7 +1563,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "operation:run", Hidden: true}, }, - Usage: " BETA Run an operation on the environment", + Usage: " BETA Run an operation on the environment", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1684,8 +1693,8 @@ var Commands = []*console.Command{ Name: "subscription:list", Aliases: []*console.Alias{ {Name: "organization:subscription:list", Hidden: true}, - {Name: "cloud:organization:subscriptions"}, - {Name: "organization:subscriptions", Hidden: true}, + {Name: "cloud:org:subs"}, + {Name: "org:subs", Hidden: true}, }, Usage: "List subscriptions within an organization", Flags: []console.Flag{ @@ -1745,8 +1754,8 @@ var Commands = []*console.Command{ Name: "user:list", Aliases: []*console.Alias{ {Name: "organization:user:list", Hidden: true}, - {Name: "cloud:organization:users"}, - {Name: "organization:users", Hidden: true}, + {Name: "cloud:org:users"}, + {Name: "org:users", Hidden: true}, }, Usage: "List organization users", Flags: []console.Flag{ @@ -1818,7 +1827,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environments",}, &console.BoolFlag{Name: "no-set-remote",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "plan", DefaultValue: "development",}, + &console.StringFlag{Name: "plan",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "region",}, &console.BoolFlag{Name: "set-remote",}, @@ -1910,13 +1919,13 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "my",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "page",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "refresh",}, + &console.StringFlag{Name: "region",}, &console.BoolFlag{Name: "reverse",}, &console.StringFlag{Name: "sort", DefaultValue: "title",}, &console.StringFlag{Name: "title",}, @@ -2082,31 +2091,6 @@ var Commands = []*console.Command{ Usage: "Read CLI config", Hidden: console.Hide, }, - { - Category: "cloud:self", - Name: "install", - Usage: "Install or update CLI configuration files", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "shell-type",}, - }, - }, - { - Category: "cloud:self", - Name: "update", - Aliases: []*console.Alias{ - {Name: "cloud:self-update"}, - }, - Usage: "Update the CLI to the latest version", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "current-version",}, - &console.StringFlag{Name: "manifest",}, - &console.BoolFlag{Name: "no-major",}, - &console.StringFlag{Name: "timeout",}, - &console.BoolFlag{Name: "unstable",}, - }, - }, { Category: "cloud:service", Name: "list", @@ -2226,7 +2210,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "session:switch", Hidden: true}, }, - Usage: " BETA Switch between sessions", + Usage: " BETA Switch between sessions", Hidden: console.Hide, }, { @@ -2605,7 +2589,7 @@ var Commands = []*console.Command{ {Name: "cloud:versions"}, {Name: "versions", Hidden: true}, }, - Usage: " ALPHA List environment versions", + Usage: " ALPHA List environment versions", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index af3eceea..f5408679 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -2,11 +2,10 @@ package main import ( "bytes" - "crypto/md5" "encoding/json" "fmt" "os" - "path/filepath" + "os/exec" "sort" "strings" "text/template" @@ -14,7 +13,7 @@ import ( "github.com/mitchellh/go-homedir" "github.com/pkg/errors" "github.com/symfony-cli/console" - "github.com/symfony-cli/symfony-cli/local/php" + "github.com/symfony-cli/symfony-cli/local/platformsh" ) type application struct { @@ -88,10 +87,11 @@ func generateCommands() { if err != nil { panic(err) } - if err := php.InstallPlatformPhar(home); err != nil { + cloudPath, err := platformsh.Install(home) + if err != nil { panic(err.Error()) } - definitionAsString, err := parseCommands(home) + definitionAsString, err := parseCommands(cloudPath) if err != nil { panic(err.Error()) } @@ -110,24 +110,14 @@ func generateCommands() { } -func parseCommands(home string) (string, error) { - dir := filepath.Join(home, ".platformsh", "bin") - var pharPath = filepath.Join(dir, "platform") - hasher := md5.New() - if s, err := os.ReadFile(pharPath); err != nil { - hasher.Write(s) - } - +func parseCommands(cloudPath string) (string, error) { var buf bytes.Buffer - e := &php.Executor{ - BinName: "php", - Args: []string{"php", filepath.Join(dir, "platform"), "list", "--format=json", "--all"}, - } - e.Paths = append([]string{dir}, e.Paths...) - e.Dir = dir - e.Stdout = &buf - if ret := e.Execute(false); ret != 0 { - return "", errors.Errorf("unable to list commands: %s", buf.String()) + var bufErr bytes.Buffer + cmd := exec.Command(cloudPath, "list", "--format=json", "--all") + cmd.Stdout = &buf + cmd.Stderr = &bufErr + if err := cmd.Run(); err != nil { + return "", errors.Errorf("unable to list commands: %s\n%s\n%s", err, bufErr.String(), buf.String()) } // Fix PHP types @@ -138,20 +128,13 @@ func parseCommands(home string) (string, error) { return "", err } - allCommandNames := map[string]bool{} - for _, n := range definition.Namespaces { - for _, name := range n.Commands { - allCommandNames[name] = true - } - // FIXME: missing the aliases here - } - excludedCommands := map[string]bool{ "list": true, "help": true, "self:stats": true, "decode": true, "environment:drush": true, + "project:init": true, } excludedOptions := console.AnsiFlag.Names() @@ -194,16 +177,14 @@ func parseCommands(home string) (string, error) { aliases = append(aliases, fmt.Sprintf("{Name: \"%s\", Hidden: true}", command.Name)) } - cmdAliases, err := getCommandAliases(command.Name, dir) + cmdAliases, err := getCommandAliases(command.Name, cloudPath) if err != nil { return "", err } for _, alias := range cmdAliases { - if allCommandNames[alias] { - aliases = append(aliases, fmt.Sprintf("{Name: \"cloud:%s\"}", alias)) - if namespace != "cloud" && !strings.HasPrefix(command.Name, "self:") { - aliases = append(aliases, fmt.Sprintf("{Name: \"%s\", Hidden: true}", alias)) - } + aliases = append(aliases, fmt.Sprintf("{Name: \"cloud:%s\"}", alias)) + if namespace != "cloud" && !strings.HasPrefix(command.Name, "self:") { + aliases = append(aliases, fmt.Sprintf("{Name: \"%s\", Hidden: true}", alias)) } } if command.Name == "environment:push" { @@ -284,17 +265,17 @@ func parseCommands(home string) (string, error) { return definitionAsString, nil } -func getCommandAliases(name, dir string) ([]string, error) { +func getCommandAliases(name, cloudPath string) ([]string, error) { var buf bytes.Buffer - e := &php.Executor{ - BinName: "php", - Args: []string{"php", filepath.Join(dir, "platform"), name, "--help", "--format=json"}, - } - e.Paths = append([]string{dir}, e.Paths...) - e.Dir = dir - e.Stdout = &buf - if ret := e.Execute(false); ret != 0 { - return nil, errors.Errorf("unable to get definition for command %s: %s", name, buf.String()) + var bufErr bytes.Buffer + c := exec.Command(cloudPath, name, "--help", "--format=json") + c.Stdout = &buf + c.Stderr = &bufErr + if err := c.Run(); err != nil { + // Can currently happen for commands implemented in Go upstream (like app:config-validate) + // FIXME: to be removed once upstream implements --help --format=json for all commands + return []string{}, nil + //return nil, errors.Errorf("unable to get definition for command %s: %s\n%s\n%s", name, err, bufErr.String(), buf.String()) } var cmd command if err := json.Unmarshal(buf.Bytes(), &cmd); err != nil { diff --git a/local/platformsh/installer.go b/local/platformsh/installer.go new file mode 100644 index 00000000..8c1146a1 --- /dev/null +++ b/local/platformsh/installer.go @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2023-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package platformsh + +import ( + "archive/tar" + "compress/gzip" + "encoding/json" + "fmt" + "io" + "net/http" + "os" + "path/filepath" + "strings" + "time" + + "github.com/blackfireio/osinfo" + "github.com/pkg/errors" + "github.com/schollz/progressbar/v3" + "github.com/symfony-cli/terminal" +) + +type githubAsset struct { + Name string + URL string `json:"browser_download_url"` + version string +} + +type versionCheck struct { + CurrentVersion string + Timestamp int64 +} + +// BinaryPath returns the cloud binary path. +func BinaryPath(home string) string { + return filepath.Join(home, ".platformsh", "bin", "platform") +} + +// Install installs or updates the Platform.sh CLI tool. +func Install(home string) (string, error) { + binPath := BinaryPath(home) + versionCheckPath := binPath + ".json" + + // do we already have the binary? + binExists := false + if _, err := os.Stat(binPath); err == nil { + binExists = true + versionCheck := loadVersionCheck(versionCheckPath) + if versionCheck == nil { + // we need to download the bin again as we don't have the version info anymore, so it will never be updated! + goto download + } + // have we checked recently for a new version? + if versionCheck.Timestamp > time.Now().Add(-24*time.Hour).Unix() { + return binPath, nil + } + // don't check for the next 24 hours + versionCheck.store(versionCheckPath) + if asset, err := getLatestVersion(); err == nil { + // no new version + if asset.version == string(versionCheck.CurrentVersion) { + return binPath, nil + } + } + } + +download: + asset, err := getLatestVersion() + if err != nil { + if binExists { + // unable to get the latest version, but we already have a bin, use it + return binPath, nil + } + return "", err + } + if err := downloadAndExtract(asset, binPath); err != nil { + return "", err + } + + versionCheck := versionCheck{CurrentVersion: asset.version} + if err := versionCheck.store(versionCheckPath); err != nil { + return "", err + } + return binPath, nil +} + +func getLatestVersion() (*githubAsset, error) { + spinner := terminal.NewSpinner(terminal.Stderr) + spinner.Start() + defer spinner.Stop() + + resp, err := http.Get("https://api.github.com/repos/platformsh/cli/releases/latest") + if err != nil { + return nil, err + } + defer resp.Body.Close() + if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusBadRequest { + return nil, errors.New(http.StatusText(resp.StatusCode)) + } + manifestBody, err := io.ReadAll(resp.Body) + if err != nil { + return nil, err + } + var manifest struct { + Name string + Assets []*githubAsset + } + if err := json.Unmarshal(manifestBody, &manifest); err != nil { + return nil, err + } + + info, err := osinfo.GetOSInfo() + if err != nil { + return nil, err + } + + var asset *githubAsset + for _, a := range manifest.Assets { + if !strings.HasSuffix(a.Name, ".gz") && !strings.HasSuffix(a.Name, ".zip") { + continue + } + if !strings.Contains(a.Name, "platform") { + continue + } + if (strings.Contains(a.Name, info.Architecture) && strings.Contains(a.Name, info.Family)) || + (strings.Contains(a.Name, "all") && info.Family == "darwin") { + asset = a + break + } + } + if asset == nil { + return nil, errors.New(fmt.Sprintf("unable to find a suitable Platform.sh CLI tool for your machine (%s/%s)", info.Family, info.Architecture)) + } + asset.version = manifest.Name + + return asset, nil +} + +func downloadAndExtract(asset *githubAsset, binPath string) error { + resp, err := http.Get(asset.URL) + if err != nil { + return err + } + if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusBadRequest { + return errors.New(http.StatusText(resp.StatusCode)) + } + + pr, pw := io.Pipe() + errs := make(chan error, 1) + go func() { + bar := progressbar.DefaultBytes(resp.ContentLength, fmt.Sprintf("Downloading Platform.sh CLI version %s", asset.version)) + if _, err := io.Copy(io.MultiWriter(pw, bar), resp.Body); err != nil { + errs <- err + } + _ = bar.Close() + errs <- pw.Close() + }() + + gzr, err := gzip.NewReader(pr) + if err != nil { + return err + } + defer gzr.Close() + + tr := tar.NewReader(gzr) + for { + select { + case err := <-errs: + return err + default: + header, err := tr.Next() + switch { + case err == io.EOF: + return nil + case err != nil: + return err + case header == nil: + continue + default: + if header.Typeflag != tar.TypeReg { + continue + } + if header.Name != "platform" { + continue + } + if _, err := os.Stat(filepath.Dir(binPath)); os.IsNotExist(err) { + if err := os.MkdirAll(filepath.Dir(binPath), 0755); err != nil { + return err + } + } + out, err := os.OpenFile(binPath, os.O_CREATE|os.O_RDWR, os.FileMode(header.Mode)) + if err != nil { + return err + } + if _, err := io.Copy(out, tr); err != nil { + out.Close() + return err + } + return out.Close() + } + } + } +} + +func loadVersionCheck(path string) *versionCheck { + data, err := os.ReadFile(path) + if err != nil { + return nil + } + var versionCheck versionCheck + if err := json.Unmarshal(data, &versionCheck); err != nil { + _ = os.Remove(path) + return nil + } + return &versionCheck +} + +func (versionCheck *versionCheck) store(path string) error { + versionCheck.Timestamp = time.Now().Unix() + data, err := json.Marshal(versionCheck) + if err != nil { + return err + } + return os.WriteFile(path, data, 0644) +} From 009330624c45fe6e6f82491b64fa7b1e3172fc71 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 12:14:51 +0000 Subject: [PATCH 173/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 23ae0e0a..991c58b5 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -246,7 +246,7 @@ var availableServices = []*service{ Type: "varnish", Versions: serviceVersions{ Deprecated: []string{"5.1", "5.2", "6.0", "7.1"}, - Supported: []string{"6.3", "7.2"}, + Supported: []string{"6.3", "7.2", "7.3"}, }, }, { From 6e381ff4ba688a42a4bbe5dd273f7903ac638370 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 14 Oct 2023 09:53:55 +0200 Subject: [PATCH 174/466] Remove obsolete code --- local/platformsh/project.go | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/local/platformsh/project.go b/local/platformsh/project.go index 9e655bc6..c53ab5cd 100644 --- a/local/platformsh/project.go +++ b/local/platformsh/project.go @@ -46,9 +46,9 @@ func ProjectFromDir(dir string, debug bool) (*Project, error) { if projectID == "" { return nil, errors.New("unable to get project root") } - envID, err := potentialCurrentEnvironmentID(projectRoot) - if err != nil { - return nil, errors.Wrap(err, "unable to get current env") + envID := git.GetCurrentBranch(projectRoot) + if envID == "" { + return nil, errors.New("unable to get current env: unable to retrieve the current Git branch name") } app := GuessSelectedAppByDirectory(dir, FindLocalApplications(projectRoot)) if app == nil { @@ -74,14 +74,6 @@ func GetProjectRoot(debug bool) (string, error) { return "", errors.WithStack(ErrProjectRootNotFoundNoGitRemote) } -func potentialCurrentEnvironmentID(cwd string) (string, error) { - for _, potentialEnvironment := range guessCloudBranch(cwd) { - return potentialEnvironment, nil - } - - return "", errors.New("no known git upstream, branch or environment name") -} - func repositoryRootDir(currentDir string) string { for { f, err := os.Stat(filepath.Join(currentDir, ".git")) @@ -130,19 +122,3 @@ func getProjectConfig(projectRoot string, debug bool) string { } return config.ID } - -func guessCloudBranch(cwd string) []string { - localBranch := git.GetCurrentBranch(cwd) - if localBranch == "" { - return []string{} - } - - branches := []string{} - branches = append(branches, localBranch) - - if remoteBranch := git.GetUpstreamBranch(cwd, "origin", "upstream"); remoteBranch != "" { - branches = append(branches, remoteBranch) - } - - return branches -} From ee092ad415173fb9b19a68e454741b73987b7b1d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 14 Oct 2023 09:59:29 +0200 Subject: [PATCH 175/466] Remove guessProjectRoot() --- local/platformsh/project.go | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/local/platformsh/project.go b/local/platformsh/project.go index c53ab5cd..b9440fdd 100644 --- a/local/platformsh/project.go +++ b/local/platformsh/project.go @@ -42,9 +42,13 @@ type Project struct { } func ProjectFromDir(dir string, debug bool) (*Project, error) { - projectRoot, projectID := guessProjectRoot(dir, debug) + projectRoot := repositoryRootDir(dir) + if projectRoot == "" { + return nil, errors.New("unable to get project repository root") + } + projectID := getProjectID(projectRoot, debug) if projectID == "" { - return nil, errors.New("unable to get project root") + return nil, errors.New("unable to get project id") } envID := git.GetCurrentBranch(projectRoot) if envID == "" { @@ -67,7 +71,7 @@ func GetProjectRoot(debug bool) (string, error) { return "", errors.WithStack(err) } - if projectRoot, _ := guessProjectRoot(currentDir, debug); projectRoot != "" { + if projectRoot := repositoryRootDir(currentDir); projectRoot != "" { return projectRoot, nil } @@ -91,19 +95,7 @@ func repositoryRootDir(currentDir string) string { return "" } -func guessProjectRoot(currentDir string, debug bool) (string, string) { - rootDir := repositoryRootDir(currentDir) - if rootDir == "" { - return "", "" - } - config := getProjectConfig(rootDir, debug) - if config == "" { - return "", "" - } - return rootDir, config -} - -func getProjectConfig(projectRoot string, debug bool) string { +func getProjectID(projectRoot string, debug bool) string { contents, err := os.ReadFile(filepath.Join(projectRoot, ".platform", "local", "project.yaml")) if err != nil { if debug { From b6320cdb069d894cb0705744eb7f755736e294dc Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 14 Oct 2023 17:02:35 +0200 Subject: [PATCH 176/466] Move code around --- commands/cloud_env_debug.go | 6 ++ commands/platformsh_hooks.go | 4 +- commands/platformsh_hooks_test.go | 2 +- commands/root.go | 36 +++++------ .../platformsh.go => local/platformsh/cli.go | 63 +++++++++++++------ main.go | 3 +- 6 files changed, 72 insertions(+), 42 deletions(-) rename commands/platformsh.go => local/platformsh/cli.go (77%) diff --git a/commands/cloud_env_debug.go b/commands/cloud_env_debug.go index 872be8d1..2197edbf 100644 --- a/commands/cloud_env_debug.go +++ b/commands/cloud_env_debug.go @@ -6,6 +6,7 @@ import ( "github.com/pkg/errors" "github.com/symfony-cli/console" + "github.com/symfony-cli/symfony-cli/local/platformsh" "github.com/symfony-cli/terminal" ) @@ -25,6 +26,11 @@ var cloudEnvDebugCmd = &console.Command{ spinner.Start() defer spinner.Stop() + psh, err := platformsh.Get() + if err != nil { + return err + } + projectID := c.String("project") if projectID == "" { out, ok := psh.RunInteractive(terminal.Logger, "", []string{"project:info", "id", "-y"}, c.Bool("debug"), nil) diff --git a/commands/platformsh_hooks.go b/commands/platformsh_hooks.go index 82bc80f7..6c0b1f1b 100644 --- a/commands/platformsh_hooks.go +++ b/commands/platformsh_hooks.go @@ -29,7 +29,7 @@ import ( ) var platformshBeforeHooks = map[string]console.BeforeFunc{ - "cloud:environment:push": func(c *console.Context) error { + "environment:push": func(c *console.Context) error { // check that project has a DB and that server version is set properly projectDir, err := getProjectDir(c.String("dir")) if err != nil { @@ -89,7 +89,7 @@ Set the "server_version" parameter to "%s" in "config/packages/doctrine.yaml". return nil }, - "cloud:tunnel:close": func(c *console.Context) error { + "tunnel:close": func(c *console.Context) error { terminal.Eprintln("Stop exposing tunnel service environment variables") app := c.String("app") diff --git a/commands/platformsh_hooks_test.go b/commands/platformsh_hooks_test.go index 0886762e..6d513ee9 100644 --- a/commands/platformsh_hooks_test.go +++ b/commands/platformsh_hooks_test.go @@ -40,7 +40,7 @@ func TestDeployHook(t *testing.T) { "testdata/platformsh/missing-version/": `Set the "server_version" parameter to "14" in "config/packages/doctrine.yaml".`, } { flags.Set("dir", dir) - err := platformshBeforeHooks["cloud:environment:push"](c) + err := platformshBeforeHooks["environment:push"](c) if err == nil { if expected != "" { t.Errorf("TestDeployHook(%q): got %v, expected %v", dir, err, expected) diff --git a/commands/root.go b/commands/root.go index 7b52eda8..f979b156 100644 --- a/commands/root.go +++ b/commands/root.go @@ -22,10 +22,10 @@ package commands import ( "os/exec" "path/filepath" - "sync" "github.com/pkg/errors" "github.com/symfony-cli/console" + "github.com/symfony-cli/symfony-cli/local/platformsh" "github.com/symfony-cli/symfony-cli/reexec" "github.com/symfony-cli/symfony-cli/updater" "github.com/symfony-cli/symfony-cli/util" @@ -33,9 +33,6 @@ import ( ) var ( - psh *platformshCLI - pshOnce sync.Once - dirFlag = &console.StringFlag{Name: "dir", Usage: "Project directory"} projectFlag = &console.StringFlag{Name: "project", Aliases: []string{"p"}, Usage: "The project ID or URL"} environmentFlag = &console.StringFlag{Name: "environment", Aliases: []string{"e"}, Usage: "The environment ID"} @@ -99,30 +96,29 @@ func init() { initCLI() } -func GetPSH() (*platformshCLI, error) { - var err error - pshOnce.Do(func() { - psh, err = NewPlatformShCLI() - if err != nil { - err = errors.Wrap(err, "Unable to setup Platform.sh CLI") - } - }) - return psh, err +func InitAppFunc(c *console.Context) error { + psh, err := platformsh.Get() + if err != nil { + return err + } + for name, f := range platformshBeforeHooks { + psh.AddBeforeHook(name, f) + } + + checkForUpdates(c) + return nil } -func InitAppFunc(c *console.Context) error { +func checkForUpdates(c *console.Context) { if c.App.Channel != "stable" { - return nil + return } // do not run auto-update in the cloud, CI or background jobs if util.InCloud() || !terminal.Stdin.IsInteractive() || reexec.IsChild() { - return nil + return } - updater := updater.NewUpdater(filepath.Join(util.GetHomeDir(), "update"), c.App.ErrWriter, terminal.IsDebug()) updater.CheckForNewVersion(c.App.Version) - - return nil } // WelcomeAction displays a message when no command @@ -146,7 +142,7 @@ func WelcomeAction(c *console.Context) error { terminal.Println("") terminal.Println("Manage a project on Cloud") terminal.Println("") - psh, err := GetPSH() + psh, err := platformsh.Get() if err != nil { return err } diff --git a/commands/platformsh.go b/local/platformsh/cli.go similarity index 77% rename from commands/platformsh.go rename to local/platformsh/cli.go index ffa0c46b..00bec509 100644 --- a/commands/platformsh.go +++ b/local/platformsh/cli.go @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package commands +package platformsh import ( "bytes" @@ -26,24 +26,44 @@ import ( "os" "os/exec" "strings" + "sync" "github.com/kr/pty" "github.com/mitchellh/go-homedir" + "github.com/pkg/errors" "github.com/rs/zerolog" "github.com/symfony-cli/console" - "github.com/symfony-cli/symfony-cli/local/platformsh" "github.com/symfony-cli/symfony-cli/util" ) -type platformshCLI struct { +var ( + psh *CLI + pshOnce sync.Once +) + +type CLI struct { Commands []*console.Command + Hooks map[string]console.BeforeFunc path string } -func NewPlatformShCLI() (*platformshCLI, error) { - p := &platformshCLI{} - for _, command := range platformsh.Commands { +func Get() (*CLI, error) { + var err error + pshOnce.Do(func() { + psh, err = newCLI() + if err != nil { + err = errors.Wrap(err, "Unable to setup Platform.sh CLI") + } + }) + return psh, err +} + +func newCLI() (*CLI, error) { + p := &CLI{ + Hooks: map[string]console.BeforeFunc{}, + } + for _, command := range Commands { command.Action = p.proxyPSHCmd(strings.TrimPrefix(command.Category+":"+command.Name, "cloud:")) command.Args = []*console.Arg{ {Name: "anything", Slice: true, Optional: true}, @@ -52,16 +72,23 @@ func NewPlatformShCLI() (*platformshCLI, error) { &console.BoolFlag{Name: "no", Aliases: []string{"n"}}, &console.BoolFlag{Name: "yes", Aliases: []string{"y"}}, ) - if _, ok := platformshBeforeHooks[command.FullName()]; !ok { + p.Commands = append(p.Commands, command) + } + return p, nil +} + +func (p *CLI) AddBeforeHook(name string, f console.BeforeFunc) { + p.Hooks[name] = f + for _, command := range p.Commands { + if command.FullName() == name { // do not parse flags if we don't have hooks command.FlagParsing = console.FlagParsingSkipped + break } - p.Commands = append(p.Commands, command) } - return p, nil } -func (p *platformshCLI) getPath() string { +func (p *CLI) getPath() string { if p.path != "" { return p.path } @@ -72,16 +99,16 @@ func (p *platformshCLI) getPath() string { } // the Platform.sh CLI is always available on the containers thanks to the configurator - p.path = platformsh.BinaryPath(home) + p.path = BinaryPath(home) if !util.InCloud() { - if cloudPath, err := platformsh.Install(home); err == nil { + if cloudPath, err := Install(home); err == nil { p.path = cloudPath } } return p.path } -func (p *platformshCLI) PSHMainCommands() []*console.Command { +func (p *CLI) PSHMainCommands() []*console.Command { names := map[string]bool{ "cloud:project:list": true, "cloud:environment:list": true, @@ -102,10 +129,10 @@ func (p *platformshCLI) PSHMainCommands() []*console.Command { return mainCmds } -func (p *platformshCLI) proxyPSHCmd(commandName string) console.ActionFunc { +func (p *CLI) proxyPSHCmd(commandName string) console.ActionFunc { return func(commandName string) console.ActionFunc { return func(ctx *console.Context) error { - if hook, ok := platformshBeforeHooks["cloud:"+commandName]; ok && !console.IsHelp(ctx) { + if hook, ok := p.Hooks[commandName]; ok && !console.IsHelp(ctx) { if err := hook(ctx); err != nil { return err } @@ -122,7 +149,7 @@ func (p *platformshCLI) proxyPSHCmd(commandName string) console.ActionFunc { }(commandName) } -func (p *platformshCLI) executor(args []string) *exec.Cmd { +func (p *CLI) executor(args []string) *exec.Cmd { env := []string{ "PLATFORMSH_CLI_APPLICATION_NAME=Platform.sh CLI for Symfony", "PLATFORMSH_CLI_APPLICATION_EXECUTABLE=symfony", @@ -140,7 +167,7 @@ func (p *platformshCLI) executor(args []string) *exec.Cmd { return cmd } -func (p *platformshCLI) RunInteractive(logger zerolog.Logger, projectDir string, args []string, debug bool, stdin io.Reader) (bytes.Buffer, bool) { +func (p *CLI) RunInteractive(logger zerolog.Logger, projectDir string, args []string, debug bool, stdin io.Reader) (bytes.Buffer, bool) { var buf bytes.Buffer cmd := p.executor(args) if projectDir != "" { @@ -163,7 +190,7 @@ func (p *platformshCLI) RunInteractive(logger zerolog.Logger, projectDir string, return buf, true } -func (p *platformshCLI) WrapHelpPrinter() func(w io.Writer, templ string, data interface{}) { +func (p *CLI) WrapHelpPrinter() func(w io.Writer, templ string, data interface{}) { currentHelpPrinter := console.HelpPrinter return func(w io.Writer, templ string, data interface{}) { switch cmd := data.(type) { diff --git a/main.go b/main.go index 7f5d4fe1..550a02b1 100644 --- a/main.go +++ b/main.go @@ -31,6 +31,7 @@ import ( "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/commands" "github.com/symfony-cli/symfony-cli/local/php" + "github.com/symfony-cli/symfony-cli/local/platformsh" "github.com/symfony-cli/terminal" ) @@ -100,7 +101,7 @@ func main() { } cmds := commands.CommonCommands() - psh, err := commands.GetPSH() + psh, err := platformsh.Get() if err != nil { fmt.Fprintln(os.Stderr, err.Error()) os.Exit(1) From abb02a18d3af4a62bc92d96c83ac6fdeaaf5547a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Oct 2023 09:46:13 +0200 Subject: [PATCH 177/466] Fix generated cloud commands --- local/platformsh/commands.go | 76 ++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 1f2295dc..64a161f5 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -53,6 +53,7 @@ var Commands = []*console.Command{ Category: "cloud", Name: "clear-cache", Aliases: []*console.Alias{ + {Name: "cloud:clearcache"}, {Name: "cloud:cc"}, }, Usage: "Clear the CLI cache", @@ -232,14 +233,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "refresh",}, }, }, - { - Category: "cloud:app", - Name: "config-validate", - Aliases: []*console.Alias{ - {Name: "app:config-validate", Hidden: true}, - }, - Usage: "Validate the config files of a project", - }, { Category: "cloud:app", Name: "list", @@ -418,7 +411,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:conclude", Hidden: true}, }, - Usage: " ALPHA Conclude a blue/green deployment", + Usage: " ALPHA Conclude a blue/green deployment", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -431,7 +424,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:deploy", Hidden: true}, }, - Usage: " ALPHA Perform a blue/green deployment", + Usage: " ALPHA Perform a blue/green deployment", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -445,7 +438,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:enable", Hidden: true}, }, - Usage: " ALPHA Enable blue/green deployments", + Usage: " ALPHA Enable blue/green deployments", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -971,8 +964,6 @@ var Commands = []*console.Command{ {Name: "environment:relationships", Hidden: true}, {Name: "cloud:relationships"}, {Name: "relationships", Hidden: true}, - {Name: "cloud:rel"}, - {Name: "rel", Hidden: true}, }, Usage: "Show an environment's relationships", Flags: []console.Flag{ @@ -1121,8 +1112,8 @@ var Commands = []*console.Command{ Name: "activity:list", Aliases: []*console.Alias{ {Name: "integration:activity:list", Hidden: true}, - {Name: "cloud:int:act"}, - {Name: "int:act", Hidden: true}, + {Name: "cloud:i:act"}, + {Name: "i:act", Hidden: true}, }, Usage: "Get a list of activities for an integration", Flags: []console.Flag{ @@ -1327,12 +1318,12 @@ var Commands = []*console.Command{ Name: "all", Aliases: []*console.Alias{ {Name: "metrics:all", Hidden: true}, - {Name: "cloud:metrics"}, - {Name: "metrics", Hidden: true}, {Name: "cloud:met"}, {Name: "met", Hidden: true}, + {Name: "cloud:metrics"}, + {Name: "metrics", Hidden: true}, }, - Usage: " BETA Show CPU, disk and memory metrics for an environment", + Usage: " BETA Show CPU, disk and memory metrics for an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1357,7 +1348,7 @@ var Commands = []*console.Command{ {Name: "cloud:cpu"}, {Name: "cpu", Hidden: true}, }, - Usage: " BETA Show CPU usage of an environment", + Usage: " BETA Show CPU usage of an environment", Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, @@ -1431,7 +1422,7 @@ var Commands = []*console.Command{ {Name: "cloud:memory"}, {Name: "memory", Hidden: true}, }, - Usage: " BETA Show memory usage of an environment", + Usage: " BETA Show memory usage of an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1545,7 +1536,7 @@ var Commands = []*console.Command{ {Name: "cloud:ops"}, {Name: "ops", Hidden: true}, }, - Usage: " BETA List runtime operations on an environment", + Usage: " BETA List runtime operations on an environment", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1563,7 +1554,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "operation:run", Hidden: true}, }, - Usage: " BETA Run an operation on the environment", + Usage: " BETA Run an operation on the environment", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1693,8 +1684,8 @@ var Commands = []*console.Command{ Name: "subscription:list", Aliases: []*console.Alias{ {Name: "organization:subscription:list", Hidden: true}, - {Name: "cloud:org:subs"}, - {Name: "org:subs", Hidden: true}, + {Name: "cloud:organization:subscriptions"}, + {Name: "organization:subscriptions", Hidden: true}, }, Usage: "List subscriptions within an organization", Flags: []console.Flag{ @@ -1754,8 +1745,8 @@ var Commands = []*console.Command{ Name: "user:list", Aliases: []*console.Alias{ {Name: "organization:user:list", Hidden: true}, - {Name: "cloud:org:users"}, - {Name: "org:users", Hidden: true}, + {Name: "cloud:organization:users"}, + {Name: "organization:users", Hidden: true}, }, Usage: "List organization users", Flags: []console.Flag{ @@ -1827,7 +1818,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environments",}, &console.BoolFlag{Name: "no-set-remote",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "plan",}, + &console.StringFlag{Name: "plan", DefaultValue: "development",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "region",}, &console.BoolFlag{Name: "set-remote",}, @@ -1919,13 +1910,13 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "my",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "page",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "refresh",}, - &console.StringFlag{Name: "region",}, &console.BoolFlag{Name: "reverse",}, &console.StringFlag{Name: "sort", DefaultValue: "title",}, &console.StringFlag{Name: "title",}, @@ -2091,6 +2082,31 @@ var Commands = []*console.Command{ Usage: "Read CLI config", Hidden: console.Hide, }, + { + Category: "cloud:self", + Name: "install", + Usage: "Install or update CLI configuration files", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "shell-type",}, + }, + }, + { + Category: "cloud:self", + Name: "update", + Aliases: []*console.Alias{ + {Name: "cloud:self-update"}, + }, + Usage: "Update the CLI to the latest version", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "current-version",}, + &console.StringFlag{Name: "manifest",}, + &console.BoolFlag{Name: "no-major",}, + &console.StringFlag{Name: "timeout",}, + &console.BoolFlag{Name: "unstable",}, + }, + }, { Category: "cloud:service", Name: "list", @@ -2210,7 +2226,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "session:switch", Hidden: true}, }, - Usage: " BETA Switch between sessions", + Usage: " BETA Switch between sessions", Hidden: console.Hide, }, { @@ -2589,7 +2605,7 @@ var Commands = []*console.Command{ {Name: "cloud:versions"}, {Name: "versions", Hidden: true}, }, - Usage: " ALPHA List environment versions", + Usage: " ALPHA List environment versions", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, From e15209e9bffbe7e13451527e060a13c5ab6d1ea5 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Oct 2023 09:52:12 +0200 Subject: [PATCH 178/466] Bump deps --- go.mod | 28 ++++++++++++++-------------- go.sum | 59 ++++++++++++++++++++++++++++------------------------------ 2 files changed, 42 insertions(+), 45 deletions(-) diff --git a/go.mod b/go.mod index 4a20a0c0..18ae43a6 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,13 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.4 - github.com/compose-spec/compose-go v1.18.4 + github.com/compose-spec/compose-go v1.19.0 github.com/docker/docker v24.0.6+incompatible github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 - github.com/hashicorp/golang-lru/arc/v2 v2.0.6 + github.com/hashicorp/golang-lru/arc/v2 v2.0.7 github.com/hpcloud/tail v1.0.0 github.com/joho/godotenv v1.5.1 github.com/kr/pty v1.1.8 @@ -17,7 +17,7 @@ require ( github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 github.com/rs/xid v1.5.0 - github.com/rs/zerolog v1.30.0 + github.com/rs/zerolog v1.31.0 github.com/schollz/progressbar/v3 v3.13.1 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 @@ -27,7 +27,7 @@ require ( github.com/symfony-cli/phpstore v1.0.10 github.com/symfony-cli/terminal v1.0.4 github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 - golang.org/x/sync v0.3.0 + golang.org/x/sync v0.4.0 golang.org/x/text v0.13.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 @@ -37,14 +37,14 @@ require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/creack/pty v1.1.18 // indirect github.com/distribution/reference v0.5.0 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.6 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -57,7 +57,7 @@ require ( github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc4 // indirect + github.com/opencontainers/image-spec v1.1.0-rc5 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect @@ -65,14 +65,14 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/mod v0.13.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.14.0 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index e1e22e4e..f9753deb 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/blackfireio/osinfo v1.0.4 h1:lQVXqDh+UDFZa9ZzTv/ReyBfu+vXMkjqeGO5CEwbCTs= github.com/blackfireio/osinfo v1.0.4/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA= -github.com/compose-spec/compose-go v1.18.4 h1:yLYfsc3ATAYZVAJcXyx/V847/JVBmf3pfKfR13mXU4s= -github.com/compose-spec/compose-go v1.18.4/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= +github.com/compose-spec/compose-go v1.19.0 h1:t68gAcwStDg0hy2kFvqHJIksf6xkqRnlSKfL45/ETqo= +github.com/compose-spec/compose-go v1.19.0/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -18,8 +18,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= +github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.6+incompatible h1:hceabKCtUgDqPu+qm0NgsaXf28Ljf4/pWFL7xjWWDgE= github.com/docker/docker v24.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= @@ -47,10 +47,10 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru/arc/v2 v2.0.6 h1:4NU7uP5vSoK6TbaMj3NtY478TTAWLso/vL1gpNrInHg= -github.com/hashicorp/golang-lru/arc/v2 v2.0.6/go.mod h1:cfdDIX05DWvYV6/shsxDfa/OVcRieOt+q4FnM8x+Xno= -github.com/hashicorp/golang-lru/v2 v2.0.6 h1:3xi/Cafd1NaoEnS/yDssIiuVeDVywU0QdFGl3aQaQHM= -github.com/hashicorp/golang-lru/v2 v2.0.6/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/golang-lru/arc/v2 v2.0.7 h1:QxkVTxwColcduO+LP7eJO56r2hFiG8zEbfAAzRv52KQ= +github.com/hashicorp/golang-lru/arc/v2 v2.0.7/go.mod h1:Pe7gBlGdc8clY5LJ0LpJXMt5AmgmWNH1g+oFFVUHOEc= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= @@ -70,10 +70,8 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= @@ -98,8 +96,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0= -github.com/opencontainers/image-spec v1.1.0-rc4/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -116,8 +114,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= -github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= +github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= +github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -155,41 +153,40 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec 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.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= 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.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= @@ -200,8 +197,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= 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= From 312c45e1342fe0c514cbe2fd6d55836d7a59b372 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Oct 2023 10:15:01 +0200 Subject: [PATCH 179/466] Fix cloud CLI executor --- local/platformsh/cli.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/local/platformsh/cli.go b/local/platformsh/cli.go index 00bec509..7426c8e4 100644 --- a/local/platformsh/cli.go +++ b/local/platformsh/cli.go @@ -28,7 +28,6 @@ import ( "strings" "sync" - "github.com/kr/pty" "github.com/mitchellh/go-homedir" "github.com/pkg/errors" "github.com/rs/zerolog" @@ -137,14 +136,7 @@ func (p *CLI) proxyPSHCmd(commandName string) console.ActionFunc { return err } } - - cmd := p.executor(append([]string{ctx.Command.UserName}, ctx.Args().Slice()...)) - f, err := pty.Start(cmd) - if err != nil { - return err - } - _, err = io.Copy(cmd.Stdout, f) - return err + return p.executor(append([]string{ctx.Command.UserName}, ctx.Args().Slice()...)).Run() } }(commandName) } @@ -164,6 +156,7 @@ func (p *CLI) executor(args []string) *exec.Cmd { cmd.Env = append(os.Environ(), env...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr + cmd.Stdin = os.Stdin return cmd } From 85e79415874a06cfee09026536d61a723b6e177d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Oct 2023 10:17:28 +0200 Subject: [PATCH 180/466] Remove obsolete dep --- go.mod | 2 -- go.sum | 5 ----- 2 files changed, 7 deletions(-) diff --git a/go.mod b/go.mod index 18ae43a6..e4273a48 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/hashicorp/golang-lru/arc/v2 v2.0.7 github.com/hpcloud/tail v1.0.0 github.com/joho/godotenv v1.5.1 - github.com/kr/pty v1.1.8 github.com/mitchellh/go-homedir v1.1.0 github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 @@ -35,7 +34,6 @@ require ( require ( github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/creack/pty v1.1.18 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect diff --git a/go.sum b/go.sum index f9753deb..14494153 100644 --- a/go.sum +++ b/go.sum @@ -9,10 +9,7 @@ github.com/blackfireio/osinfo v1.0.4/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxo github.com/compose-spec/compose-go v1.19.0 h1:t68gAcwStDg0hy2kFvqHJIksf6xkqRnlSKfL45/ETqo= github.com/compose-spec/compose-go v1.19.0/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= -github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -65,8 +62,6 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= From aa5915518bd5ed409e225fb70cc74fb378d3cb5d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 08:11:21 +0000 Subject: [PATCH 181/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 76 ++++++++++++++---------------------- 1 file changed, 30 insertions(+), 46 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 64a161f5..1f2295dc 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -53,7 +53,6 @@ var Commands = []*console.Command{ Category: "cloud", Name: "clear-cache", Aliases: []*console.Alias{ - {Name: "cloud:clearcache"}, {Name: "cloud:cc"}, }, Usage: "Clear the CLI cache", @@ -233,6 +232,14 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "refresh",}, }, }, + { + Category: "cloud:app", + Name: "config-validate", + Aliases: []*console.Alias{ + {Name: "app:config-validate", Hidden: true}, + }, + Usage: "Validate the config files of a project", + }, { Category: "cloud:app", Name: "list", @@ -411,7 +418,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:conclude", Hidden: true}, }, - Usage: " ALPHA Conclude a blue/green deployment", + Usage: " ALPHA Conclude a blue/green deployment", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -424,7 +431,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:deploy", Hidden: true}, }, - Usage: " ALPHA Perform a blue/green deployment", + Usage: " ALPHA Perform a blue/green deployment", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -438,7 +445,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "blue-green:enable", Hidden: true}, }, - Usage: " ALPHA Enable blue/green deployments", + Usage: " ALPHA Enable blue/green deployments", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -964,6 +971,8 @@ var Commands = []*console.Command{ {Name: "environment:relationships", Hidden: true}, {Name: "cloud:relationships"}, {Name: "relationships", Hidden: true}, + {Name: "cloud:rel"}, + {Name: "rel", Hidden: true}, }, Usage: "Show an environment's relationships", Flags: []console.Flag{ @@ -1112,8 +1121,8 @@ var Commands = []*console.Command{ Name: "activity:list", Aliases: []*console.Alias{ {Name: "integration:activity:list", Hidden: true}, - {Name: "cloud:i:act"}, - {Name: "i:act", Hidden: true}, + {Name: "cloud:int:act"}, + {Name: "int:act", Hidden: true}, }, Usage: "Get a list of activities for an integration", Flags: []console.Flag{ @@ -1318,12 +1327,12 @@ var Commands = []*console.Command{ Name: "all", Aliases: []*console.Alias{ {Name: "metrics:all", Hidden: true}, - {Name: "cloud:met"}, - {Name: "met", Hidden: true}, {Name: "cloud:metrics"}, {Name: "metrics", Hidden: true}, + {Name: "cloud:met"}, + {Name: "met", Hidden: true}, }, - Usage: " BETA Show CPU, disk and memory metrics for an environment", + Usage: " BETA Show CPU, disk and memory metrics for an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1348,7 +1357,7 @@ var Commands = []*console.Command{ {Name: "cloud:cpu"}, {Name: "cpu", Hidden: true}, }, - Usage: " BETA Show CPU usage of an environment", + Usage: " BETA Show CPU usage of an environment", Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, @@ -1422,7 +1431,7 @@ var Commands = []*console.Command{ {Name: "cloud:memory"}, {Name: "memory", Hidden: true}, }, - Usage: " BETA Show memory usage of an environment", + Usage: " BETA Show memory usage of an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1536,7 +1545,7 @@ var Commands = []*console.Command{ {Name: "cloud:ops"}, {Name: "ops", Hidden: true}, }, - Usage: " BETA List runtime operations on an environment", + Usage: " BETA List runtime operations on an environment", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1554,7 +1563,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "operation:run", Hidden: true}, }, - Usage: " BETA Run an operation on the environment", + Usage: " BETA Run an operation on the environment", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1684,8 +1693,8 @@ var Commands = []*console.Command{ Name: "subscription:list", Aliases: []*console.Alias{ {Name: "organization:subscription:list", Hidden: true}, - {Name: "cloud:organization:subscriptions"}, - {Name: "organization:subscriptions", Hidden: true}, + {Name: "cloud:org:subs"}, + {Name: "org:subs", Hidden: true}, }, Usage: "List subscriptions within an organization", Flags: []console.Flag{ @@ -1745,8 +1754,8 @@ var Commands = []*console.Command{ Name: "user:list", Aliases: []*console.Alias{ {Name: "organization:user:list", Hidden: true}, - {Name: "cloud:organization:users"}, - {Name: "organization:users", Hidden: true}, + {Name: "cloud:org:users"}, + {Name: "org:users", Hidden: true}, }, Usage: "List organization users", Flags: []console.Flag{ @@ -1818,7 +1827,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environments",}, &console.BoolFlag{Name: "no-set-remote",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "plan", DefaultValue: "development",}, + &console.StringFlag{Name: "plan",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "region",}, &console.BoolFlag{Name: "set-remote",}, @@ -1910,13 +1919,13 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "host",}, &console.BoolFlag{Name: "my",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "page",}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "refresh",}, + &console.StringFlag{Name: "region",}, &console.BoolFlag{Name: "reverse",}, &console.StringFlag{Name: "sort", DefaultValue: "title",}, &console.StringFlag{Name: "title",}, @@ -2082,31 +2091,6 @@ var Commands = []*console.Command{ Usage: "Read CLI config", Hidden: console.Hide, }, - { - Category: "cloud:self", - Name: "install", - Usage: "Install or update CLI configuration files", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "shell-type",}, - }, - }, - { - Category: "cloud:self", - Name: "update", - Aliases: []*console.Alias{ - {Name: "cloud:self-update"}, - }, - Usage: "Update the CLI to the latest version", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "current-version",}, - &console.StringFlag{Name: "manifest",}, - &console.BoolFlag{Name: "no-major",}, - &console.StringFlag{Name: "timeout",}, - &console.BoolFlag{Name: "unstable",}, - }, - }, { Category: "cloud:service", Name: "list", @@ -2226,7 +2210,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "session:switch", Hidden: true}, }, - Usage: " BETA Switch between sessions", + Usage: " BETA Switch between sessions", Hidden: console.Hide, }, { @@ -2605,7 +2589,7 @@ var Commands = []*console.Command{ {Name: "cloud:versions"}, {Name: "versions", Hidden: true}, }, - Usage: " ALPHA List environment versions", + Usage: " ALPHA List environment versions", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, From a319bcbc481c5c1ac21382d56ac1f6b601a1b82e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 9 Jan 2023 12:41:30 +0100 Subject: [PATCH 182/466] Add Upsun support --- commands/cloud_env_debug.go | 21 +-- commands/init_templating.go | 9 +- commands/local_new.go | 8 +- commands/project_init.go | 4 +- commands/root.go | 2 +- local/platformsh/applications.go | 2 + local/platformsh/brand.go | 70 ++++++++ local/platformsh/cli.go | 24 +-- local/platformsh/commands.go | 237 +++++++++++++++++++++++++ local/platformsh/generator/commands.go | 5 +- local/platformsh/installer.go | 28 +-- local/platformsh/project.go | 8 +- 12 files changed, 374 insertions(+), 44 deletions(-) create mode 100644 local/platformsh/brand.go diff --git a/commands/cloud_env_debug.go b/commands/cloud_env_debug.go index 2197edbf..b0f1f118 100644 --- a/commands/cloud_env_debug.go +++ b/commands/cloud_env_debug.go @@ -30,24 +30,25 @@ var cloudEnvDebugCmd = &console.Command{ if err != nil { return err } + prefix := platformsh.GuessCloudFromCommandName(c.Command.UserName).CommandPrefix projectID := c.String("project") if projectID == "" { - out, ok := psh.RunInteractive(terminal.Logger, "", []string{"project:info", "id", "-y"}, c.Bool("debug"), nil) + out, ok := psh.RunInteractive(terminal.Logger, "", []string{prefix + "project:info", "id", "-y"}, c.Bool("debug"), nil) if !ok { return errors.New("Unable to detect the project") } projectID = strings.TrimSpace(out.String()) } - out, ok := psh.RunInteractive(terminal.Logger, "", []string{"project:info", "default_branch", "--project=" + projectID, "-y"}, c.Bool("debug"), nil) + out, ok := psh.RunInteractive(terminal.Logger, "", []string{prefix + "project:info", "default_branch", "--project=" + projectID, "-y"}, c.Bool("debug"), nil) if !ok { return errors.New("Unable to detect the default branch name") } defaultEnvName := strings.TrimSpace(out.String()) envName := c.String("environment") if envName == "" { - if out, ok := psh.RunInteractive(terminal.Logger, "", []string{"env:info", "id", "--project=" + projectID, "-y"}, false, nil); ok { + if out, ok := psh.RunInteractive(terminal.Logger, "", []string{prefix + "env:info", "id", "--project=" + projectID, "-y"}, false, nil); ok { envName = strings.TrimSpace(out.String()) } else { envName = defaultEnvName @@ -63,12 +64,12 @@ var cloudEnvDebugCmd = &console.Command{ if c.Bool("off") { terminal.Println("Deleting APP_ENV and APP_DEBUG (can take some time, --debug to tail commands)") - if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, "var:delete", "env:APP_ENV"), c.Bool("debug"), nil); !ok { + if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, prefix+"var:delete", "env:APP_ENV"), c.Bool("debug"), nil); !ok { if !strings.Contains(out.String(), "Variable not found") { return errors.New("An error occurred while removing APP_ENV") } } - if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, "var:delete", "env:APP_DEBUG"), c.Bool("debug"), nil); !ok { + if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, prefix+"var:delete", "env:APP_DEBUG"), c.Bool("debug"), nil); !ok { if !strings.Contains(out.String(), "Variable not found") { return errors.New("An error occurred while removing APP_DEBUG") } @@ -77,7 +78,7 @@ var cloudEnvDebugCmd = &console.Command{ return nil } - out, ok = psh.RunInteractive(terminal.Logger, "", []string{"project:info", "default_domain", "--project=" + projectID, "-y"}, c.Bool("debug"), nil) + out, ok = psh.RunInteractive(terminal.Logger, "", []string{prefix + "project:info", "default_domain", "--project=" + projectID, "-y"}, c.Bool("debug"), nil) if !ok { return errors.New("Unable to detect the default domain") } @@ -89,21 +90,21 @@ var cloudEnvDebugCmd = &console.Command{ } terminal.Println("Setting APP_ENV and APP_DEBUG to dev/debug (can take some time, --debug to tail commands)") - if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, "var:create", "--name=env:APP_ENV", "--value=dev"), c.Bool("debug"), nil); !ok { + if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, prefix+"var:create", "--name=env:APP_ENV", "--value=dev"), c.Bool("debug"), nil); !ok { if !strings.Contains(out.String(), "already exists on the environment") { return errors.New("An error occurred while adding APP_ENV") } - if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, "var:update", "--value=dev", "env:APP_ENV"), c.Bool("debug"), nil); !ok { + if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, prefix+"var:update", "--value=dev", "env:APP_ENV"), c.Bool("debug"), nil); !ok { if !strings.Contains(out.String(), "No changes were provided") { return errors.New("An error occurred while adding APP_ENV") } } } - if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, "var:create", "--name=env:APP_DEBUG", "--value=1"), c.Bool("debug"), nil); !ok { + if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, prefix+"var:create", "--name=env:APP_DEBUG", "--value=1"), c.Bool("debug"), nil); !ok { if !strings.Contains(out.String(), "already exists on the environment") { return errors.New("An error occurred while adding APP_DEBUG") } - if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, "var:update", "--value=1", "env:APP_DEBUG"), c.Bool("debug"), nil); !ok { + if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, prefix+"var:update", "--value=1", "env:APP_DEBUG"), c.Bool("debug"), nil); !ok { if !strings.Contains(out.String(), "No changes were provided") { return errors.New("An error occurred while adding APP_DEBUG") } diff --git a/commands/init_templating.go b/commands/init_templating.go index 7ac1b258..13bc8754 100644 --- a/commands/init_templating.go +++ b/commands/init_templating.go @@ -47,9 +47,9 @@ type nopCloser struct { func (nopCloser) Close() error { return nil } -func createRequiredFilesProject(rootDirectory, projectSlug, templateName string, minorPHPVersion string, cloudServices []*CloudService, dump, force bool) ([]string, error) { +func createRequiredFilesProject(brand platformsh.CloudBrand, rootDirectory, projectSlug, templateName string, minorPHPVersion string, cloudServices []*CloudService, dump, force bool) ([]string, error) { createdFiles := []string{} - templates, err := getTemplates(rootDirectory, templateName, minorPHPVersion) + templates, err := getTemplates(brand, rootDirectory, templateName, minorPHPVersion) if err != nil { return nil, errors.Wrap(err, "could not determine template to use") } @@ -158,7 +158,7 @@ func isValidFilePath(toTest string) bool { return true } -func getTemplates(rootDirectory, chosenTemplateName string, minorPHPVersion string) (map[string]*template.Template, error) { +func getTemplates(brand platformsh.CloudBrand, rootDirectory, chosenTemplateName string, minorPHPVersion string) (map[string]*template.Template, error) { var foundTemplate *configTemplate s := terminal.NewSpinner(terminal.Stderr) @@ -186,6 +186,9 @@ func getTemplates(rootDirectory, chosenTemplateName string, minorPHPVersion stri } } + if brand == platformsh.UpsunBrand { + chosenTemplateName = filepath.Join(brand.Slug, chosenTemplateName) + } if isURL, isFile := isValidURL(chosenTemplateName), isValidFilePath(chosenTemplateName); isURL || isFile { var ( templateConfigBytes []byte diff --git a/commands/local_new.go b/commands/local_new.go index 7955074c..7d335c29 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -211,7 +211,9 @@ func isEmpty(dir string) (bool, error) { } func initCloud(c *console.Context, s *terminal.Spinner, minorPHPVersion, dir string) error { - terminal.Println("* Adding Platform.sh configuration") + brand := platformsh.GuessCloudFromCommandName(c.Command.UserName) + + terminal.Printfln("* Adding %s configuration", brand) cloudServices, err := parseCloudServices(dir, c.StringSlice("service")) if err != nil { @@ -219,12 +221,12 @@ func initCloud(c *console.Context, s *terminal.Spinner, minorPHPVersion, dir str } // FIXME: display or hide output based on debug flag - _, err = createRequiredFilesProject(dir, "app", "", minorPHPVersion, cloudServices, c.Bool("dump"), c.Bool("force")) + _, err = createRequiredFilesProject(brand, dir, "app", "", minorPHPVersion, cloudServices, c.Bool("dump"), c.Bool("force")) if err != nil { return err } - buf, err := git.AddAndCommit(dir, []string{"."}, "Add Platform.sh configuration", c.Bool("debug")) + buf, err := git.AddAndCommit(dir, []string{"."}, fmt.Sprintf("Add %s configuration", brand), c.Bool("debug")) if err != nil { fmt.Print(buf.String()) } diff --git a/commands/project_init.go b/commands/project_init.go index ffcbd4c0..f7c40f0f 100644 --- a/commands/project_init.go +++ b/commands/project_init.go @@ -28,6 +28,7 @@ import ( "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/git" + "github.com/symfony-cli/symfony-cli/local/platformsh" "github.com/symfony-cli/terminal" ) @@ -79,7 +80,8 @@ Templates used by this tool are fetched from ` + templatesGitRepository + `. return err } - createdFiles, err := createRequiredFilesProject(projectDir, slug, c.String("template"), minorPHPVersion, cloudServices, c.Bool("dump"), c.Bool("force")) + brand := platformsh.GuessCloudFromCommandName(c.Command.UserName) + createdFiles, err := createRequiredFilesProject(brand, projectDir, slug, c.String("template"), minorPHPVersion, cloudServices, c.Bool("dump"), c.Bool("force")) if err != nil { return err } diff --git a/commands/root.go b/commands/root.go index f979b156..7e36f634 100644 --- a/commands/root.go +++ b/commands/root.go @@ -167,7 +167,7 @@ func initCLI() { console.AppHelpTemplate += ` Available wrappers: Runs PHP (version depends on project's configuration). -Environment variables to use Platform.sh relationships or Docker services are automatically defined. +Environment variables to use Platform.sh/Upsun relationships or Docker services are automatically defined. {{with .Command "composer"}} {{.PreferredName}}{{"\t"}}{{.Usage}}{{end}} {{with .Command "console"}} {{.PreferredName}}{{"\t"}}{{.Usage}}{{end}} diff --git a/local/platformsh/applications.go b/local/platformsh/applications.go index 9a39db2c..ffe0bd5c 100644 --- a/local/platformsh/applications.go +++ b/local/platformsh/applications.go @@ -29,6 +29,8 @@ import ( yaml "gopkg.in/yaml.v2" ) +// FIXME: update the logic for Upsun + var skippedDirectories = map[string]interface{}{ ".git": nil, "vendor": nil, diff --git a/local/platformsh/brand.go b/local/platformsh/brand.go new file mode 100644 index 00000000..459ac1df --- /dev/null +++ b/local/platformsh/brand.go @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package platformsh + +import ( + "os" + "strings" +) + +type CloudBrand struct { + Name string + Slug string + CommandPrefix string + CLIPrefix string +} + +var UpsunBrand = CloudBrand{ + Name: "Upsun", + Slug: "upsun", + CommandPrefix: "upsun:", + CLIPrefix: "UPSUN_CLI_", +} +var PlatformshBrand = CloudBrand{ + Name: "Platform.sh", + Slug: "platformsh", + CommandPrefix: "cloud:", + CLIPrefix: "PLATFORMSH_CLI_", +} + +func (b CloudBrand) String() string { + return b.Name +} + +func GuessCloudFromCommandName(name string) CloudBrand { + // if the namespace is upsun, then that's the brand we want to use + if strings.HasPrefix(name, "upsun:") { + return UpsunBrand + } + + // FIXME: maybe there is something better by passing the dir to this function + dir, err := os.Getwd() + if err != nil { + return PlatformshBrand + } + + return GuessCloudFromDirectory(dir) +} + +func GuessCloudFromDirectory(dir string) CloudBrand { + // determine the brand when in a project directory with cloud configuration + // FIXME: determine based on the current directory project + return PlatformshBrand +} diff --git a/local/platformsh/cli.go b/local/platformsh/cli.go index 7426c8e4..1f9202bb 100644 --- a/local/platformsh/cli.go +++ b/local/platformsh/cli.go @@ -22,6 +22,7 @@ package platformsh import ( "bytes" _ "embed" + "fmt" "io" "os" "os/exec" @@ -87,7 +88,7 @@ func (p *CLI) AddBeforeHook(name string, f console.BeforeFunc) { } } -func (p *CLI) getPath() string { +func (p *CLI) getPath(brand string) string { if p.path != "" { return p.path } @@ -98,9 +99,9 @@ func (p *CLI) getPath() string { } // the Platform.sh CLI is always available on the containers thanks to the configurator - p.path = BinaryPath(home) + p.path = BinaryPath(home, brand) if !util.InCloud() { - if cloudPath, err := Install(home); err == nil { + if cloudPath, err := Install(home, brand); err == nil { p.path = cloudPath } } @@ -142,17 +143,20 @@ func (p *CLI) proxyPSHCmd(commandName string) console.ActionFunc { } func (p *CLI) executor(args []string) *exec.Cmd { + brand := GuessCloudFromCommandName(args[0]) + prefix := brand.CLIPrefix + env := []string{ - "PLATFORMSH_CLI_APPLICATION_NAME=Platform.sh CLI for Symfony", - "PLATFORMSH_CLI_APPLICATION_EXECUTABLE=symfony", + fmt.Sprintf("%sAPPLICATION_NAME=%s CLI for Symfony", prefix, brand), + fmt.Sprintf("%sAPPLICATION_EXECUTABLE=symfony", prefix), "XDEBUG_MODE=off", - "PLATFORMSH_CLI_WRAPPED=1", + fmt.Sprintf("%sWRAPPED=1", prefix), } if util.InCloud() { - env = append(env, "PLATFORMSH_CLI_UPDATES_CHECK=0") + env = append(env, fmt.Sprintf("%sUPDATES_CHECK=0", prefix)) } - args[0] = strings.TrimPrefix(args[0], "cloud:") - cmd := exec.Command(p.getPath(), args...) + args[0] = strings.TrimPrefix(strings.TrimPrefix(args[0], "upsun:"), "cloud:") + cmd := exec.Command(p.getPath(brand.Slug), args...) cmd.Env = append(os.Environ(), env...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr @@ -176,7 +180,7 @@ func (p *CLI) RunInteractive(logger zerolog.Logger, projectDir string, args []st if stdin != nil { cmd.Stdin = stdin } - logger.Debug().Str("cmd", strings.Join(cmd.Args, " ")).Msg("Executing Platform.sh CLI command interactively") + logger.Debug().Str("cmd", strings.Join(cmd.Args, " ")).Msgf("Executing %s CLI command interactively", GuessCloudFromCommandName(args[0])) if err := cmd.Run(); err != nil { return buf, false } diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 1f2295dc..f879b7de 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -30,6 +30,9 @@ var Commands = []*console.Command{ { Category: "cloud", Name: "_completion", + Aliases: []*console.Alias{ + {Name: "upsun:_completion", Hidden: true}, + }, Usage: "BASH completion hook.", Hidden: console.Hide, Flags: []console.Flag{ @@ -42,6 +45,9 @@ var Commands = []*console.Command{ { Category: "cloud", Name: "bot", + Aliases: []*console.Alias{ + {Name: "upsun:bot", Hidden: true}, + }, Usage: "The Platform.sh Bot", Hidden: console.Hide, Flags: []console.Flag{ @@ -53,13 +59,18 @@ var Commands = []*console.Command{ Category: "cloud", Name: "clear-cache", Aliases: []*console.Alias{ + {Name: "upsun:clear-cache", Hidden: true}, {Name: "cloud:cc"}, + {Name: "upsun:cc", Hidden: true}, }, Usage: "Clear the CLI cache", }, { Category: "cloud", Name: "docs", + Aliases: []*console.Alias{ + {Name: "upsun:docs", Hidden: true}, + }, Usage: "Open the online documentation", Flags: []console.Flag{ &console.StringFlag{Name: "browser",}, @@ -69,6 +80,9 @@ var Commands = []*console.Command{ { Category: "cloud", Name: "legacy-migrate", + Aliases: []*console.Alias{ + {Name: "upsun:legacy-migrate", Hidden: true}, + }, Usage: "Migrate from the legacy file structure", Hidden: console.Hide, Flags: []console.Flag{ @@ -78,6 +92,9 @@ var Commands = []*console.Command{ { Category: "cloud", Name: "multi", + Aliases: []*console.Alias{ + {Name: "upsun:multi", Hidden: true}, + }, Usage: "Execute a command on multiple projects", Flags: []console.Flag{ &console.BoolFlag{Name: "continue",}, @@ -89,6 +106,9 @@ var Commands = []*console.Command{ { Category: "cloud", Name: "web", + Aliases: []*console.Alias{ + {Name: "upsun:web", Hidden: true}, + }, Usage: "Open the project in the Web Console", Flags: []console.Flag{ &console.StringFlag{Name: "browser",}, @@ -100,12 +120,18 @@ var Commands = []*console.Command{ { Category: "cloud", Name: "welcome", + Aliases: []*console.Alias{ + {Name: "upsun:welcome", Hidden: true}, + }, Usage: "Welcome to Platform.sh", Hidden: console.Hide, }, { Category: "cloud", Name: "winky", + Aliases: []*console.Alias{ + {Name: "upsun:winky", Hidden: true}, + }, Usage: "", Hidden: console.Hide, }, @@ -114,6 +140,7 @@ var Commands = []*console.Command{ Name: "cancel", Aliases: []*console.Alias{ {Name: "activity:cancel", Hidden: true}, + {Name: "upsun:activity:cancel", Hidden: true}, }, Usage: "Cancel an activity", Flags: []console.Flag{ @@ -129,6 +156,7 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "activity:get", Hidden: true}, + {Name: "upsun:activity:get", Hidden: true}, }, Usage: "View detailed information on a single activity", Flags: []console.Flag{ @@ -152,9 +180,12 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "activity:list", Hidden: true}, + {Name: "upsun:activity:list", Hidden: true}, {Name: "cloud:activities"}, + {Name: "upsun:activities", Hidden: true}, {Name: "activities", Hidden: true}, {Name: "cloud:act"}, + {Name: "upsun:act", Hidden: true}, {Name: "act", Hidden: true}, }, Usage: "Get a list of activities for an environment or project", @@ -180,6 +211,7 @@ var Commands = []*console.Command{ Name: "log", Aliases: []*console.Alias{ {Name: "activity:log", Hidden: true}, + {Name: "upsun:activity:log", Hidden: true}, }, Usage: "Display the log for an activity", Flags: []console.Flag{ @@ -201,6 +233,7 @@ var Commands = []*console.Command{ Name: "curl", Aliases: []*console.Alias{ {Name: "api:curl", Hidden: true}, + {Name: "upsun:api:curl", Hidden: true}, }, Usage: "Run an authenticated cURL request on the Platform.sh API", Hidden: console.Hide, @@ -221,6 +254,7 @@ var Commands = []*console.Command{ Name: "config-get", Aliases: []*console.Alias{ {Name: "app:config-get", Hidden: true}, + {Name: "upsun:app:config-get", Hidden: true}, }, Usage: "View the configuration of an app", Flags: []console.Flag{ @@ -237,6 +271,7 @@ var Commands = []*console.Command{ Name: "config-validate", Aliases: []*console.Alias{ {Name: "app:config-validate", Hidden: true}, + {Name: "upsun:app:config-validate", Hidden: true}, }, Usage: "Validate the config files of a project", }, @@ -245,7 +280,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "app:list", Hidden: true}, + {Name: "upsun:app:list", Hidden: true}, {Name: "cloud:apps"}, + {Name: "upsun:apps", Hidden: true}, {Name: "apps", Hidden: true}, }, Usage: "List apps in the project", @@ -264,6 +301,7 @@ var Commands = []*console.Command{ Name: "api-token-login", Aliases: []*console.Alias{ {Name: "auth:api-token-login", Hidden: true}, + {Name: "upsun:auth:api-token-login", Hidden: true}, }, Usage: "Log in to Platform.sh using an API token", }, @@ -272,7 +310,9 @@ var Commands = []*console.Command{ Name: "browser-login", Aliases: []*console.Alias{ {Name: "auth:browser-login", Hidden: true}, + {Name: "upsun:auth:browser-login", Hidden: true}, {Name: "cloud:login"}, + {Name: "upsun:login", Hidden: true}, {Name: "login", Hidden: true}, }, Usage: "Log in to Platform.sh via a browser", @@ -287,6 +327,7 @@ var Commands = []*console.Command{ Name: "info", Aliases: []*console.Alias{ {Name: "auth:info", Hidden: true}, + {Name: "upsun:auth:info", Hidden: true}, }, Usage: "Display your account information", Flags: []console.Flag{ @@ -303,7 +344,9 @@ var Commands = []*console.Command{ Name: "logout", Aliases: []*console.Alias{ {Name: "auth:logout", Hidden: true}, + {Name: "upsun:auth:logout", Hidden: true}, {Name: "cloud:logout"}, + {Name: "upsun:logout", Hidden: true}, {Name: "logout", Hidden: true}, }, Usage: "Log out of Platform.sh", @@ -317,6 +360,7 @@ var Commands = []*console.Command{ Name: "token", Aliases: []*console.Alias{ {Name: "auth:token", Hidden: true}, + {Name: "upsun:auth:token", Hidden: true}, }, Usage: "Obtain an OAuth 2 access token for requests to Platform.sh APIs", Hidden: console.Hide, @@ -330,6 +374,7 @@ var Commands = []*console.Command{ Name: "verify-phone-number", Aliases: []*console.Alias{ {Name: "auth:verify-phone-number", Hidden: true}, + {Name: "upsun:auth:verify-phone-number", Hidden: true}, }, Usage: "Verify your phone number interactively", }, @@ -338,7 +383,9 @@ var Commands = []*console.Command{ Name: "create", Aliases: []*console.Alias{ {Name: "backup:create", Hidden: true}, + {Name: "upsun:backup:create", Hidden: true}, {Name: "cloud:backup"}, + {Name: "upsun:backup", Hidden: true}, {Name: "backup", Hidden: true}, }, Usage: "Make a backup of an environment", @@ -355,6 +402,7 @@ var Commands = []*console.Command{ Name: "delete", Aliases: []*console.Alias{ {Name: "backup:delete", Hidden: true}, + {Name: "upsun:backup:delete", Hidden: true}, }, Usage: "Delete an environment backup", Flags: []console.Flag{ @@ -369,6 +417,7 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "backup:get", Hidden: true}, + {Name: "upsun:backup:get", Hidden: true}, }, Usage: "View an environment backup", Flags: []console.Flag{ @@ -383,7 +432,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "backup:list", Hidden: true}, + {Name: "upsun:backup:list", Hidden: true}, {Name: "cloud:backups"}, + {Name: "upsun:backups", Hidden: true}, {Name: "backups", Hidden: true}, }, Usage: "List available backups of an environment", @@ -401,6 +452,7 @@ var Commands = []*console.Command{ Name: "restore", Aliases: []*console.Alias{ {Name: "backup:restore", Hidden: true}, + {Name: "upsun:backup:restore", Hidden: true}, }, Usage: "Restore an environment backup", Flags: []console.Flag{ @@ -417,6 +469,7 @@ var Commands = []*console.Command{ Name: "conclude", Aliases: []*console.Alias{ {Name: "blue-green:conclude", Hidden: true}, + {Name: "upsun:blue-green:conclude", Hidden: true}, }, Usage: " ALPHA Conclude a blue/green deployment", Hidden: console.Hide, @@ -430,6 +483,7 @@ var Commands = []*console.Command{ Name: "deploy", Aliases: []*console.Alias{ {Name: "blue-green:deploy", Hidden: true}, + {Name: "upsun:blue-green:deploy", Hidden: true}, }, Usage: " ALPHA Perform a blue/green deployment", Hidden: console.Hide, @@ -444,6 +498,7 @@ var Commands = []*console.Command{ Name: "enable", Aliases: []*console.Alias{ {Name: "blue-green:enable", Hidden: true}, + {Name: "upsun:blue-green:enable", Hidden: true}, }, Usage: " ALPHA Enable blue/green deployments", Hidden: console.Hide, @@ -458,6 +513,7 @@ var Commands = []*console.Command{ Name: "add", Aliases: []*console.Alias{ {Name: "certificate:add", Hidden: true}, + {Name: "upsun:certificate:add", Hidden: true}, }, Usage: "Add an SSL certificate to the project", Flags: []console.Flag{ @@ -474,6 +530,7 @@ var Commands = []*console.Command{ Name: "delete", Aliases: []*console.Alias{ {Name: "certificate:delete", Hidden: true}, + {Name: "upsun:certificate:delete", Hidden: true}, }, Usage: "Delete a certificate from the project", Flags: []console.Flag{ @@ -487,6 +544,7 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "certificate:get", Hidden: true}, + {Name: "upsun:certificate:get", Hidden: true}, }, Usage: "View a certificate", Flags: []console.Flag{ @@ -500,9 +558,12 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "certificate:list", Hidden: true}, + {Name: "upsun:certificate:list", Hidden: true}, {Name: "cloud:certificates"}, + {Name: "upsun:certificates", Hidden: true}, {Name: "certificates", Hidden: true}, {Name: "cloud:certs"}, + {Name: "upsun:certs", Hidden: true}, {Name: "certs", Hidden: true}, }, Usage: "List project certificates", @@ -528,6 +589,7 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "commit:get", Hidden: true}, + {Name: "upsun:commit:get", Hidden: true}, }, Usage: "Show commit details", Flags: []console.Flag{ @@ -542,7 +604,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "commit:list", Hidden: true}, + {Name: "upsun:commit:list", Hidden: true}, {Name: "cloud:commits"}, + {Name: "upsun:commits", Hidden: true}, {Name: "commits", Hidden: true}, }, Usage: "List commits", @@ -561,6 +625,7 @@ var Commands = []*console.Command{ Name: "dump", Aliases: []*console.Alias{ {Name: "db:dump", Hidden: true}, + {Name: "upsun:db:dump", Hidden: true}, }, Usage: "Create a local dump of the remote database", Flags: []console.Flag{ @@ -586,6 +651,7 @@ var Commands = []*console.Command{ Name: "size", Aliases: []*console.Alias{ {Name: "db:size", Hidden: true}, + {Name: "upsun:db:size", Hidden: true}, }, Usage: "Estimate the disk usage of a database", Flags: []console.Flag{ @@ -606,7 +672,9 @@ var Commands = []*console.Command{ Name: "sql", Aliases: []*console.Alias{ {Name: "db:sql", Hidden: true}, + {Name: "upsun:db:sql", Hidden: true}, {Name: "cloud:sql"}, + {Name: "upsun:sql", Hidden: true}, {Name: "sql", Hidden: true}, }, Usage: "Run SQL on the remote database", @@ -625,6 +693,7 @@ var Commands = []*console.Command{ Name: "add", Aliases: []*console.Alias{ {Name: "domain:add", Hidden: true}, + {Name: "upsun:domain:add", Hidden: true}, }, Usage: "Add a new domain to the project", Flags: []console.Flag{ @@ -643,6 +712,7 @@ var Commands = []*console.Command{ Name: "delete", Aliases: []*console.Alias{ {Name: "domain:delete", Hidden: true}, + {Name: "upsun:domain:delete", Hidden: true}, }, Usage: "Delete a domain from the project", Flags: []console.Flag{ @@ -657,6 +727,7 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "domain:get", Hidden: true}, + {Name: "upsun:domain:get", Hidden: true}, }, Usage: "Show detailed information for a domain", Flags: []console.Flag{ @@ -674,7 +745,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "domain:list", Hidden: true}, + {Name: "upsun:domain:list", Hidden: true}, {Name: "cloud:domains"}, + {Name: "upsun:domains", Hidden: true}, {Name: "domains", Hidden: true}, }, Usage: "Get a list of all domains", @@ -691,6 +764,7 @@ var Commands = []*console.Command{ Name: "update", Aliases: []*console.Alias{ {Name: "domain:update", Hidden: true}, + {Name: "upsun:domain:update", Hidden: true}, }, Usage: "Update a domain", Flags: []console.Flag{ @@ -708,6 +782,7 @@ var Commands = []*console.Command{ Name: "activate", Aliases: []*console.Alias{ {Name: "environment:activate", Hidden: true}, + {Name: "upsun:environment:activate", Hidden: true}, }, Usage: "Activate an environment", Flags: []console.Flag{ @@ -723,7 +798,9 @@ var Commands = []*console.Command{ Name: "branch", Aliases: []*console.Alias{ {Name: "environment:branch", Hidden: true}, + {Name: "upsun:environment:branch", Hidden: true}, {Name: "cloud:branch"}, + {Name: "upsun:branch", Hidden: true}, {Name: "branch", Hidden: true}, }, Usage: "Branch an environment", @@ -742,7 +819,9 @@ var Commands = []*console.Command{ Name: "checkout", Aliases: []*console.Alias{ {Name: "environment:checkout", Hidden: true}, + {Name: "upsun:environment:checkout", Hidden: true}, {Name: "cloud:checkout"}, + {Name: "upsun:checkout", Hidden: true}, {Name: "checkout", Hidden: true}, }, Usage: "Check out an environment", @@ -755,6 +834,7 @@ var Commands = []*console.Command{ Name: "curl", Aliases: []*console.Alias{ {Name: "environment:curl", Hidden: true}, + {Name: "upsun:environment:curl", Hidden: true}, }, Usage: "Run an authenticated cURL request on an environment's API", Hidden: console.Hide, @@ -777,6 +857,7 @@ var Commands = []*console.Command{ Name: "delete", Aliases: []*console.Alias{ {Name: "environment:delete", Hidden: true}, + {Name: "upsun:environment:delete", Hidden: true}, }, Usage: "Delete one or more environments", Flags: []console.Flag{ @@ -800,7 +881,9 @@ var Commands = []*console.Command{ Name: "http-access", Aliases: []*console.Alias{ {Name: "environment:http-access", Hidden: true}, + {Name: "upsun:environment:http-access", Hidden: true}, {Name: "cloud:httpaccess"}, + {Name: "upsun:httpaccess", Hidden: true}, {Name: "httpaccess", Hidden: true}, }, Usage: "Update HTTP access settings for an environment", @@ -819,6 +902,7 @@ var Commands = []*console.Command{ Name: "info", Aliases: []*console.Alias{ {Name: "environment:info", Hidden: true}, + {Name: "upsun:environment:info", Hidden: true}, }, Usage: "Read or set properties for an environment", Flags: []console.Flag{ @@ -838,6 +922,7 @@ var Commands = []*console.Command{ Name: "init", Aliases: []*console.Alias{ {Name: "environment:init", Hidden: true}, + {Name: "upsun:environment:init", Hidden: true}, }, Usage: "Initialize an environment from a public Git repository", Flags: []console.Flag{ @@ -853,9 +938,12 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "environment:list", Hidden: true}, + {Name: "upsun:environment:list", Hidden: true}, {Name: "cloud:environments"}, + {Name: "upsun:environments", Hidden: true}, {Name: "environments", Hidden: true}, {Name: "cloud:env"}, + {Name: "upsun:env", Hidden: true}, {Name: "env", Hidden: true}, }, Usage: "Get a list of environments", @@ -877,7 +965,9 @@ var Commands = []*console.Command{ Name: "logs", Aliases: []*console.Alias{ {Name: "environment:logs", Hidden: true}, + {Name: "upsun:environment:logs", Hidden: true}, {Name: "cloud:log"}, + {Name: "upsun:log", Hidden: true}, {Name: "log", Hidden: true}, }, Usage: "Read an environment's logs", @@ -896,7 +986,9 @@ var Commands = []*console.Command{ Name: "merge", Aliases: []*console.Alias{ {Name: "environment:merge", Hidden: true}, + {Name: "upsun:environment:merge", Hidden: true}, {Name: "cloud:merge"}, + {Name: "upsun:merge", Hidden: true}, {Name: "merge", Hidden: true}, }, Usage: "Merge an environment", @@ -912,6 +1004,7 @@ var Commands = []*console.Command{ Name: "pause", Aliases: []*console.Alias{ {Name: "environment:pause", Hidden: true}, + {Name: "upsun:environment:pause", Hidden: true}, }, Usage: "Pause an environment", Flags: []console.Flag{ @@ -926,7 +1019,9 @@ var Commands = []*console.Command{ Name: "push", Aliases: []*console.Alias{ {Name: "environment:push", Hidden: true}, + {Name: "upsun:environment:push", Hidden: true}, {Name: "cloud:push"}, + {Name: "upsun:push", Hidden: true}, {Name: "push", Hidden: true}, {Name: "deploy"}, {Name: "cloud:deploy"}, @@ -953,7 +1048,9 @@ var Commands = []*console.Command{ Name: "redeploy", Aliases: []*console.Alias{ {Name: "environment:redeploy", Hidden: true}, + {Name: "upsun:environment:redeploy", Hidden: true}, {Name: "cloud:redeploy"}, + {Name: "upsun:redeploy", Hidden: true}, {Name: "redeploy", Hidden: true}, }, Usage: "Redeploy an environment", @@ -969,9 +1066,12 @@ var Commands = []*console.Command{ Name: "relationships", Aliases: []*console.Alias{ {Name: "environment:relationships", Hidden: true}, + {Name: "upsun:environment:relationships", Hidden: true}, {Name: "cloud:relationships"}, + {Name: "upsun:relationships", Hidden: true}, {Name: "relationships", Hidden: true}, {Name: "cloud:rel"}, + {Name: "upsun:rel", Hidden: true}, {Name: "rel", Hidden: true}, }, Usage: "Show an environment's relationships", @@ -989,6 +1089,7 @@ var Commands = []*console.Command{ Name: "resume", Aliases: []*console.Alias{ {Name: "environment:resume", Hidden: true}, + {Name: "upsun:environment:resume", Hidden: true}, }, Usage: "Resume a paused environment", Flags: []console.Flag{ @@ -1003,7 +1104,9 @@ var Commands = []*console.Command{ Name: "scp", Aliases: []*console.Alias{ {Name: "environment:scp", Hidden: true}, + {Name: "upsun:environment:scp", Hidden: true}, {Name: "cloud:scp"}, + {Name: "upsun:scp", Hidden: true}, {Name: "scp", Hidden: true}, }, Usage: "Copy files to and from an environment using scp", @@ -1022,6 +1125,7 @@ var Commands = []*console.Command{ Name: "set-remote", Aliases: []*console.Alias{ {Name: "environment:set-remote", Hidden: true}, + {Name: "upsun:environment:set-remote", Hidden: true}, }, Usage: "Set the remote environment to map to a branch", Hidden: console.Hide, @@ -1031,7 +1135,9 @@ var Commands = []*console.Command{ Name: "ssh", Aliases: []*console.Alias{ {Name: "environment:ssh", Hidden: true}, + {Name: "upsun:environment:ssh", Hidden: true}, {Name: "cloud:ssh"}, + {Name: "upsun:ssh", Hidden: true}, {Name: "ssh", Hidden: true}, }, Usage: "SSH to the current environment", @@ -1051,7 +1157,9 @@ var Commands = []*console.Command{ Name: "synchronize", Aliases: []*console.Alias{ {Name: "environment:synchronize", Hidden: true}, + {Name: "upsun:environment:synchronize", Hidden: true}, {Name: "cloud:sync"}, + {Name: "upsun:sync", Hidden: true}, {Name: "sync", Hidden: true}, }, Usage: "Synchronize an environment's code and/or data from its parent", @@ -1068,7 +1176,9 @@ var Commands = []*console.Command{ Name: "url", Aliases: []*console.Alias{ {Name: "environment:url", Hidden: true}, + {Name: "upsun:environment:url", Hidden: true}, {Name: "cloud:url"}, + {Name: "upsun:url", Hidden: true}, {Name: "url", Hidden: true}, }, Usage: "Get the public URLs of an environment", @@ -1085,7 +1195,9 @@ var Commands = []*console.Command{ Name: "xdebug", Aliases: []*console.Alias{ {Name: "environment:xdebug", Hidden: true}, + {Name: "upsun:environment:xdebug", Hidden: true}, {Name: "cloud:xdebug"}, + {Name: "upsun:xdebug", Hidden: true}, {Name: "xdebug", Hidden: true}, }, Usage: "Open a tunnel to Xdebug on the environment", @@ -1104,6 +1216,7 @@ var Commands = []*console.Command{ Name: "activity:get", Aliases: []*console.Alias{ {Name: "integration:activity:get", Hidden: true}, + {Name: "upsun:integration:activity:get", Hidden: true}, }, Usage: "View detailed information on a single integration activity", Flags: []console.Flag{ @@ -1121,7 +1234,9 @@ var Commands = []*console.Command{ Name: "activity:list", Aliases: []*console.Alias{ {Name: "integration:activity:list", Hidden: true}, + {Name: "upsun:integration:activity:list", Hidden: true}, {Name: "cloud:int:act"}, + {Name: "upsun:int:act", Hidden: true}, {Name: "int:act", Hidden: true}, }, Usage: "Get a list of activities for an integration", @@ -1146,6 +1261,7 @@ var Commands = []*console.Command{ Name: "activity:log", Aliases: []*console.Alias{ {Name: "integration:activity:log", Hidden: true}, + {Name: "upsun:integration:activity:log", Hidden: true}, }, Usage: "Display the log for an integration activity", Flags: []console.Flag{ @@ -1160,6 +1276,7 @@ var Commands = []*console.Command{ Name: "add", Aliases: []*console.Alias{ {Name: "integration:add", Hidden: true}, + {Name: "upsun:integration:add", Hidden: true}, }, Usage: "Add an integration to the project", Flags: []console.Flag{ @@ -1216,6 +1333,7 @@ var Commands = []*console.Command{ Name: "delete", Aliases: []*console.Alias{ {Name: "integration:delete", Hidden: true}, + {Name: "upsun:integration:delete", Hidden: true}, }, Usage: "Delete an integration from a project", Flags: []console.Flag{ @@ -1229,6 +1347,7 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "integration:get", Hidden: true}, + {Name: "upsun:integration:get", Hidden: true}, }, Usage: "View details of an integration", Flags: []console.Flag{ @@ -1244,7 +1363,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "integration:list", Hidden: true}, + {Name: "upsun:integration:list", Hidden: true}, {Name: "cloud:integrations"}, + {Name: "upsun:integrations", Hidden: true}, {Name: "integrations", Hidden: true}, }, Usage: "View a list of project integration(s)", @@ -1260,6 +1381,7 @@ var Commands = []*console.Command{ Name: "update", Aliases: []*console.Alias{ {Name: "integration:update", Hidden: true}, + {Name: "upsun:integration:update", Hidden: true}, }, Usage: "Update an integration", Flags: []console.Flag{ @@ -1316,6 +1438,7 @@ var Commands = []*console.Command{ Name: "validate", Aliases: []*console.Alias{ {Name: "integration:validate", Hidden: true}, + {Name: "upsun:integration:validate", Hidden: true}, }, Usage: "Validate an existing integration", Flags: []console.Flag{ @@ -1327,9 +1450,12 @@ var Commands = []*console.Command{ Name: "all", Aliases: []*console.Alias{ {Name: "metrics:all", Hidden: true}, + {Name: "upsun:metrics:all", Hidden: true}, {Name: "cloud:metrics"}, + {Name: "upsun:metrics", Hidden: true}, {Name: "metrics", Hidden: true}, {Name: "cloud:met"}, + {Name: "upsun:met", Hidden: true}, {Name: "met", Hidden: true}, }, Usage: " BETA Show CPU, disk and memory metrics for an environment", @@ -1354,7 +1480,9 @@ var Commands = []*console.Command{ Name: "cpu", Aliases: []*console.Alias{ {Name: "metrics:cpu", Hidden: true}, + {Name: "upsun:metrics:cpu", Hidden: true}, {Name: "cloud:cpu"}, + {Name: "upsun:cpu", Hidden: true}, {Name: "cpu", Hidden: true}, }, Usage: " BETA Show CPU usage of an environment", @@ -1378,6 +1506,7 @@ var Commands = []*console.Command{ Name: "curl", Aliases: []*console.Alias{ {Name: "metrics:curl", Hidden: true}, + {Name: "upsun:metrics:curl", Hidden: true}, }, Usage: "Run an authenticated cURL request on an environment's metrics API", Hidden: console.Hide, @@ -1400,7 +1529,9 @@ var Commands = []*console.Command{ Name: "disk-usage", Aliases: []*console.Alias{ {Name: "metrics:disk-usage", Hidden: true}, + {Name: "upsun:metrics:disk-usage", Hidden: true}, {Name: "cloud:disk"}, + {Name: "upsun:disk", Hidden: true}, {Name: "disk", Hidden: true}, }, Usage: "Show disk usage of an environment", @@ -1426,9 +1557,12 @@ var Commands = []*console.Command{ Name: "memory", Aliases: []*console.Alias{ {Name: "metrics:memory", Hidden: true}, + {Name: "upsun:metrics:memory", Hidden: true}, {Name: "cloud:mem"}, + {Name: "upsun:mem", Hidden: true}, {Name: "mem", Hidden: true}, {Name: "cloud:memory"}, + {Name: "upsun:memory", Hidden: true}, {Name: "memory", Hidden: true}, }, Usage: " BETA Show memory usage of an environment", @@ -1453,6 +1587,7 @@ var Commands = []*console.Command{ Name: "download", Aliases: []*console.Alias{ {Name: "mount:download", Hidden: true}, + {Name: "upsun:mount:download", Hidden: true}, }, Usage: "Download files from a mount, using rsync", Flags: []console.Flag{ @@ -1477,7 +1612,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "mount:list", Hidden: true}, + {Name: "upsun:mount:list", Hidden: true}, {Name: "cloud:mounts"}, + {Name: "upsun:mounts", Hidden: true}, {Name: "mounts", Hidden: true}, }, Usage: "Get a list of mounts", @@ -1499,6 +1636,7 @@ var Commands = []*console.Command{ Name: "size", Aliases: []*console.Alias{ {Name: "mount:size", Hidden: true}, + {Name: "upsun:mount:size", Hidden: true}, }, Usage: "Check the disk usage of mounts", Flags: []console.Flag{ @@ -1520,6 +1658,7 @@ var Commands = []*console.Command{ Name: "upload", Aliases: []*console.Alias{ {Name: "mount:upload", Hidden: true}, + {Name: "upsun:mount:upload", Hidden: true}, }, Usage: "Upload files to a mount, using rsync", Flags: []console.Flag{ @@ -1542,7 +1681,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "operation:list", Hidden: true}, + {Name: "upsun:operation:list", Hidden: true}, {Name: "cloud:ops"}, + {Name: "upsun:ops", Hidden: true}, {Name: "ops", Hidden: true}, }, Usage: " BETA List runtime operations on an environment", @@ -1562,6 +1703,7 @@ var Commands = []*console.Command{ Name: "run", Aliases: []*console.Alias{ {Name: "operation:run", Hidden: true}, + {Name: "upsun:operation:run", Hidden: true}, }, Usage: " BETA Run an operation on the environment", Flags: []console.Flag{ @@ -1578,6 +1720,7 @@ var Commands = []*console.Command{ Name: "billing:address", Aliases: []*console.Alias{ {Name: "organization:billing:address", Hidden: true}, + {Name: "upsun:organization:billing:address", Hidden: true}, }, Usage: "View or change an organization's billing address", Flags: []console.Flag{ @@ -1594,6 +1737,7 @@ var Commands = []*console.Command{ Name: "billing:profile", Aliases: []*console.Alias{ {Name: "organization:billing:profile", Hidden: true}, + {Name: "upsun:organization:billing:profile", Hidden: true}, }, Usage: "View or change an organization's billing profile", Flags: []console.Flag{ @@ -1610,6 +1754,7 @@ var Commands = []*console.Command{ Name: "create", Aliases: []*console.Alias{ {Name: "organization:create", Hidden: true}, + {Name: "upsun:organization:create", Hidden: true}, }, Usage: "Create a new organization", Flags: []console.Flag{ @@ -1623,6 +1768,7 @@ var Commands = []*console.Command{ Name: "curl", Aliases: []*console.Alias{ {Name: "organization:curl", Hidden: true}, + {Name: "upsun:organization:curl", Hidden: true}, }, Usage: "Run an authenticated cURL request on an organization's API", Hidden: console.Hide, @@ -1645,6 +1791,7 @@ var Commands = []*console.Command{ Name: "delete", Aliases: []*console.Alias{ {Name: "organization:delete", Hidden: true}, + {Name: "upsun:organization:delete", Hidden: true}, }, Usage: "Delete an organization", Flags: []console.Flag{ @@ -1657,6 +1804,7 @@ var Commands = []*console.Command{ Name: "info", Aliases: []*console.Alias{ {Name: "organization:info", Hidden: true}, + {Name: "upsun:organization:info", Hidden: true}, }, Usage: "View or change organization details", Flags: []console.Flag{ @@ -1673,9 +1821,12 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "organization:list", Hidden: true}, + {Name: "upsun:organization:list", Hidden: true}, {Name: "cloud:orgs"}, + {Name: "upsun:orgs", Hidden: true}, {Name: "orgs", Hidden: true}, {Name: "cloud:organizations"}, + {Name: "upsun:organizations", Hidden: true}, {Name: "organizations", Hidden: true}, }, Usage: "List organizations", @@ -1693,7 +1844,9 @@ var Commands = []*console.Command{ Name: "subscription:list", Aliases: []*console.Alias{ {Name: "organization:subscription:list", Hidden: true}, + {Name: "upsun:organization:subscription:list", Hidden: true}, {Name: "cloud:org:subs"}, + {Name: "upsun:org:subs", Hidden: true}, {Name: "org:subs", Hidden: true}, }, Usage: "List subscriptions within an organization", @@ -1712,6 +1865,7 @@ var Commands = []*console.Command{ Name: "user:add", Aliases: []*console.Alias{ {Name: "organization:user:add", Hidden: true}, + {Name: "upsun:organization:user:add", Hidden: true}, }, Usage: "Invite a user to an organization", Flags: []console.Flag{ @@ -1725,6 +1879,7 @@ var Commands = []*console.Command{ Name: "user:delete", Aliases: []*console.Alias{ {Name: "organization:user:delete", Hidden: true}, + {Name: "upsun:organization:user:delete", Hidden: true}, }, Usage: "Remove a user from an organization", Flags: []console.Flag{ @@ -1737,6 +1892,7 @@ var Commands = []*console.Command{ Name: "user:get", Aliases: []*console.Alias{ {Name: "organization:user:get", Hidden: true}, + {Name: "upsun:organization:user:get", Hidden: true}, }, Usage: "View an organization user", Flags: []console.Flag{ @@ -1754,7 +1910,9 @@ var Commands = []*console.Command{ Name: "user:list", Aliases: []*console.Alias{ {Name: "organization:user:list", Hidden: true}, + {Name: "upsun:organization:user:list", Hidden: true}, {Name: "cloud:org:users"}, + {Name: "upsun:org:users", Hidden: true}, {Name: "org:users", Hidden: true}, }, Usage: "List organization users", @@ -1772,7 +1930,9 @@ var Commands = []*console.Command{ Name: "user:projects", Aliases: []*console.Alias{ {Name: "organization:user:projects", Hidden: true}, + {Name: "upsun:organization:user:projects", Hidden: true}, {Name: "cloud:oups"}, + {Name: "upsun:oups", Hidden: true}, {Name: "oups", Hidden: true}, }, Usage: "List the projects a user can access", @@ -1793,6 +1953,7 @@ var Commands = []*console.Command{ Name: "user:update", Aliases: []*console.Alias{ {Name: "organization:user:update", Hidden: true}, + {Name: "upsun:organization:user:update", Hidden: true}, }, Usage: "Update an organization user", Flags: []console.Flag{ @@ -1806,6 +1967,7 @@ var Commands = []*console.Command{ Name: "clear-build-cache", Aliases: []*console.Alias{ {Name: "project:clear-build-cache", Hidden: true}, + {Name: "upsun:project:clear-build-cache", Hidden: true}, }, Usage: "Clear a project's build cache", Flags: []console.Flag{ @@ -1817,7 +1979,9 @@ var Commands = []*console.Command{ Name: "create", Aliases: []*console.Alias{ {Name: "project:create", Hidden: true}, + {Name: "upsun:project:create", Hidden: true}, {Name: "cloud:create"}, + {Name: "upsun:create", Hidden: true}, {Name: "create", Hidden: true}, }, Usage: "Create a new project", @@ -1841,6 +2005,7 @@ var Commands = []*console.Command{ Name: "curl", Aliases: []*console.Alias{ {Name: "project:curl", Hidden: true}, + {Name: "upsun:project:curl", Hidden: true}, }, Usage: "Run an authenticated cURL request on a project's API", Hidden: console.Hide, @@ -1862,6 +2027,7 @@ var Commands = []*console.Command{ Name: "delete", Aliases: []*console.Alias{ {Name: "project:delete", Hidden: true}, + {Name: "upsun:project:delete", Hidden: true}, }, Usage: "Delete a project", Flags: []console.Flag{ @@ -1873,7 +2039,9 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "project:get", Hidden: true}, + {Name: "upsun:project:get", Hidden: true}, {Name: "cloud:get"}, + {Name: "upsun:get", Hidden: true}, {Name: "get", Hidden: true}, }, Usage: "Clone a project locally", @@ -1890,6 +2058,7 @@ var Commands = []*console.Command{ Name: "info", Aliases: []*console.Alias{ {Name: "project:info", Hidden: true}, + {Name: "upsun:project:info", Hidden: true}, }, Usage: "Read or set properties for a project", Flags: []console.Flag{ @@ -1908,9 +2077,12 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "project:list", Hidden: true}, + {Name: "upsun:project:list", Hidden: true}, {Name: "cloud:projects"}, + {Name: "upsun:projects", Hidden: true}, {Name: "projects", Hidden: true}, {Name: "cloud:pro"}, + {Name: "upsun:pro", Hidden: true}, {Name: "pro", Hidden: true}, }, Usage: "Get a list of all active projects", @@ -1936,7 +2108,9 @@ var Commands = []*console.Command{ Name: "set-remote", Aliases: []*console.Alias{ {Name: "project:set-remote", Hidden: true}, + {Name: "upsun:project:set-remote", Hidden: true}, {Name: "cloud:set-remote"}, + {Name: "upsun:set-remote", Hidden: true}, {Name: "set-remote", Hidden: true}, }, Usage: "Set the remote project for the current Git repository", @@ -1946,6 +2120,7 @@ var Commands = []*console.Command{ Name: "cat", Aliases: []*console.Alias{ {Name: "repo:cat", Hidden: true}, + {Name: "upsun:repo:cat", Hidden: true}, }, Usage: "Read a file in the project repository", Flags: []console.Flag{ @@ -1959,6 +2134,7 @@ var Commands = []*console.Command{ Name: "ls", Aliases: []*console.Alias{ {Name: "repo:ls", Hidden: true}, + {Name: "upsun:repo:ls", Hidden: true}, }, Usage: "List files in the project repository", Flags: []console.Flag{ @@ -1975,7 +2151,9 @@ var Commands = []*console.Command{ Name: "read", Aliases: []*console.Alias{ {Name: "repo:read", Hidden: true}, + {Name: "upsun:repo:read", Hidden: true}, {Name: "cloud:read"}, + {Name: "upsun:read", Hidden: true}, {Name: "read", Hidden: true}, }, Usage: "Read a directory or file in the project repository", @@ -1990,9 +2168,12 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "resources:get", Hidden: true}, + {Name: "upsun:resources:get", Hidden: true}, {Name: "cloud:resources"}, + {Name: "upsun:resources", Hidden: true}, {Name: "resources", Hidden: true}, {Name: "cloud:res"}, + {Name: "upsun:res", Hidden: true}, {Name: "res", Hidden: true}, }, Usage: "View the resources of apps and services on an environment", @@ -2014,6 +2195,7 @@ var Commands = []*console.Command{ Name: "set", Aliases: []*console.Alias{ {Name: "resources:set", Hidden: true}, + {Name: "upsun:resources:set", Hidden: true}, }, Usage: "Set the resources of apps and services on an environment", Hidden: console.Hide, @@ -2033,7 +2215,9 @@ var Commands = []*console.Command{ Name: "size:list", Aliases: []*console.Alias{ {Name: "resources:size:list", Hidden: true}, + {Name: "upsun:resources:size:list", Hidden: true}, {Name: "cloud:resources:sizes"}, + {Name: "upsun:resources:sizes", Hidden: true}, {Name: "resources:sizes", Hidden: true}, }, Usage: "List container profile sizes", @@ -2053,6 +2237,7 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "route:get", Hidden: true}, + {Name: "upsun:route:get", Hidden: true}, }, Usage: "View detailed information about a route", Flags: []console.Flag{ @@ -2072,7 +2257,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "route:list", Hidden: true}, + {Name: "upsun:route:list", Hidden: true}, {Name: "cloud:routes"}, + {Name: "upsun:routes", Hidden: true}, {Name: "routes", Hidden: true}, }, Usage: "List all routes for an environment", @@ -2088,6 +2275,9 @@ var Commands = []*console.Command{ { Category: "cloud:self", Name: "config", + Aliases: []*console.Alias{ + {Name: "upsun:self:config", Hidden: true}, + }, Usage: "Read CLI config", Hidden: console.Hide, }, @@ -2096,7 +2286,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "service:list", Hidden: true}, + {Name: "upsun:service:list", Hidden: true}, {Name: "cloud:services"}, + {Name: "upsun:services", Hidden: true}, {Name: "services", Hidden: true}, }, Usage: "List services in the project", @@ -2115,7 +2307,9 @@ var Commands = []*console.Command{ Name: "mongo:dump", Aliases: []*console.Alias{ {Name: "service:mongo:dump", Hidden: true}, + {Name: "upsun:service:mongo:dump", Hidden: true}, {Name: "cloud:mongodump"}, + {Name: "upsun:mongodump", Hidden: true}, {Name: "mongodump", Hidden: true}, }, Usage: "Create a binary archive dump of data from MongoDB", @@ -2135,7 +2329,9 @@ var Commands = []*console.Command{ Name: "mongo:export", Aliases: []*console.Alias{ {Name: "service:mongo:export", Hidden: true}, + {Name: "upsun:service:mongo:export", Hidden: true}, {Name: "cloud:mongoexport"}, + {Name: "upsun:mongoexport", Hidden: true}, {Name: "mongoexport", Hidden: true}, }, Usage: "Export data from MongoDB", @@ -2156,7 +2352,9 @@ var Commands = []*console.Command{ Name: "mongo:restore", Aliases: []*console.Alias{ {Name: "service:mongo:restore", Hidden: true}, + {Name: "upsun:service:mongo:restore", Hidden: true}, {Name: "cloud:mongorestore"}, + {Name: "upsun:mongorestore", Hidden: true}, {Name: "mongorestore", Hidden: true}, }, Usage: "Restore a binary archive dump of data into MongoDB", @@ -2174,7 +2372,9 @@ var Commands = []*console.Command{ Name: "mongo:shell", Aliases: []*console.Alias{ {Name: "service:mongo:shell", Hidden: true}, + {Name: "upsun:service:mongo:shell", Hidden: true}, {Name: "cloud:mongo"}, + {Name: "upsun:mongo", Hidden: true}, {Name: "mongo", Hidden: true}, }, Usage: "Use the MongoDB shell", @@ -2192,7 +2392,9 @@ var Commands = []*console.Command{ Name: "redis-cli", Aliases: []*console.Alias{ {Name: "service:redis-cli", Hidden: true}, + {Name: "upsun:service:redis-cli", Hidden: true}, {Name: "cloud:redis"}, + {Name: "upsun:redis", Hidden: true}, {Name: "redis", Hidden: true}, }, Usage: "Access the Redis CLI", @@ -2209,6 +2411,7 @@ var Commands = []*console.Command{ Name: "switch", Aliases: []*console.Alias{ {Name: "session:switch", Hidden: true}, + {Name: "upsun:session:switch", Hidden: true}, }, Usage: " BETA Switch between sessions", Hidden: console.Hide, @@ -2218,7 +2421,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "source-operation:list", Hidden: true}, + {Name: "upsun:source-operation:list", Hidden: true}, {Name: "cloud:source-ops"}, + {Name: "upsun:source-ops", Hidden: true}, {Name: "source-ops", Hidden: true}, }, Usage: "List source operations on an environment", @@ -2236,6 +2441,7 @@ var Commands = []*console.Command{ Name: "run", Aliases: []*console.Alias{ {Name: "source-operation:run", Hidden: true}, + {Name: "upsun:source-operation:run", Hidden: true}, }, Usage: "Run a source operation", Flags: []console.Flag{ @@ -2251,6 +2457,7 @@ var Commands = []*console.Command{ Name: "info", Aliases: []*console.Alias{ {Name: "ssh-cert:info", Hidden: true}, + {Name: "upsun:ssh-cert:info", Hidden: true}, }, Usage: "Display information about the current SSH certificate", Hidden: console.Hide, @@ -2265,6 +2472,7 @@ var Commands = []*console.Command{ Name: "load", Aliases: []*console.Alias{ {Name: "ssh-cert:load", Hidden: true}, + {Name: "upsun:ssh-cert:load", Hidden: true}, }, Usage: "Generate an SSH certificate", Flags: []console.Flag{ @@ -2278,6 +2486,7 @@ var Commands = []*console.Command{ Name: "add", Aliases: []*console.Alias{ {Name: "ssh-key:add", Hidden: true}, + {Name: "upsun:ssh-key:add", Hidden: true}, }, Usage: "Add a new SSH key", Flags: []console.Flag{ @@ -2289,6 +2498,7 @@ var Commands = []*console.Command{ Name: "delete", Aliases: []*console.Alias{ {Name: "ssh-key:delete", Hidden: true}, + {Name: "upsun:ssh-key:delete", Hidden: true}, }, Usage: "Delete an SSH key", }, @@ -2297,7 +2507,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "ssh-key:list", Hidden: true}, + {Name: "upsun:ssh-key:list", Hidden: true}, {Name: "cloud:ssh-keys"}, + {Name: "upsun:ssh-keys", Hidden: true}, {Name: "ssh-keys", Hidden: true}, }, Usage: "Get a list of SSH keys in your account", @@ -2312,6 +2524,7 @@ var Commands = []*console.Command{ Name: "info", Aliases: []*console.Alias{ {Name: "subscription:info", Hidden: true}, + {Name: "upsun:subscription:info", Hidden: true}, }, Usage: "Read or modify subscription properties", Flags: []console.Flag{ @@ -2328,6 +2541,7 @@ var Commands = []*console.Command{ Name: "close", Aliases: []*console.Alias{ {Name: "tunnel:close", Hidden: true}, + {Name: "upsun:tunnel:close", Hidden: true}, }, Usage: "Close SSH tunnels", Flags: []console.Flag{ @@ -2342,6 +2556,7 @@ var Commands = []*console.Command{ Name: "info", Aliases: []*console.Alias{ {Name: "tunnel:info", Hidden: true}, + {Name: "upsun:tunnel:info", Hidden: true}, }, Usage: "View relationship info for SSH tunnels", Flags: []console.Flag{ @@ -2357,7 +2572,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "tunnel:list", Hidden: true}, + {Name: "upsun:tunnel:list", Hidden: true}, {Name: "cloud:tunnels"}, + {Name: "upsun:tunnels", Hidden: true}, {Name: "tunnels", Hidden: true}, }, Usage: "List SSH tunnels", @@ -2376,6 +2593,7 @@ var Commands = []*console.Command{ Name: "open", Aliases: []*console.Alias{ {Name: "tunnel:open", Hidden: true}, + {Name: "upsun:tunnel:open", Hidden: true}, }, Usage: "Open SSH tunnels to an app's relationships", Flags: []console.Flag{ @@ -2391,6 +2609,7 @@ var Commands = []*console.Command{ Name: "single", Aliases: []*console.Alias{ {Name: "tunnel:single", Hidden: true}, + {Name: "upsun:tunnel:single", Hidden: true}, }, Usage: "Open a single SSH tunnel to an app relationship", Flags: []console.Flag{ @@ -2408,6 +2627,7 @@ var Commands = []*console.Command{ Name: "add", Aliases: []*console.Alias{ {Name: "user:add", Hidden: true}, + {Name: "upsun:user:add", Hidden: true}, }, Usage: "Add a user to the project", Flags: []console.Flag{ @@ -2423,6 +2643,7 @@ var Commands = []*console.Command{ Name: "delete", Aliases: []*console.Alias{ {Name: "user:delete", Hidden: true}, + {Name: "upsun:user:delete", Hidden: true}, }, Usage: "Delete a user from the project", Flags: []console.Flag{ @@ -2436,6 +2657,7 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "user:get", Hidden: true}, + {Name: "upsun:user:get", Hidden: true}, }, Usage: "View a user's role(s)", Flags: []console.Flag{ @@ -2453,7 +2675,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "user:list", Hidden: true}, + {Name: "upsun:user:list", Hidden: true}, {Name: "cloud:users"}, + {Name: "upsun:users", Hidden: true}, {Name: "users", Hidden: true}, }, Usage: "List project users", @@ -2469,6 +2693,7 @@ var Commands = []*console.Command{ Name: "update", Aliases: []*console.Alias{ {Name: "user:update", Hidden: true}, + {Name: "upsun:user:update", Hidden: true}, }, Usage: "Update user role(s) on a project", Flags: []console.Flag{ @@ -2483,6 +2708,7 @@ var Commands = []*console.Command{ Name: "create", Aliases: []*console.Alias{ {Name: "variable:create", Hidden: true}, + {Name: "upsun:variable:create", Hidden: true}, }, Usage: "Create a variable", Flags: []console.Flag{ @@ -2508,6 +2734,7 @@ var Commands = []*console.Command{ Name: "delete", Aliases: []*console.Alias{ {Name: "variable:delete", Hidden: true}, + {Name: "upsun:variable:delete", Hidden: true}, }, Usage: "Delete a variable", Flags: []console.Flag{ @@ -2523,7 +2750,9 @@ var Commands = []*console.Command{ Name: "get", Aliases: []*console.Alias{ {Name: "variable:get", Hidden: true}, + {Name: "upsun:variable:get", Hidden: true}, {Name: "cloud:vget"}, + {Name: "upsun:vget", Hidden: true}, {Name: "vget", Hidden: true}, }, Usage: "View a variable", @@ -2543,9 +2772,12 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "variable:list", Hidden: true}, + {Name: "upsun:variable:list", Hidden: true}, {Name: "cloud:variables"}, + {Name: "upsun:variables", Hidden: true}, {Name: "variables", Hidden: true}, {Name: "cloud:var"}, + {Name: "upsun:var", Hidden: true}, {Name: "var", Hidden: true}, }, Usage: "List variables", @@ -2563,6 +2795,7 @@ var Commands = []*console.Command{ Name: "update", Aliases: []*console.Alias{ {Name: "variable:update", Hidden: true}, + {Name: "upsun:variable:update", Hidden: true}, }, Usage: "Update a variable", Flags: []console.Flag{ @@ -2586,7 +2819,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "version:list", Hidden: true}, + {Name: "upsun:version:list", Hidden: true}, {Name: "cloud:versions"}, + {Name: "upsun:versions", Hidden: true}, {Name: "versions", Hidden: true}, }, Usage: " ALPHA List environment versions", @@ -2604,7 +2839,9 @@ var Commands = []*console.Command{ Name: "list", Aliases: []*console.Alias{ {Name: "worker:list", Hidden: true}, + {Name: "upsun:worker:list", Hidden: true}, {Name: "cloud:workers"}, + {Name: "upsun:workers", Hidden: true}, {Name: "workers", Hidden: true}, }, Usage: "Get a list of all deployed workers", diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index f5408679..e6233f2d 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -87,7 +87,8 @@ func generateCommands() { if err != nil { panic(err) } - cloudPath, err := platformsh.Install(home) + // as platform.sh and upsun have the same commands, we can use either one + cloudPath, err := platformsh.Install(home, "platform") if err != nil { panic(err.Error()) } @@ -181,8 +182,10 @@ func parseCommands(cloudPath string) (string, error) { if err != nil { return "", err } + aliases = append(aliases, fmt.Sprintf("{Name: \"upsun:%s\", Hidden: true}", command.Name)) for _, alias := range cmdAliases { aliases = append(aliases, fmt.Sprintf("{Name: \"cloud:%s\"}", alias)) + aliases = append(aliases, fmt.Sprintf("{Name: \"upsun:%s\", Hidden: true}", alias)) if namespace != "cloud" && !strings.HasPrefix(command.Name, "self:") { aliases = append(aliases, fmt.Sprintf("{Name: \"%s\", Hidden: true}", alias)) } diff --git a/local/platformsh/installer.go b/local/platformsh/installer.go index 8c1146a1..1da06224 100644 --- a/local/platformsh/installer.go +++ b/local/platformsh/installer.go @@ -49,13 +49,17 @@ type versionCheck struct { } // BinaryPath returns the cloud binary path. -func BinaryPath(home string) string { +func BinaryPath(home, brand string) string { + if brand == "upsun" { + return filepath.Join(home, ".upsun", "bin", "upsun") + } + return filepath.Join(home, ".platformsh", "bin", "platform") } // Install installs or updates the Platform.sh CLI tool. -func Install(home string) (string, error) { - binPath := BinaryPath(home) +func Install(home, brand string) (string, error) { + binPath := BinaryPath(home, brand) versionCheckPath := binPath + ".json" // do we already have the binary? @@ -73,7 +77,7 @@ func Install(home string) (string, error) { } // don't check for the next 24 hours versionCheck.store(versionCheckPath) - if asset, err := getLatestVersion(); err == nil { + if asset, err := getLatestVersion(brand); err == nil { // no new version if asset.version == string(versionCheck.CurrentVersion) { return binPath, nil @@ -82,7 +86,7 @@ func Install(home string) (string, error) { } download: - asset, err := getLatestVersion() + asset, err := getLatestVersion(brand) if err != nil { if binExists { // unable to get the latest version, but we already have a bin, use it @@ -90,7 +94,7 @@ download: } return "", err } - if err := downloadAndExtract(asset, binPath); err != nil { + if err := downloadAndExtract(asset, brand, binPath); err != nil { return "", err } @@ -101,7 +105,7 @@ download: return binPath, nil } -func getLatestVersion() (*githubAsset, error) { +func getLatestVersion(brand string) (*githubAsset, error) { spinner := terminal.NewSpinner(terminal.Stderr) spinner.Start() defer spinner.Stop() @@ -136,7 +140,7 @@ func getLatestVersion() (*githubAsset, error) { if !strings.HasSuffix(a.Name, ".gz") && !strings.HasSuffix(a.Name, ".zip") { continue } - if !strings.Contains(a.Name, "platform") { + if !strings.Contains(a.Name, brand) { continue } if (strings.Contains(a.Name, info.Architecture) && strings.Contains(a.Name, info.Family)) || @@ -146,14 +150,14 @@ func getLatestVersion() (*githubAsset, error) { } } if asset == nil { - return nil, errors.New(fmt.Sprintf("unable to find a suitable Platform.sh CLI tool for your machine (%s/%s)", info.Family, info.Architecture)) + return nil, errors.New(fmt.Sprintf("unable to find a suitable %s CLI tool for your machine (%s/%s)", brand, info.Family, info.Architecture)) } asset.version = manifest.Name return asset, nil } -func downloadAndExtract(asset *githubAsset, binPath string) error { +func downloadAndExtract(asset *githubAsset, brand, binPath string) error { resp, err := http.Get(asset.URL) if err != nil { return err @@ -165,7 +169,7 @@ func downloadAndExtract(asset *githubAsset, binPath string) error { pr, pw := io.Pipe() errs := make(chan error, 1) go func() { - bar := progressbar.DefaultBytes(resp.ContentLength, fmt.Sprintf("Downloading Platform.sh CLI version %s", asset.version)) + bar := progressbar.DefaultBytes(resp.ContentLength, fmt.Sprintf("Downloading %s CLI version %s", brand, asset.version)) if _, err := io.Copy(io.MultiWriter(pw, bar), resp.Body); err != nil { errs <- err } @@ -197,7 +201,7 @@ func downloadAndExtract(asset *githubAsset, binPath string) error { if header.Typeflag != tar.TypeReg { continue } - if header.Name != "platform" { + if header.Name != brand { continue } if _, err := os.Stat(filepath.Dir(binPath)); os.IsNotExist(err) { diff --git a/local/platformsh/project.go b/local/platformsh/project.go index b9440fdd..74f6fe8f 100644 --- a/local/platformsh/project.go +++ b/local/platformsh/project.go @@ -96,10 +96,12 @@ func repositoryRootDir(currentDir string) string { } func getProjectID(projectRoot string, debug bool) string { - contents, err := os.ReadFile(filepath.Join(projectRoot, ".platform", "local", "project.yaml")) + brand := GuessCloudFromDirectory(projectRoot) + + contents, err := os.ReadFile(filepath.Join(projectRoot, "."+brand.Slug, "local", "project.yaml")) if err != nil { if debug { - fmt.Fprintf(os.Stderr, "WARNING: unable to find Platform.sh config file: %s\n", err) + fmt.Fprintf(os.Stderr, "WARNING: unable to find %s config file: %s\n", brand, err) } return "" } @@ -108,7 +110,7 @@ func getProjectID(projectRoot string, debug bool) string { } if err := yaml.Unmarshal(contents, &config); err != nil { if debug { - fmt.Fprintf(os.Stderr, "ERROR: unable to decode Platform.sh config file: %s\n", err) + fmt.Fprintf(os.Stderr, "ERROR: unable to decode %s config file: %s\n", brand, err) } return "" } From 3c1170564512d3e947cf2e23355a138e97a1aff7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 14 Oct 2023 18:38:04 +0200 Subject: [PATCH 183/466] Add reading in .git/config to get the project ID --- local/platformsh/brand.go | 3 +++ local/platformsh/project.go | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/local/platformsh/brand.go b/local/platformsh/brand.go index 459ac1df..7c6b235e 100644 --- a/local/platformsh/brand.go +++ b/local/platformsh/brand.go @@ -29,6 +29,7 @@ type CloudBrand struct { Slug string CommandPrefix string CLIPrefix string + GitRemoteName string } var UpsunBrand = CloudBrand{ @@ -36,12 +37,14 @@ var UpsunBrand = CloudBrand{ Slug: "upsun", CommandPrefix: "upsun:", CLIPrefix: "UPSUN_CLI_", + GitRemoteName: "upsun", } var PlatformshBrand = CloudBrand{ Name: "Platform.sh", Slug: "platformsh", CommandPrefix: "cloud:", CLIPrefix: "PLATFORMSH_CLI_", + GitRemoteName: "platform", } func (b CloudBrand) String() string { diff --git a/local/platformsh/project.go b/local/platformsh/project.go index 74f6fe8f..aa8ab9dd 100644 --- a/local/platformsh/project.go +++ b/local/platformsh/project.go @@ -20,10 +20,13 @@ package platformsh import ( + "bytes" goerr "errors" "fmt" "os" + "os/exec" "path/filepath" + "regexp" "github.com/pkg/errors" "github.com/symfony-cli/symfony-cli/git" @@ -97,7 +100,15 @@ func repositoryRootDir(currentDir string) string { func getProjectID(projectRoot string, debug bool) string { brand := GuessCloudFromDirectory(projectRoot) + id := getProjectIDFromConfigFile(brand, projectRoot, debug) + if id != "" { + return id + } + + return getProjectIDFromGitConfig(brand, projectRoot, debug) +} +func getProjectIDFromConfigFile(brand CloudBrand, projectRoot string, debug bool) string { contents, err := os.ReadFile(filepath.Join(projectRoot, "."+brand.Slug, "local", "project.yaml")) if err != nil { if debug { @@ -116,3 +127,25 @@ func getProjectID(projectRoot string, debug bool) string { } return config.ID } + +func getProjectIDFromGitConfig(brand CloudBrand, projectRoot string, debug bool) string { + for _, remote := range []string{brand.GitRemoteName, "origin"} { + cmd := exec.Command("git", "config", "--get", fmt.Sprintf("remote.%s.url", remote)) + cmd.Dir = projectRoot + cmd.Env = os.Environ() + out := bytes.Buffer{} + cmd.Stdout = &out + if err := cmd.Run(); err != nil { + continue + } + matches := regexp.MustCompile(`^([a-z0-9]{12,})@git\.`).FindSubmatch(out.Bytes()) + if len(matches) > 1 { + return string(matches[1]) + } + return "" + } + if debug { + fmt.Fprintf(os.Stderr, "ERROR: unable to read the git config file\n") + } + return "" +} From fa7d6ecc6b475d4e07b03907894f40f075f7eaa8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 14 Oct 2023 19:17:32 +0200 Subject: [PATCH 184/466] - --- git/remote.go | 11 +++++++++++ local/platformsh/brand.go | 16 +++++++++------- local/platformsh/project.go | 13 ++----------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/git/remote.go b/git/remote.go index d319034b..13a33995 100644 --- a/git/remote.go +++ b/git/remote.go @@ -81,3 +81,14 @@ func GetUpstreamBranch(cwd string, remoteNames ...string) string { return "" } + +func GetRemoteURL(cwd, remote string) string { + args := []string{"config", "--get", fmt.Sprintf("remote.%s.url", remote)} + + out, err := execGitQuiet(cwd, args...) + if err != nil { + return "" + } + + return strings.Trim(out.String(), " \n") +} diff --git a/local/platformsh/brand.go b/local/platformsh/brand.go index 7c6b235e..b01528d2 100644 --- a/local/platformsh/brand.go +++ b/local/platformsh/brand.go @@ -21,6 +21,7 @@ package platformsh import ( "os" + "path/filepath" "strings" ) @@ -57,17 +58,18 @@ func GuessCloudFromCommandName(name string) CloudBrand { return UpsunBrand } - // FIXME: maybe there is something better by passing the dir to this function - dir, err := os.Getwd() - if err != nil { - return PlatformshBrand + if dir, err := os.Getwd(); err == nil { + return GuessCloudFromDirectory(dir) } - return GuessCloudFromDirectory(dir) + return PlatformshBrand } func GuessCloudFromDirectory(dir string) CloudBrand { - // determine the brand when in a project directory with cloud configuration - // FIXME: determine based on the current directory project + for _, brand := range []CloudBrand{UpsunBrand, PlatformshBrand} { + if _, err := os.Stat(filepath.Join(dir, "."+brand.Slug)); err != nil { + return brand + } + } return PlatformshBrand } diff --git a/local/platformsh/project.go b/local/platformsh/project.go index aa8ab9dd..5119a7b1 100644 --- a/local/platformsh/project.go +++ b/local/platformsh/project.go @@ -20,11 +20,9 @@ package platformsh import ( - "bytes" goerr "errors" "fmt" "os" - "os/exec" "path/filepath" "regexp" @@ -130,15 +128,8 @@ func getProjectIDFromConfigFile(brand CloudBrand, projectRoot string, debug bool func getProjectIDFromGitConfig(brand CloudBrand, projectRoot string, debug bool) string { for _, remote := range []string{brand.GitRemoteName, "origin"} { - cmd := exec.Command("git", "config", "--get", fmt.Sprintf("remote.%s.url", remote)) - cmd.Dir = projectRoot - cmd.Env = os.Environ() - out := bytes.Buffer{} - cmd.Stdout = &out - if err := cmd.Run(); err != nil { - continue - } - matches := regexp.MustCompile(`^([a-z0-9]{12,})@git\.`).FindSubmatch(out.Bytes()) + url := git.GetRemoteURL(projectRoot, remote) + matches := regexp.MustCompile(`^([a-z0-9]{12,})@git\.`).FindStringSubmatch(url) if len(matches) > 1 { return string(matches[1]) } From 5d1289769f9a851baed44c55e86f1452cecd4110 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 14 Oct 2023 19:55:08 +0200 Subject: [PATCH 185/466] Add --upsun option to symfony new --- commands/local_new.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/commands/local_new.go b/commands/local_new.go index 7d335c29..2598264d 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -67,6 +67,7 @@ var localNewCmd = &console.Command{ &console.BoolFlag{Name: "book", Usage: "Clone the Symfony: The Fast Track book project"}, &console.BoolFlag{Name: "docker", Usage: "Enable Docker support"}, &console.BoolFlag{Name: "no-git", Usage: "Do not initialize Git"}, + &console.BoolFlag{Name: "upsun", Usage: "Initialize Upsun"}, &console.BoolFlag{Name: "cloud", Usage: "Initialize Platform.sh"}, &console.StringSliceFlag{Name: "service", Usage: "Configure some services", Hidden: true}, &console.BoolFlag{Name: "debug", Usage: "Display commands output"}, @@ -130,8 +131,9 @@ var localNewCmd = &console.Command{ if c.Bool("webapp") && c.Bool("no-git") { return console.Exit("The --webapp flag cannot be used with --no-git", 1) } - if len(c.StringSlice("service")) > 0 && !c.Bool("cloud") { - return console.Exit("The --service flag cannot be used without --cloud", 1) + withCloud := c.Bool("cloud") || c.Bool("upsun") + if len(c.StringSlice("service")) > 0 && !withCloud { + return console.Exit("The --service flag cannot be used without --cloud or --upsun", 1) } s := terminal.NewSpinner(terminal.Stderr) @@ -147,7 +149,7 @@ var localNewCmd = &console.Command{ return err } - if "" != c.String("php") && !c.Bool("cloud") { + if "" != c.String("php") && !withCloud { if err := createPhpVersionFile(c.String("php"), dir); err != nil { return err } @@ -172,7 +174,7 @@ var localNewCmd = &console.Command{ } } - if c.Bool("cloud") { + if withCloud { if err := runComposer(c, dir, []string{"require", "platformsh"}, c.Bool("debug")); err != nil { return err } @@ -322,7 +324,7 @@ func initProjectGit(c *console.Context, s *terminal.Spinner, dir string) error { terminal.Printfln(" (running git init %s)\n", dir) // Only force the branch to be "main" when running a Cloud context to make // onboarding simpler. - if buf, err := git.Init(dir, c.Bool("cloud"), c.Bool("debug")); err != nil { + if buf, err := git.Init(dir, c.Bool("cloud") || c.Bool("upsun"), c.Bool("debug")); err != nil { fmt.Print(buf.String()) return err } From f8781921152f6807af0dd9698142230d439b7301 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Oct 2023 09:16:33 +0200 Subject: [PATCH 186/466] Add support in templates --- commands/init_templating.go | 21 ++++++++++++++------- commands/local_new.go | 10 ++++++---- commands/project_init.go | 6 +++++- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/commands/init_templating.go b/commands/init_templating.go index 13bc8754..aa797a42 100644 --- a/commands/init_templating.go +++ b/commands/init_templating.go @@ -187,7 +187,7 @@ func getTemplates(brand platformsh.CloudBrand, rootDirectory, chosenTemplateName } if brand == platformsh.UpsunBrand { - chosenTemplateName = filepath.Join(brand.Slug, chosenTemplateName) + directory = filepath.Join(directory, "upsun") } if isURL, isFile := isValidURL(chosenTemplateName), isValidFilePath(chosenTemplateName); isURL || isFile { var ( @@ -293,14 +293,21 @@ func getTemplates(brand platformsh.CloudBrand, rootDirectory, chosenTemplateName ` templateFuncs := getTemplateFuncs(rootDirectory, minorPHPVersion) - - templates := map[string]*template.Template{ - ".platform.app.yaml": template.Must(template.New("output").Funcs(templateFuncs).Parse(foundTemplate.Template)), - ".platform/services.yaml": template.Must(template.New("output").Funcs(templateFuncs).Parse(servicesyaml)), - ".platform/routes.yaml": template.Must(template.New("output").Funcs(templateFuncs).Parse(`"https://{all}/": { type: upstream, upstream: "{{.Slug}}:http" } + var templates map[string]*template.Template + if brand == platformsh.UpsunBrand { + templates = map[string]*template.Template{ + ".upsun/config.yaml": template.Must(template.New("output").Funcs(templateFuncs).Parse(foundTemplate.Template)), + "php.ini": template.Must(template.New("output").Funcs(templateFuncs).Parse(string(phpini))), + } + } else { + templates = map[string]*template.Template{ + ".platform.app.yaml": template.Must(template.New("output").Funcs(templateFuncs).Parse(foundTemplate.Template)), + ".platform/services.yaml": template.Must(template.New("output").Funcs(templateFuncs).Parse(servicesyaml)), + ".platform/routes.yaml": template.Must(template.New("output").Funcs(templateFuncs).Parse(`"https://{all}/": { type: upstream, upstream: "{{.Slug}}:http" } "http://{all}/": { type: redirect, to: "https://{all}/" } `)), - "php.ini": template.Must(template.New("output").Funcs(templateFuncs).Parse(string(phpini))), + "php.ini": template.Must(template.New("output").Funcs(templateFuncs).Parse(string(phpini))), + } } for path, tpl := range foundTemplate.ExtraFiles { diff --git a/commands/local_new.go b/commands/local_new.go index 2598264d..91bbb4cf 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -183,7 +183,11 @@ var localNewCmd = &console.Command{ fmt.Print(buf.String()) return err } - if err := initCloud(c, s, minorPHPVersion, dir); err != nil { + brand := platformsh.PlatformshBrand + if c.Bool("upsun") { + brand = platformsh.UpsunBrand + } + if err := initCloud(c, brand, s, minorPHPVersion, dir); err != nil { return err } } @@ -212,9 +216,7 @@ func isEmpty(dir string) (bool, error) { return false, err } -func initCloud(c *console.Context, s *terminal.Spinner, minorPHPVersion, dir string) error { - brand := platformsh.GuessCloudFromCommandName(c.Command.UserName) - +func initCloud(c *console.Context, brand platformsh.CloudBrand, s *terminal.Spinner, minorPHPVersion, dir string) error { terminal.Printfln("* Adding %s configuration", brand) cloudServices, err := parseCloudServices(dir, c.StringSlice("service")) diff --git a/commands/project_init.go b/commands/project_init.go index f7c40f0f..faf312e7 100644 --- a/commands/project_init.go +++ b/commands/project_init.go @@ -46,6 +46,7 @@ Templates used by this tool are fetched from ` + templatesGitRepository + `. &console.StringFlag{Name: "title", Usage: "Project title", DefaultText: "autodetermined based on directory name"}, &console.StringFlag{Name: "slug", DefaultValue: "app", Usage: "Project slug"}, &console.StringFlag{Name: "php", Usage: "PHP version to use"}, + &console.BoolFlag{Name: "upsun", Usage: "Initialize Upsun"}, // FIXME: services should also be used to configure Docker? Instead of Flex? // FIXME: services can also be guessed via the existing Docker Compose file? &console.StringSliceFlag{Name: "service", Usage: "Configure some services", Hidden: true}, @@ -80,7 +81,10 @@ Templates used by this tool are fetched from ` + templatesGitRepository + `. return err } - brand := platformsh.GuessCloudFromCommandName(c.Command.UserName) + brand := platformsh.PlatformshBrand + if c.Bool("upsun") { + brand = platformsh.UpsunBrand + } createdFiles, err := createRequiredFilesProject(brand, projectDir, slug, c.String("template"), minorPHPVersion, cloudServices, c.Bool("dump"), c.Bool("force")) if err != nil { return err From 43ff5928e3a41fd37c12967c398112666e99b131 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Oct 2023 09:37:57 +0200 Subject: [PATCH 187/466] Add missing alias --- local/platformsh/commands.go | 1 + local/platformsh/generator/commands.go | 1 + 2 files changed, 2 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index f879b7de..1ea14ce8 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1025,6 +1025,7 @@ var Commands = []*console.Command{ {Name: "push", Hidden: true}, {Name: "deploy"}, {Name: "cloud:deploy"}, + {Name: "upsun:deploy", Hidden: true}, }, Usage: "Push code to an environment", Flags: []console.Flag{ diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index e6233f2d..22ca3f7e 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -193,6 +193,7 @@ func parseCommands(cloudPath string) (string, error) { if command.Name == "environment:push" { aliases = append(aliases, "{Name: \"deploy\"}") aliases = append(aliases, "{Name: \"cloud:deploy\"}") + aliases = append(aliases, "{Name: \"upsun:deploy\", Hidden: true}") } aliasesAsString := "" if len(aliases) > 0 { From 807cc4c1d29225653d45ed448dc6e3ee6f416c93 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Oct 2023 10:45:22 +0200 Subject: [PATCH 188/466] Fix logic --- local/platformsh/brand.go | 2 +- local/platformsh/cli.go | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/local/platformsh/brand.go b/local/platformsh/brand.go index b01528d2..f182f6a1 100644 --- a/local/platformsh/brand.go +++ b/local/platformsh/brand.go @@ -67,7 +67,7 @@ func GuessCloudFromCommandName(name string) CloudBrand { func GuessCloudFromDirectory(dir string) CloudBrand { for _, brand := range []CloudBrand{UpsunBrand, PlatformshBrand} { - if _, err := os.Stat(filepath.Join(dir, "."+brand.Slug)); err != nil { + if _, err := os.Stat(filepath.Join(dir, "."+brand.Slug)); err == nil { return brand } } diff --git a/local/platformsh/cli.go b/local/platformsh/cli.go index 1f9202bb..90c1d391 100644 --- a/local/platformsh/cli.go +++ b/local/platformsh/cli.go @@ -137,13 +137,13 @@ func (p *CLI) proxyPSHCmd(commandName string) console.ActionFunc { return err } } - return p.executor(append([]string{ctx.Command.UserName}, ctx.Args().Slice()...)).Run() + brand := GuessCloudFromCommandName(ctx.Command.UserName) + return p.executor(brand, append([]string{commandName}, ctx.Args().Slice()...)).Run() } }(commandName) } -func (p *CLI) executor(args []string) *exec.Cmd { - brand := GuessCloudFromCommandName(args[0]) +func (p *CLI) executor(brand CloudBrand, args []string) *exec.Cmd { prefix := brand.CLIPrefix env := []string{ @@ -166,7 +166,8 @@ func (p *CLI) executor(args []string) *exec.Cmd { func (p *CLI) RunInteractive(logger zerolog.Logger, projectDir string, args []string, debug bool, stdin io.Reader) (bytes.Buffer, bool) { var buf bytes.Buffer - cmd := p.executor(args) + brand := GuessCloudFromCommandName(args[0]) + cmd := p.executor(brand, args) if projectDir != "" { cmd.Dir = projectDir } @@ -193,7 +194,8 @@ func (p *CLI) WrapHelpPrinter() func(w io.Writer, templ string, data interface{} switch cmd := data.(type) { case *console.Command: if strings.HasPrefix(cmd.Category, "cloud") { - cmd := p.executor([]string{cmd.UserName, "--help"}) + brand := GuessCloudFromCommandName(cmd.UserName) + cmd := p.executor(brand, []string{cmd.FullName(), "--help"}) cmd.Run() } else { currentHelpPrinter(w, templ, data) From d8776ed1d679337f92315fab49dda06a64df2737 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Oct 2023 12:59:48 +0200 Subject: [PATCH 189/466] Fix tests --- envs/local_test.go | 2 +- local/platformsh/brand.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/envs/local_test.go b/envs/local_test.go index d3d635a3..1eaabf4a 100644 --- a/envs/local_test.go +++ b/envs/local_test.go @@ -47,7 +47,7 @@ func (s *LocalSuite) TestTunnelFilePath(c *C) { defer func() { os.Rename("testdata/project/.git", "testdata/project/git") }() - project, err := platformsh.ProjectFromDir(l.Dir, false) + project, err := platformsh.ProjectFromDir(l.Dir, true) if err != nil { panic(err) } diff --git a/local/platformsh/brand.go b/local/platformsh/brand.go index f182f6a1..9e29ef01 100644 --- a/local/platformsh/brand.go +++ b/local/platformsh/brand.go @@ -42,7 +42,7 @@ var UpsunBrand = CloudBrand{ } var PlatformshBrand = CloudBrand{ Name: "Platform.sh", - Slug: "platformsh", + Slug: "platform", CommandPrefix: "cloud:", CLIPrefix: "PLATFORMSH_CLI_", GitRemoteName: "platform", From e23cc90d4502880fed282918ae1ba1309f655044 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Oct 2023 14:30:34 +0200 Subject: [PATCH 190/466] Refactor --- local/platformsh/brand.go | 43 ++++++++++++++++---------- local/platformsh/cli.go | 7 +++-- local/platformsh/generator/commands.go | 2 +- local/platformsh/installer.go | 21 ++++--------- local/platformsh/project.go | 2 +- 5 files changed, 39 insertions(+), 36 deletions(-) diff --git a/local/platformsh/brand.go b/local/platformsh/brand.go index 9e29ef01..d11d2dba 100644 --- a/local/platformsh/brand.go +++ b/local/platformsh/brand.go @@ -26,32 +26,43 @@ import ( ) type CloudBrand struct { - Name string - Slug string - CommandPrefix string - CLIPrefix string - GitRemoteName string + Name string + ProjectConfigPath string + CommandPrefix string + CLIConfigPath string + CLIPrefix string + GitRemoteName string + BinName string } var UpsunBrand = CloudBrand{ - Name: "Upsun", - Slug: "upsun", - CommandPrefix: "upsun:", - CLIPrefix: "UPSUN_CLI_", - GitRemoteName: "upsun", + Name: "Upsun", + ProjectConfigPath: ".upsun", + CommandPrefix: "upsun:", + CLIConfigPath: ".upsun", + CLIPrefix: "UPSUN_CLI_", + GitRemoteName: "upsun", + BinName: "upsun", } var PlatformshBrand = CloudBrand{ - Name: "Platform.sh", - Slug: "platform", - CommandPrefix: "cloud:", - CLIPrefix: "PLATFORMSH_CLI_", - GitRemoteName: "platform", + Name: "Platform.sh", + ProjectConfigPath: ".platform", + CLIConfigPath: ".platformsh", + CLIPrefix: "PLATFORMSH_CLI_", + CommandPrefix: "cloud:", + GitRemoteName: "platform", + BinName: "platform", } func (b CloudBrand) String() string { return b.Name } +// BinaryPath returns the cloud binary path. +func (b CloudBrand) BinaryPath() string { + return filepath.Join(b.CLIConfigPath, "bin", b.BinName) +} + func GuessCloudFromCommandName(name string) CloudBrand { // if the namespace is upsun, then that's the brand we want to use if strings.HasPrefix(name, "upsun:") { @@ -67,7 +78,7 @@ func GuessCloudFromCommandName(name string) CloudBrand { func GuessCloudFromDirectory(dir string) CloudBrand { for _, brand := range []CloudBrand{UpsunBrand, PlatformshBrand} { - if _, err := os.Stat(filepath.Join(dir, "."+brand.Slug)); err == nil { + if _, err := os.Stat(filepath.Join(dir, brand.ProjectConfigPath)); err == nil { return brand } } diff --git a/local/platformsh/cli.go b/local/platformsh/cli.go index 90c1d391..6d1cf0a0 100644 --- a/local/platformsh/cli.go +++ b/local/platformsh/cli.go @@ -26,6 +26,7 @@ import ( "io" "os" "os/exec" + "path/filepath" "strings" "sync" @@ -88,7 +89,7 @@ func (p *CLI) AddBeforeHook(name string, f console.BeforeFunc) { } } -func (p *CLI) getPath(brand string) string { +func (p *CLI) getPath(brand CloudBrand) string { if p.path != "" { return p.path } @@ -99,7 +100,7 @@ func (p *CLI) getPath(brand string) string { } // the Platform.sh CLI is always available on the containers thanks to the configurator - p.path = BinaryPath(home, brand) + p.path = filepath.Join(home, brand.BinaryPath()) if !util.InCloud() { if cloudPath, err := Install(home, brand); err == nil { p.path = cloudPath @@ -156,7 +157,7 @@ func (p *CLI) executor(brand CloudBrand, args []string) *exec.Cmd { env = append(env, fmt.Sprintf("%sUPDATES_CHECK=0", prefix)) } args[0] = strings.TrimPrefix(strings.TrimPrefix(args[0], "upsun:"), "cloud:") - cmd := exec.Command(p.getPath(brand.Slug), args...) + cmd := exec.Command(p.getPath(brand), args...) cmd.Env = append(os.Environ(), env...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index 22ca3f7e..9435b5a3 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -88,7 +88,7 @@ func generateCommands() { panic(err) } // as platform.sh and upsun have the same commands, we can use either one - cloudPath, err := platformsh.Install(home, "platform") + cloudPath, err := platformsh.Install(home, platformsh.PlatformshBrand) if err != nil { panic(err.Error()) } diff --git a/local/platformsh/installer.go b/local/platformsh/installer.go index 1da06224..d5589a77 100644 --- a/local/platformsh/installer.go +++ b/local/platformsh/installer.go @@ -48,18 +48,9 @@ type versionCheck struct { Timestamp int64 } -// BinaryPath returns the cloud binary path. -func BinaryPath(home, brand string) string { - if brand == "upsun" { - return filepath.Join(home, ".upsun", "bin", "upsun") - } - - return filepath.Join(home, ".platformsh", "bin", "platform") -} - // Install installs or updates the Platform.sh CLI tool. -func Install(home, brand string) (string, error) { - binPath := BinaryPath(home, brand) +func Install(home string, brand CloudBrand) (string, error) { + binPath := filepath.Join(home, brand.BinaryPath()) versionCheckPath := binPath + ".json" // do we already have the binary? @@ -105,7 +96,7 @@ download: return binPath, nil } -func getLatestVersion(brand string) (*githubAsset, error) { +func getLatestVersion(brand CloudBrand) (*githubAsset, error) { spinner := terminal.NewSpinner(terminal.Stderr) spinner.Start() defer spinner.Stop() @@ -140,7 +131,7 @@ func getLatestVersion(brand string) (*githubAsset, error) { if !strings.HasSuffix(a.Name, ".gz") && !strings.HasSuffix(a.Name, ".zip") { continue } - if !strings.Contains(a.Name, brand) { + if !strings.Contains(a.Name, brand.BinName) { continue } if (strings.Contains(a.Name, info.Architecture) && strings.Contains(a.Name, info.Family)) || @@ -157,7 +148,7 @@ func getLatestVersion(brand string) (*githubAsset, error) { return asset, nil } -func downloadAndExtract(asset *githubAsset, brand, binPath string) error { +func downloadAndExtract(asset *githubAsset, brand CloudBrand, binPath string) error { resp, err := http.Get(asset.URL) if err != nil { return err @@ -201,7 +192,7 @@ func downloadAndExtract(asset *githubAsset, brand, binPath string) error { if header.Typeflag != tar.TypeReg { continue } - if header.Name != brand { + if header.Name != brand.BinName { continue } if _, err := os.Stat(filepath.Dir(binPath)); os.IsNotExist(err) { diff --git a/local/platformsh/project.go b/local/platformsh/project.go index 5119a7b1..1ca6993e 100644 --- a/local/platformsh/project.go +++ b/local/platformsh/project.go @@ -107,7 +107,7 @@ func getProjectID(projectRoot string, debug bool) string { } func getProjectIDFromConfigFile(brand CloudBrand, projectRoot string, debug bool) string { - contents, err := os.ReadFile(filepath.Join(projectRoot, "."+brand.Slug, "local", "project.yaml")) + contents, err := os.ReadFile(filepath.Join(projectRoot, brand.ProjectConfigPath, "local", "project.yaml")) if err != nil { if debug { fmt.Fprintf(os.Stderr, "WARNING: unable to find %s config file: %s\n", brand, err) From e3040f2c53f70e6152892757aed0a412c0913f68 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Oct 2023 17:22:20 +0200 Subject: [PATCH 191/466] Add more Upsun support in error/help messages --- book/checkout.go | 4 +++- commands/local_new.go | 4 ++-- commands/local_php_list.go | 2 +- commands/local_server_status.go | 2 +- commands/project_init.go | 2 +- envs/local.go | 10 ++++++---- envs/local_test.go | 17 ++++++++++++++--- envs/local_tunnel.go | 3 ++- local/php/php_server.go | 2 +- local/php/toolbar.go | 2 +- local/platformsh/cli.go | 2 +- local/platformsh/commands.go | 14 +++++++------- local/platformsh/generator/commands.go | 1 + local/platformsh/project.go | 4 ++-- 14 files changed, 43 insertions(+), 26 deletions(-) diff --git a/book/checkout.go b/book/checkout.go index b9288399..b79be13c 100644 --- a/book/checkout.go +++ b/book/checkout.go @@ -29,6 +29,7 @@ import ( "time" "github.com/pkg/errors" + "github.com/symfony-cli/symfony-cli/local/platformsh" "github.com/symfony-cli/terminal" ) @@ -119,7 +120,8 @@ func (b *Book) Checkout(step string) error { printBanner("[WEB] Stopping the Local Web Server", b.Debug) executeCommand([]string{"symfony", "server:stop"}, b.Debug, true, nil) - printBanner("[WEB] Stopping the Platform.sh tunnel", b.Debug) + brand := platformsh.GuessCloudFromDirectory(b.Dir) + printBanner(fmt.Sprintf("[WEB] Stopping the %s tunnel", brand.Name), b.Debug) if err := executeCommand([]string{"symfony", "tunnel:close", "-y"}, b.Debug, true, nil); err != nil { return err } diff --git a/commands/local_new.go b/commands/local_new.go index 91bbb4cf..ce327f75 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -67,8 +67,8 @@ var localNewCmd = &console.Command{ &console.BoolFlag{Name: "book", Usage: "Clone the Symfony: The Fast Track book project"}, &console.BoolFlag{Name: "docker", Usage: "Enable Docker support"}, &console.BoolFlag{Name: "no-git", Usage: "Do not initialize Git"}, - &console.BoolFlag{Name: "upsun", Usage: "Initialize Upsun"}, - &console.BoolFlag{Name: "cloud", Usage: "Initialize Platform.sh"}, + &console.BoolFlag{Name: "upsun", Usage: "Initialize Upsun configuration"}, + &console.BoolFlag{Name: "cloud", Usage: "Initialize Platform.sh configuration"}, &console.StringSliceFlag{Name: "service", Usage: "Configure some services", Hidden: true}, &console.BoolFlag{Name: "debug", Usage: "Display commands output"}, &console.StringFlag{Name: "php", Usage: "PHP version to use"}, diff --git a/commands/local_php_list.go b/commands/local_php_list.go index b570e639..967d80ff 100644 --- a/commands/local_php_list.go +++ b/commands/local_php_list.go @@ -90,7 +90,7 @@ var localPhpListCmd = &console.Command{ terminal.Println("") terminal.Println("To control the version used in a directory, create a .php-version file that contains the version number (e.g. 7.2 or 7.2.15),") terminal.Println("or define config.platform.php inside composer.json.") - terminal.Println("If you're using Platform.sh, the version can also be specified in the .platform.app.yaml file.") + terminal.Println("If you're using Platform.sh or Upsun, the version can also be specified in their configuration files.") return nil }, diff --git a/commands/local_server_status.go b/commands/local_server_status.go index 13936caf..7ea06454 100644 --- a/commands/local_server_status.go +++ b/commands/local_server_status.go @@ -103,7 +103,7 @@ func printWebServerStatus(projectDir string) error { env := envs.AsMap(data) envVars := `None` if env["SYMFONY_TUNNEL"] != "" && env["SYMFONY_TUNNEL_ENV"] != "" { - envVars = `Exposed from Platform.sh` + envVars = fmt.Sprintf(`Exposed from %s`, env["SYMFONY_TUNNEL_BRAND"]) } if env["SYMFONY_DOCKER_ENV"] == "1" && env["SYMFONY_TUNNEL_ENV"] == "" { envVars = `Exposed from Docker` diff --git a/commands/project_init.go b/commands/project_init.go index faf312e7..bf7b572b 100644 --- a/commands/project_init.go +++ b/commands/project_init.go @@ -107,7 +107,7 @@ Templates used by this tool are fetched from ` + templatesGitRepository + `. ui.Section("Next Steps") terminal.Println(" * Adapt the generated files if needed") - terminal.Printf(" * Commit them: git add %s && git commit -m\"Add Platform.sh configuration\"\n", strings.Join(createdFiles, " ")) + terminal.Printf(" * Commit them: git add %s && git commit -m\"Add %s configuration\"\n", strings.Join(createdFiles, " "), brand.Name) terminal.Printf(" * Deploy: %s deploy\n", c.App.HelpName) } else { terminal.Printf("Deploy the project via %s deploy.\n", c.App.HelpName) diff --git a/envs/local.go b/envs/local.go index ca2dfd3d..a278c1b3 100644 --- a/envs/local.go +++ b/envs/local.go @@ -160,7 +160,8 @@ func (l *Local) Relationships() Relationships { project, err := platformsh.ProjectFromDir(l.Dir, l.Debug) if err != nil { if l.Debug { - fmt.Fprint(os.Stderr, "ERROR: unable to get Platform.sh project information\n") + brand := platformsh.GuessCloudFromDirectory(l.Dir) + fmt.Fprintf(os.Stderr, "ERROR: unable to get %s project information\n", brand.Name) } return dockerRel } @@ -195,9 +196,10 @@ func (l *Local) Extra() Envs { sc = "1" } env := Envs{ - "SYMFONY_TUNNEL": l.Tunnel, - "SYMFONY_TUNNEL_ENV": sc, - "SYMFONY_DOCKER_ENV": docker, + "SYMFONY_TUNNEL": l.Tunnel, + "SYMFONY_TUNNEL_ENV": sc, + "SYMFONY_TUNNEL_BRAND": platformsh.GuessCloudFromDirectory(l.Dir).Name, + "SYMFONY_DOCKER_ENV": docker, } if _, err := os.Stat(filepath.Join(l.Dir, ".prod")); err == nil { env["APP_ENV"] = "prod" diff --git a/envs/local_test.go b/envs/local_test.go index 1eaabf4a..1fd344b3 100644 --- a/envs/local_test.go +++ b/envs/local_test.go @@ -35,9 +35,20 @@ var _ = Suite(&LocalSuite{}) func (s *LocalSuite) TestExtra(c *C) { l := &Local{} c.Assert(l.Extra(), DeepEquals, Envs{ - "SYMFONY_TUNNEL": "", - "SYMFONY_TUNNEL_ENV": "", - "SYMFONY_DOCKER_ENV": "", + "SYMFONY_TUNNEL": "", + "SYMFONY_TUNNEL_ENV": "", + "SYMFONY_TUNNEL_BRAND": "Platform.sh", + "SYMFONY_DOCKER_ENV": "", + }) + + l = &Local{ + Dir: "testdata/upsun", + } + c.Assert(l.Extra(), DeepEquals, Envs{ + "SYMFONY_TUNNEL": "", + "SYMFONY_TUNNEL_ENV": "", + "SYMFONY_TUNNEL_BRAND": "Upsun", + "SYMFONY_DOCKER_ENV": "", }) } diff --git a/envs/local_tunnel.go b/envs/local_tunnel.go index fd38ae2e..64cf56ef 100644 --- a/envs/local_tunnel.go +++ b/envs/local_tunnel.go @@ -47,7 +47,8 @@ func (l *Local) relationshipsFromTunnel() Relationships { project, err := platformsh.ProjectFromDir(l.Dir, l.Debug) if err != nil { if l.Debug { - fmt.Fprintf(os.Stderr, "WARNING: unable to detect Platform.sh project: %s\n", err) + brand := platformsh.GuessCloudFromDirectory(l.Dir) + fmt.Fprintf(os.Stderr, "WARNING: unable to detect %s project: %s\n", brand.Name, err) } return nil } diff --git a/local/php/php_server.go b/local/php/php_server.go index 2663d102..a294a70b 100644 --- a/local/php/php_server.go +++ b/local/php/php_server.go @@ -254,7 +254,7 @@ func (p *Server) serveFastCGI(env map[string]string, w http.ResponseWriter, r *h func (p *Server) writeResponse(w http.ResponseWriter, r *http.Request, env map[string]string, resp *http.Response) error { defer resp.Body.Close() if env["SYMFONY_TUNNEL"] != "" && env["SYMFONY_TUNNEL_ENV"] == "" { - p.logger.Warn().Msg("Tunnel to Platform.sh open but environment variables not exposed") + p.logger.Warn().Msgf("Tunnel to %s open but environment variables not exposed", env["SYMFONY_TUNNEL_BRAND"]) } bodyModified := false if r.Method == http.MethodGet && r.Header.Get("x-requested-with") == "XMLHttpRequest" { diff --git a/local/php/toolbar.go b/local/php/toolbar.go index 24843160..7ced0111 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -67,7 +67,7 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea if env["SYMFONY_TUNNEL"] != "" { tunnel = fmt.Sprintf(`Up (%s)`, env["SYMFONY_TUNNEL"]) if env["SYMFONY_TUNNEL_ENV"] != "" { - envVars = `from Platform.sh` + envVars = fmt.Sprintf(`from %s`, env["SYMFONY_TUNNEL_BRAND"]) logoBg = "sf-toolbar-status-green" } else { logoBg = "sf-toolbar-status-yellow" diff --git a/local/platformsh/cli.go b/local/platformsh/cli.go index 6d1cf0a0..89fe6f39 100644 --- a/local/platformsh/cli.go +++ b/local/platformsh/cli.go @@ -54,7 +54,7 @@ func Get() (*CLI, error) { pshOnce.Do(func() { psh, err = newCLI() if err != nil { - err = errors.Wrap(err, "Unable to setup Platform.sh CLI") + err = errors.Wrap(err, "Unable to setup Platform.sh/Upsun CLI") } }) return psh, err diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 1ea14ce8..36ca0e8a 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -48,7 +48,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "upsun:bot", Hidden: true}, }, - Usage: "The Platform.sh Bot", + Usage: "The Platform.sh/Upsun Bot", Hidden: console.Hide, Flags: []console.Flag{ &console.BoolFlag{Name: "parrot",}, @@ -123,7 +123,7 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "upsun:welcome", Hidden: true}, }, - Usage: "Welcome to Platform.sh", + Usage: "Welcome to Platform.sh/Upsun", Hidden: console.Hide, }, { @@ -235,7 +235,7 @@ var Commands = []*console.Command{ {Name: "api:curl", Hidden: true}, {Name: "upsun:api:curl", Hidden: true}, }, - Usage: "Run an authenticated cURL request on the Platform.sh API", + Usage: "Run an authenticated cURL request on the Platform.sh/Upsun API", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "data", Aliases: []string{"d"},}, @@ -303,7 +303,7 @@ var Commands = []*console.Command{ {Name: "auth:api-token-login", Hidden: true}, {Name: "upsun:auth:api-token-login", Hidden: true}, }, - Usage: "Log in to Platform.sh using an API token", + Usage: "Log in to Platform.sh/Upsun using an API token", }, { Category: "cloud:auth", @@ -315,7 +315,7 @@ var Commands = []*console.Command{ {Name: "upsun:login", Hidden: true}, {Name: "login", Hidden: true}, }, - Usage: "Log in to Platform.sh via a browser", + Usage: "Log in to Platform.sh/Upsun via a browser", Flags: []console.Flag{ &console.StringFlag{Name: "browser",}, &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, @@ -349,7 +349,7 @@ var Commands = []*console.Command{ {Name: "upsun:logout", Hidden: true}, {Name: "logout", Hidden: true}, }, - Usage: "Log out of Platform.sh", + Usage: "Log out of Platform.sh/Upsun", Flags: []console.Flag{ &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, &console.BoolFlag{Name: "other",}, @@ -362,7 +362,7 @@ var Commands = []*console.Command{ {Name: "auth:token", Hidden: true}, {Name: "upsun:auth:token", Hidden: true}, }, - Usage: "Obtain an OAuth 2 access token for requests to Platform.sh APIs", + Usage: "Obtain an OAuth 2 access token for requests to Platform.sh/Upsun APIs", Hidden: console.Hide, Flags: []console.Flag{ &console.BoolFlag{Name: "header", Aliases: []string{"H"},}, diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index 9435b5a3..21af685f 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -258,6 +258,7 @@ func parseCommands(cloudPath string) (string, error) { flagsAsString += "\t\t}," } + command.Description = strings.ReplaceAll(command.Description, "Platform.sh", "Platform.sh/Upsun") definitionAsString += fmt.Sprintf(` { Category: "%s", Name: "%s",%s diff --git a/local/platformsh/project.go b/local/platformsh/project.go index 1ca6993e..8db7162d 100644 --- a/local/platformsh/project.go +++ b/local/platformsh/project.go @@ -32,8 +32,8 @@ import ( ) var ( - ErrProjectRootNotFoundNoGitRemote = goerr.New("project root not found, current directory not linked to a Platform.sh project") - ErrNoGitBranchMatching = goerr.New("current git branch name doesn't match any Platform.sh environments") + ErrProjectRootNotFoundNoGitRemote = goerr.New("project root not found, current directory not linked to a Platform.sh/Upsun project") + ErrNoGitBranchMatching = goerr.New("current git branch name doesn't match any Platform.sh/Upsun environments") ) type Project struct { From 23beee9b68e78825ff7daaa8932fa19dd6517c7c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 17 Oct 2023 16:49:22 +0200 Subject: [PATCH 192/466] Add support for discovering apps in Upsun projects --- envs/testdata/upsun/.upsun/local/project.yaml | 2 + local/platformsh/applications.go | 52 ++++++++++++++++--- 2 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 envs/testdata/upsun/.upsun/local/project.yaml diff --git a/envs/testdata/upsun/.upsun/local/project.yaml b/envs/testdata/upsun/.upsun/local/project.yaml new file mode 100644 index 00000000..b65886e8 --- /dev/null +++ b/envs/testdata/upsun/.upsun/local/project.yaml @@ -0,0 +1,2 @@ +id: ism4mega7wpx6 +host: fr-3.platform.sh diff --git a/local/platformsh/applications.go b/local/platformsh/applications.go index ffe0bd5c..fbeb2967 100644 --- a/local/platformsh/applications.go +++ b/local/platformsh/applications.go @@ -29,8 +29,6 @@ import ( yaml "gopkg.in/yaml.v2" ) -// FIXME: update the logic for Upsun - var skippedDirectories = map[string]interface{}{ ".git": nil, "vendor": nil, @@ -48,6 +46,15 @@ var skippedDirectories = map[string]interface{}{ "src": nil, } +type UpsunDotYaml struct { + Applications map[string]struct { + LocalApplication `yaml:",inline"` + Source struct { + Root string + } + } +} + // Only a wrapper type around LocalApplication used to get Access to // `source.root` when unmarshalling type ApplicationsDotYaml []struct { @@ -94,6 +101,7 @@ func FindLocalApplications(rootDirectory string) LocalApplications { return apps } + brand := GuessCloudFromDirectory(rootDirectory) go func() { for file := range appParser { content, err := os.ReadFile(file) @@ -102,8 +110,22 @@ func FindLocalApplications(rootDirectory string) LocalApplications { continue } + if brand == UpsunBrand { + var config UpsunDotYaml + if err := yaml.Unmarshal(content, &config); err != nil { + terminal.Logger.Error().Msgf("Could not decode %s YAML file: %s\n", file, err) + continue + } + for _, app := range config.Applications { + app.DefinitionFile = file + app.LocalRootDir = filepath.Join(rootDirectory, app.Source.Root) + apps = append(apps, app.LocalApplication) + } + continue + } + if strings.HasSuffix(file, filepath.Join(".platform", "applications.yaml")) { - multiApps := ApplicationsDotYaml{} + var multiApps ApplicationsDotYaml if err := yaml.Unmarshal(content, &multiApps); err != nil { terminal.Logger.Error().Msgf("Could not decode %s YAML file: %s\n", file, err) continue @@ -129,7 +151,7 @@ func FindLocalApplications(rootDirectory string) LocalApplications { appParsingDone <- true }() - for _, path := range findAppConfigFiles(rootDirectory) { + for _, path := range findAppConfigFiles(brand, rootDirectory) { appParser <- path } @@ -140,8 +162,22 @@ func FindLocalApplications(rootDirectory string) LocalApplications { return apps } -func findAppConfigFiles(dir string) []string { - dirs := []string{} +func findAppConfigFiles(brand CloudBrand, dir string) []string { + files := []string{} + if brand == UpsunBrand { + dir = filepath.Join(dir, brand.CLIConfigPath) + fs, err := os.ReadDir(dir) + if err != nil { + return files + } + for _, f := range fs { + if strings.HasSuffix(f.Name(), ".yaml") { + files = append(files, filepath.Join(dir, f.Name())) + } + } + return files + } + separator := string(filepath.Separator) rootDirectoryLen := len(dir) + 1 _ = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { @@ -167,12 +203,12 @@ func findAppConfigFiles(dir string) []string { } if info.Name() == "applications.yaml" || info.Name() == ".platform.app.yaml" { - dirs = append(dirs, path) + files = append(files, path) } return nil }) - return dirs + return files } func GuessSelectedAppByWd(apps LocalApplications) *LocalApplication { From 800d312ea488d2c5e5aadfd93c65e42fee2134b1 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 17 Oct 2023 17:15:06 +0200 Subject: [PATCH 193/466] Simplify code --- commands/project_init.go | 2 +- envs/local.go | 2 +- envs/local_tunnel.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/project_init.go b/commands/project_init.go index bf7b572b..a8f474bc 100644 --- a/commands/project_init.go +++ b/commands/project_init.go @@ -107,7 +107,7 @@ Templates used by this tool are fetched from ` + templatesGitRepository + `. ui.Section("Next Steps") terminal.Println(" * Adapt the generated files if needed") - terminal.Printf(" * Commit them: git add %s && git commit -m\"Add %s configuration\"\n", strings.Join(createdFiles, " "), brand.Name) + terminal.Printf(" * Commit them: git add %s && git commit -m\"Add %s configuration\"\n", strings.Join(createdFiles, " "), brand) terminal.Printf(" * Deploy: %s deploy\n", c.App.HelpName) } else { terminal.Printf("Deploy the project via %s deploy.\n", c.App.HelpName) diff --git a/envs/local.go b/envs/local.go index a278c1b3..d14c870a 100644 --- a/envs/local.go +++ b/envs/local.go @@ -161,7 +161,7 @@ func (l *Local) Relationships() Relationships { if err != nil { if l.Debug { brand := platformsh.GuessCloudFromDirectory(l.Dir) - fmt.Fprintf(os.Stderr, "ERROR: unable to get %s project information\n", brand.Name) + fmt.Fprintf(os.Stderr, "ERROR: unable to get %s project information\n", brand) } return dockerRel } diff --git a/envs/local_tunnel.go b/envs/local_tunnel.go index 64cf56ef..7dd268ef 100644 --- a/envs/local_tunnel.go +++ b/envs/local_tunnel.go @@ -48,7 +48,7 @@ func (l *Local) relationshipsFromTunnel() Relationships { if err != nil { if l.Debug { brand := platformsh.GuessCloudFromDirectory(l.Dir) - fmt.Fprintf(os.Stderr, "WARNING: unable to detect %s project: %s\n", brand.Name, err) + fmt.Fprintf(os.Stderr, "WARNING: unable to detect %s project: %s\n", brand, err) } return nil } From 8dfb4f29d5e3e04f65917d8a6effefcb9c285a5f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 17 Oct 2023 17:22:03 +0200 Subject: [PATCH 194/466] Always use the latest version of the binary --- .github/workflows/go_generate_update.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go_generate_update.yml b/.github/workflows/go_generate_update.yml index ca56f44d..cc47ef4b 100644 --- a/.github/workflows/go_generate_update.yml +++ b/.github/workflows/go_generate_update.yml @@ -28,7 +28,9 @@ jobs: ${{ runner.os }}-go- - name: Prepare - run: go generate ./ + run: | + rm -rf ~/.platformsh/bin/ + go generate ./ - name: Check Git status id: git From 0c09e4aa7e0a60e7093f9112bbb99080604a4052 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 18 Oct 2023 11:48:08 +0200 Subject: [PATCH 195/466] Fix a few bugs to the way we run cloud CLIs --- local/platformsh/cli.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/local/platformsh/cli.go b/local/platformsh/cli.go index 89fe6f39..4e5f3e72 100644 --- a/local/platformsh/cli.go +++ b/local/platformsh/cli.go @@ -69,6 +69,7 @@ func newCLI() (*CLI, error) { command.Args = []*console.Arg{ {Name: "anything", Slice: true, Optional: true}, } + command.FlagParsing = console.FlagParsingSkipped command.Flags = append(command.Flags, &console.BoolFlag{Name: "no", Aliases: []string{"n"}}, &console.BoolFlag{Name: "yes", Aliases: []string{"y"}}, @@ -82,8 +83,7 @@ func (p *CLI) AddBeforeHook(name string, f console.BeforeFunc) { p.Hooks[name] = f for _, command := range p.Commands { if command.FullName() == name { - // do not parse flags if we don't have hooks - command.FlagParsing = console.FlagParsingSkipped + command.FlagParsing = console.FlagParsingNormal break } } @@ -139,7 +139,14 @@ func (p *CLI) proxyPSHCmd(commandName string) console.ActionFunc { } } brand := GuessCloudFromCommandName(ctx.Command.UserName) - return p.executor(brand, append([]string{commandName}, ctx.Args().Slice()...)).Run() + args := os.Args[1:] + for i := range args { + if args[i] == ctx.Command.UserName { + args[i] = commandName + break + } + } + return p.executor(brand, args).Run() } }(commandName) } From 6ee700a47226c7c8d56af343882caadb6b0a0c38 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 18 Oct 2023 15:31:52 +0200 Subject: [PATCH 196/466] Fix cloud tunnels --- envs/local_tunnel.go | 4 ++-- local/platformsh/applications.go | 5 +++-- local/platformsh/brand.go | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/envs/local_tunnel.go b/envs/local_tunnel.go index 7dd268ef..cb43ad66 100644 --- a/envs/local_tunnel.go +++ b/envs/local_tunnel.go @@ -44,10 +44,10 @@ type pshtunnel struct { } func (l *Local) relationshipsFromTunnel() Relationships { + brand := platformsh.GuessCloudFromDirectory(l.Dir) project, err := platformsh.ProjectFromDir(l.Dir, l.Debug) if err != nil { if l.Debug { - brand := platformsh.GuessCloudFromDirectory(l.Dir) fmt.Fprintf(os.Stderr, "WARNING: unable to detect %s project: %s\n", brand, err) } return nil @@ -57,7 +57,7 @@ func (l *Local) relationshipsFromTunnel() Relationships { if err != nil { userHomeDir = "" } - tunnelFile := filepath.Join(userHomeDir, ".platformsh", "tunnel-info.json") + tunnelFile := filepath.Join(userHomeDir, brand.CLIConfigPath, "tunnel-info.json") data, err := os.ReadFile(tunnelFile) if err != nil { if l.Debug { diff --git a/local/platformsh/applications.go b/local/platformsh/applications.go index fbeb2967..d9a33c50 100644 --- a/local/platformsh/applications.go +++ b/local/platformsh/applications.go @@ -116,7 +116,8 @@ func FindLocalApplications(rootDirectory string) LocalApplications { terminal.Logger.Error().Msgf("Could not decode %s YAML file: %s\n", file, err) continue } - for _, app := range config.Applications { + for name, app := range config.Applications { + app.Name = name app.DefinitionFile = file app.LocalRootDir = filepath.Join(rootDirectory, app.Source.Root) apps = append(apps, app.LocalApplication) @@ -165,7 +166,7 @@ func FindLocalApplications(rootDirectory string) LocalApplications { func findAppConfigFiles(brand CloudBrand, dir string) []string { files := []string{} if brand == UpsunBrand { - dir = filepath.Join(dir, brand.CLIConfigPath) + dir = filepath.Join(dir, brand.ProjectConfigPath) fs, err := os.ReadDir(dir) if err != nil { return files diff --git a/local/platformsh/brand.go b/local/platformsh/brand.go index d11d2dba..b31e402f 100644 --- a/local/platformsh/brand.go +++ b/local/platformsh/brand.go @@ -38,9 +38,9 @@ type CloudBrand struct { var UpsunBrand = CloudBrand{ Name: "Upsun", ProjectConfigPath: ".upsun", - CommandPrefix: "upsun:", - CLIConfigPath: ".upsun", + CLIConfigPath: ".upsun-cli", CLIPrefix: "UPSUN_CLI_", + CommandPrefix: "upsun:", GitRemoteName: "upsun", BinName: "upsun", } From 24653edc367c092d52468872c869070b6318970c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 18 Oct 2023 15:42:40 +0200 Subject: [PATCH 197/466] Update service versions --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 991c58b5..d78eef79 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -232,7 +232,7 @@ var availableServices = []*service{ Type: "redis", Versions: serviceVersions{ Deprecated: []string{"2.8", "3.0", "3.2", "4.0", "5.0", "6.0"}, - Supported: []string{"6.2", "7.0"}, + Supported: []string{"6.2", "7.0", "7.2"}, }, }, { From 301f52c01187495471ba8e46c04470591e992ddb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Oct 2023 12:47:37 +0200 Subject: [PATCH 198/466] Does it fix Mac issues? --- local/php/fpm.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/local/php/fpm.go b/local/php/fpm.go index ecbce2ff..364c8c63 100644 --- a/local/php/fpm.go +++ b/local/php/fpm.go @@ -107,6 +107,9 @@ php_admin_flag[log_errors] = on ; we want to expose env vars (like in FOO=bar symfony server:start) clear_env = no + +env['PGGSSENCMODE'] = disable +env['LC_ALL'] = C `, logLevel, logLimit, userConfig, listen, workerConfig) } From 0da1da1550bd8520336f6108a6410e52aaca9590 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Oct 2023 12:50:55 +0200 Subject: [PATCH 199/466] Fix goreleaser deprecation --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 9347857f..fa9f7f64 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -87,7 +87,7 @@ release: **Full Changelog**: https://github.com/symfony-cli/symfony-cli/compare/{{ .PreviousTag }}...{{ .Tag }} brews: - - tap: + - repository: owner: symfony-cli name: homebrew-tap token: "{{ .Env.TAP_GITHUB_TOKEN }}" From dd5ff9ef87b1c71e6b4bc5c6fe176137001c2d07 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 24 Oct 2023 23:48:26 +0200 Subject: [PATCH 200/466] Add support for compose.yaml --- envs/docker.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/envs/docker.go b/envs/docker.go index e1ec94cc..6347368d 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -515,17 +515,15 @@ func (l *Local) getComposeDir() string { // look for the first dir up with a docker-composer.ya?ml file (in case of a multi-project) dir := l.Dir for { - if _, err := os.Stat(filepath.Join(dir, "docker-compose.yaml")); err == nil { - return dir - } - // both .yml and .yaml are supported by Docker composer - if _, err := os.Stat(filepath.Join(dir, "docker-compose.yml")); err == nil { - return dir + for _, filename := range []string{"compose.yaml", "compose.yml", "docker-compose.yaml", "docker-compose.yml"} { + if _, err := os.Stat(filepath.Join(dir, filename)); err == nil { + return dir + } } upDir := filepath.Dir(dir) if upDir == dir || upDir == "." { if l.Debug { - fmt.Fprintln(os.Stderr, "ERROR: unable to find a docker-compose.yaml or docker-compose.yml for the current directory") + fmt.Fprintln(os.Stderr, "ERROR: unable to find a docker-compose.ya?ml or compose.ya?ml for the current directory") } return "" } From 24c096264e4f0b825f02bb74e5f33eb43d8666ce Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 25 Oct 2023 07:05:00 -0700 Subject: [PATCH 201/466] Add support for compose.yaml file --- book/checkout.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/book/checkout.go b/book/checkout.go index b79be13c..1bbd1a6f 100644 --- a/book/checkout.go +++ b/book/checkout.go @@ -102,13 +102,14 @@ func (b *Book) Checkout(step string) error { terminal.Println("[ OK ]") } - _, err = os.Stat(filepath.Join(b.Dir, "docker-compose.yaml")) - hasDocker := err == nil - if !hasDocker { - _, err = os.Stat(filepath.Join(b.Dir, "docker-compose.yml")) - hasDocker = err == nil - } printBanner("[WEB] Stopping Docker Containers", b.Debug) + hasDocker := false + for _, filename := range []string{"compose.yaml", "compose.yml", "docker-compose.yaml", "docker-compose.yml"} { + if _, err = os.Stat(filepath.Join(b.Dir, filename)); err == nil { + hasDocker = true + break + } + } if hasDocker { if err := executeCommand(append(dockerComposeBin(), "down", "--remove-orphans"), b.Debug, false, nil); err != nil { return err From 6720164f5022ec80b1864820533953a962e4c516 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:10:14 +0000 Subject: [PATCH 202/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index d78eef79..1b942c51 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -134,7 +134,7 @@ var availableServices = []*service{ Type: "chrome-headless", Versions: serviceVersions{ Deprecated: []string{}, - Supported: []string{"73", "80", "81", "83", "84", "86", "91", "95", "113"}, + Supported: []string{"73", "80", "81", "83", "84", "86", "91", "95", "113", "120"}, }, }, { From 243011888cfd0a15c5929fe7a5943e3d136cc3ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Oct 2023 16:10:04 +0000 Subject: [PATCH 203/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 36ca0e8a..665e2004 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1987,7 +1987,6 @@ var Commands = []*console.Command{ }, Usage: "Create a new project", Flags: []console.Flag{ - &console.StringFlag{Name: "check-timeout",}, &console.StringFlag{Name: "default-branch", DefaultValue: "main",}, &console.StringFlag{Name: "environments",}, &console.BoolFlag{Name: "no-set-remote",}, @@ -1997,7 +1996,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "region",}, &console.BoolFlag{Name: "set-remote",}, &console.StringFlag{Name: "storage",}, - &console.StringFlag{Name: "timeout",}, &console.StringFlag{Name: "title", DefaultValue: "Untitled Project",}, }, }, From da15d922bf5f3ee5cc6425aa37dcec8e758b96f8 Mon Sep 17 00:00:00 2001 From: Sergii Dolgushev Date: Tue, 31 Oct 2023 16:43:47 +0000 Subject: [PATCH 204/466] fix: Update docker/docker to v24.0.7 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e4273a48..2be76b53 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.4 github.com/compose-spec/compose-go v1.19.0 - github.com/docker/docker v24.0.6+incompatible + github.com/docker/docker v24.0.7+incompatible github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 diff --git a/go.sum b/go.sum index 14494153..6cdf1d91 100644 --- a/go.sum +++ b/go.sum @@ -19,6 +19,8 @@ github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBi github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.6+incompatible h1:hceabKCtUgDqPu+qm0NgsaXf28Ljf4/pWFL7xjWWDgE= github.com/docker/docker v24.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= From 3330712313b5cfb94d78de85ae8bdf422928b7e8 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 2 Nov 2023 16:27:40 +0100 Subject: [PATCH 205/466] add comments --- local/runner.go | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/local/runner.go b/local/runner.go index 939583c7..f829ccee 100644 --- a/local/runner.go +++ b/local/runner.go @@ -222,30 +222,37 @@ func (r *Runner) Run() error { cmd.Process.Signal(syscall.SIGTERM) // we need to drain cmdExit channel to unblock cmd channel receiver <-cmdExitChan + // Command exited case err := <-cmdExitChan: err = errors.Wrapf(err, `command "%s" failed`, r.pidFile) + // Command is NOT set up to loop, stop here and remove the pidFile + // if the command is successful if !looping { - if err == nil { - err = r.pidFile.Remove() + if err != nil { + return err } - return err + return r.pidFile.Remove() } + // Command is set up to restart on exit (usually PHP builtin + // server), so we restart immediately without waiting if r.AlwaysRestartOnExit { terminal.Logger.Error().Msgf(`command "%s" exited, restarting it immediately`, r.pidFile) continue } - // Command exited: let's wait for a signal to just exit on a change - // on the filesystem, or 5 seconds in case of error, before - // restarting the command. + // In case of error we want to wait up-to 5 seconds before + // restarting the command, this avoids overloading the system with a + // failing command if err != nil { terminal.Logger.Error().Msgf("%s, waiting 5 seconds before restarting it", err) timer.Reset(5 * time.Second) } + // Wait for a timer to expire or a file to be changed to restart + // or a signal to be received to exit select { case sig := <-sigChan: terminal.Logger.Info().Msgf(`Signal "%s" received, exiting`, sig) From c5eb75660473e9058a9afe0104bc31d8ab8f3e8a Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 2 Nov 2023 17:41:56 +0100 Subject: [PATCH 206/466] Fix WDT style when there are extra links --- local/php/toolbar.go | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/local/php/toolbar.go b/local/php/toolbar.go index 7ced0111..da5e36f3 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -107,7 +107,7 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea } if len(extraLinks) > 0 { - extraLinks = `
` + extraLinks + extraLinks = `
` + extraLinks } } @@ -127,23 +127,25 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea Server
-
- Server` + p.Version.ServerTypeName() + ` ` + p.Version.Version + ` +
+
+ Server` + p.Version.ServerTypeName() + ` ` + p.Version.Version + ` +
+
+ Tunnel` + tunnel + ` +
+
+ Docker Compose` + docker + ` +
+
+ Env Vars` + envVars + ` +
+
` + rabbitmqui + `
+
` + webmail + `
+
+ Blackfire.io Agent` + blackfire + `
+ ` + extraLinks + `
-
- Tunnel` + tunnel + ` -
-
- Docker Compose` + docker + ` -
-
- Env Vars` + envVars + ` -
-
` + rabbitmqui + `
-
` + webmail + `
-
- Blackfire.io Agent` + blackfire + `
- ` + extraLinks + `
From 2e5951f86c11da988752b451de38f363d94dadbe Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 2 Nov 2023 17:28:48 +0100 Subject: [PATCH 207/466] Expose the CLI version in the WDT, fix #365 --- local/php/php_server.go | 4 +++- local/php/toolbar.go | 5 ++++- local/project/project.go | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/local/php/php_server.go b/local/php/php_server.go index a294a70b..85866c70 100644 --- a/local/php/php_server.go +++ b/local/php/php_server.go @@ -51,6 +51,7 @@ import ( type Server struct { Version *phpstore.Version logger zerolog.Logger + appVersion string homeDir string projectDir string documentRoot string @@ -62,7 +63,7 @@ type Server struct { var addslashes = strings.NewReplacer("\\", "\\\\", "'", "\\'") // NewServer creates a new PHP server backend -func NewServer(homeDir, projectDir, documentRoot, passthru string, logger zerolog.Logger) (*Server, error) { +func NewServer(homeDir, projectDir, documentRoot, passthru, appVersion string, logger zerolog.Logger) (*Server, error) { logger.Debug().Str("source", "PHP").Msg("Reloading PHP versions") phpStore := phpstore.New(homeDir, true, nil) version, source, warning, err := phpStore.BestVersionForDir(projectDir) @@ -76,6 +77,7 @@ func NewServer(homeDir, projectDir, documentRoot, passthru string, logger zerolo return &Server{ Version: version, logger: logger.With().Str("source", "PHP").Str("php", version.Version).Str("path", version.ServerPath()).Logger(), + appVersion: appVersion, homeDir: homeDir, projectDir: projectDir, documentRoot: documentRoot, diff --git a/local/php/toolbar.go b/local/php/toolbar.go index da5e36f3..1c1585d2 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -129,7 +129,10 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea
- Server` + p.Version.ServerTypeName() + ` ` + p.Version.Version + ` + Server` + p.appVersion + ` +
+
+ PHP` + p.Version.ServerTypeName() + ` ` + p.Version.Version + `
Tunnel` + tunnel + ` diff --git a/local/project/project.go b/local/project/project.go index 81f4a46c..a9605c65 100644 --- a/local/project/project.go +++ b/local/project/project.go @@ -76,7 +76,7 @@ func New(c *Config) (*Project, error) { return nil } } else { - p.PHPServer, err = php.NewServer(c.HomeDir, c.ProjectDir, documentRoot, passthru, c.Logger) + p.PHPServer, err = php.NewServer(c.HomeDir, c.ProjectDir, documentRoot, passthru, c.AppVersion, c.Logger) if err != nil { return nil, err } From e60f874bdfbd2fd3298c87d28bb7c084195e9933 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 2 Nov 2023 21:50:59 +0100 Subject: [PATCH 208/466] Update toolbar.go Co-authored-by: Fabien Potencier --- local/php/toolbar.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/php/toolbar.go b/local/php/toolbar.go index 1c1585d2..535c5c75 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -129,7 +129,7 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea
- Server` + p.appVersion + ` + Symfony CLI` + p.appVersion + `
PHP` + p.Version.ServerTypeName() + ` ` + p.Version.Version + ` From 549bdbf3ba36a2c096ad4ceed1623caebc0515f4 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 2 Nov 2023 18:04:12 +0100 Subject: [PATCH 209/466] Add support for a `docker_compose` worker and prioritize its startup --- commands/local_server_start.go | 43 +++++++++++++++++++++++++++++++++- local/project/config.go | 13 ++++++++++ local/runner.go | 5 ++++ 3 files changed, 60 insertions(+), 1 deletion(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 7cfd022d..9fc86d1b 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -29,6 +29,7 @@ import ( "os/exec" "os/signal" "path/filepath" + "sync" "syscall" "github.com/pkg/errors" @@ -309,6 +310,13 @@ var localServerStartCmd = &console.Command{ if fileConfig != nil { reexec.NotifyForeground("workers") + + _, isDockerComposeWorkerConfigured := fileConfig.Workers[project.DockerComposeWorkerKey] + var dockerWg sync.WaitGroup + if isDockerComposeWorkerConfigured { + dockerWg.Add(1) + } + for name, worker := range fileConfig.Workers { pidFile := pid.New(projectDir, worker.Cmd) if pidFile.IsRunning() { @@ -335,10 +343,43 @@ var localServerStartCmd = &console.Command{ runner.BuildCmdHook = func(cmd *exec.Cmd) error { cmd.Env = append(cmd.Env, envs.AsSlice(env)...) - return nil } + if name == project.DockerComposeWorkerKey { + originalBuildCmdHook := runner.BuildCmdHook + + runner.BuildCmdHook = func(cmd *exec.Cmd) error { + cmd.Args = append(cmd.Args, "--detach") + + return originalBuildCmdHook(cmd) + } + + runner.SuccessHook = func(runner *local.Runner, cmd *exec.Cmd) { + terminal.Eprintln("INFO Docker Compose is now up, switching to non detached mode") + + // set up the worker for an immediate restart so + // that it starts monitoring the containers as soon + // as possible after the initial startup + runner.AlwaysRestartOnExit = true + // but next time this process is successful we don't + // have to do anything specific + runner.SuccessHook = nil + // and we move back AlwaysRestartOnExit to false + + runner.BuildCmdHook = func(cmd *exec.Cmd) error { + runner.AlwaysRestartOnExit = false + + return originalBuildCmdHook(cmd) + } + + dockerWg.Done() + } + } else if isDockerComposeWorkerConfigured { + terminal.Eprintfln("INFO Worker \"%s\" waiting for Docker Compose to be up", name) + dockerWg.Wait() + } + ui.Success(fmt.Sprintf("Started worker \"%s\"", name)) if err := runner.Run(); err != nil { terminal.Eprintfln("WARNING Worker \"%s\" exited with an error: %s", name, err) diff --git a/local/project/config.go b/local/project/config.go index c5d3767b..6a003e56 100644 --- a/local/project/config.go +++ b/local/project/config.go @@ -29,6 +29,8 @@ import ( "gopkg.in/yaml.v2" ) +const DockerComposeWorkerKey = "docker_compose" + // Config is the struct taken by New (should not be used for anything else) type Config struct { HomeDir string @@ -143,6 +145,17 @@ func (c *FileConfig) parseWorkers() error { return nil } + if v, ok := c.Workers[DockerComposeWorkerKey]; ok && v == nil { + c.Workers[DockerComposeWorkerKey] = &Worker{ + Cmd: []string{"docker", "compose", "up"}, + Watch: []string{ + "compose.yaml", "compose.override.yaml", + "compose.yml", "compose.override.yml", + "docker-compose.yml", "docker-compose.override.yml", + "docker-compose.yaml", "docker-compose.override.yaml", + }, + } + } if v, ok := c.Workers["yarn_encore_watch"]; ok && v == nil { c.Workers["yarn_encore_watch"] = &Worker{ Cmd: []string{"yarn", "encore", "dev", "--watch"}, diff --git a/local/runner.go b/local/runner.go index f829ccee..f895f450 100644 --- a/local/runner.go +++ b/local/runner.go @@ -60,6 +60,7 @@ type Runner struct { pidFile *pid.PidFile BuildCmdHook func(*exec.Cmd) error + SuccessHook func(*Runner, *exec.Cmd) AlwaysRestartOnExit bool } @@ -226,6 +227,10 @@ func (r *Runner) Run() error { case err := <-cmdExitChan: err = errors.Wrapf(err, `command "%s" failed`, r.pidFile) + if err == nil && r.SuccessHook != nil { + r.SuccessHook(r, cmd) + } + // Command is NOT set up to loop, stop here and remove the pidFile // if the command is successful if !looping { From d15d9de9e2e4bae6211e134b1a3a74b06572616d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 3 Nov 2023 18:06:53 +0100 Subject: [PATCH 210/466] Bump deps --- go.mod | 10 +++++----- go.sum | 22 ++++++++++------------ 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index 2be76b53..bbcc0205 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.4 - github.com/compose-spec/compose-go v1.19.0 + github.com/compose-spec/compose-go v1.20.0 github.com/docker/docker v24.0.7+incompatible - github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a + github.com/elazarl/goproxy v0.0.0-20231031074852-3ec07828be7a github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 @@ -39,7 +39,7 @@ require ( github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect @@ -47,7 +47,7 @@ require ( github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect @@ -75,7 +75,7 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.0 // indirect - software.sslmate.com/src/go-pkcs12 v0.2.1 // indirect + software.sslmate.com/src/go-pkcs12 v0.3.0 // indirect ) go 1.21 diff --git a/go.sum b/go.sum index 6cdf1d91..51dbc45a 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/blackfireio/osinfo v1.0.4 h1:lQVXqDh+UDFZa9ZzTv/ReyBfu+vXMkjqeGO5CEwbCTs= github.com/blackfireio/osinfo v1.0.4/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA= -github.com/compose-spec/compose-go v1.19.0 h1:t68gAcwStDg0hy2kFvqHJIksf6xkqRnlSKfL45/ETqo= -github.com/compose-spec/compose-go v1.19.0/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= +github.com/compose-spec/compose-go v1.20.0 h1:h4ZKOst1EF/DwZp7dWkb+wbTVE4nEyT9Lc89to84Ol4= +github.com/compose-spec/compose-go v1.20.0/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -17,24 +17,22 @@ github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.6+incompatible h1:hceabKCtUgDqPu+qm0NgsaXf28Ljf4/pWFL7xjWWDgE= -github.com/docker/docker v24.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= -github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20231031074852-3ec07828be7a h1:r72lWG/xCv9MLpRTss5BQVHDURXaaD6OwS2HkI5/+Ls= +github.com/elazarl/goproxy v0.0.0-20231031074852-3ec07828be7a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/fabpot/local-php-security-checker/v2 v2.0.6 h1:m1znXkwzIPFkJWOnH8Fgt1mHY9hq8u+GY4AC6CPnDME= github.com/fabpot/local-php-security-checker/v2 v2.0.6/go.mod h1:bDff0jDpxt1pHsDtQ3v++cc/QuCM9K7Nq0dv65P1Ai8= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 h1:R2K7yLHPmwoTdmNuQ5Wfm0/evh/+QFdoI6EbW3OSMKw= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76/go.mod h1:jr1MMO0KsDD+PQ57K7oJGk97TLYtbhLUOjCS577Ddm4= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -71,8 +69,9 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= @@ -176,7 +175,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= @@ -217,5 +215,5 @@ gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= -software.sslmate.com/src/go-pkcs12 v0.2.1 h1:tbT1jjaeFOF230tzOIRJ6U5S1jNqpsSyNjzDd58H3J8= -software.sslmate.com/src/go-pkcs12 v0.2.1/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= +software.sslmate.com/src/go-pkcs12 v0.3.0 h1:ZYaL72OA2n9UgvesM62z1xmb4PYjgzswQ7xkuC08FEI= +software.sslmate.com/src/go-pkcs12 v0.3.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= From 97d0d1d10e6726a3a9dbb5893509eac1732eab08 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 4 Nov 2023 18:24:02 +0100 Subject: [PATCH 211/466] Use the original inotify repository --- go.mod | 2 +- go.sum | 4 ++-- inotify/inotify.go | 2 +- inotify/inotify_posix.go | 2 +- inotify/inotify_windows.go | 2 +- local/logs/tailer.go | 2 +- reexec/reexec.go | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index bbcc0205..4cabe13c 100644 --- a/go.mod +++ b/go.mod @@ -15,6 +15,7 @@ require ( github.com/mitchellh/go-homedir v1.1.0 github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 + github.com/rjeczalik/notify v0.9.3 github.com/rs/xid v1.5.0 github.com/rs/zerolog v1.31.0 github.com/schollz/progressbar/v3 v3.13.1 @@ -25,7 +26,6 @@ require ( github.com/symfony-cli/console v1.0.3 github.com/symfony-cli/phpstore v1.0.10 github.com/symfony-cli/terminal v1.0.4 - github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 golang.org/x/sync v0.4.0 golang.org/x/text v0.13.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c diff --git a/go.sum b/go.sum index 51dbc45a..e075113d 100644 --- a/go.sum +++ b/go.sum @@ -104,6 +104,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY= +github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= @@ -135,8 +137,6 @@ github.com/symfony-cli/phpstore v1.0.10 h1:KEgMYIhxHMex1zxt9Tzxpfy5zWXZ3207DWhJr github.com/symfony-cli/phpstore v1.0.10/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.4 h1:jam7aN7g7WQ9uOwV9UC+iVGBLTlzK8kAC5EKcxq21Z8= github.com/symfony-cli/terminal v1.0.4/go.mod h1:+OxxnU05wyRHKYyQkTzTaCSSxmmIBcvAHLcQ099odj4= -github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2 h1:F4snRP//nIuTTW9LYEzVH4HVwDG9T3M4t8y/2nqMbiY= -github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2/go.mod h1:J0q59IWjLtpRIJulohwqEZvjzwOfTEPp8SVhDJl+y0Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= diff --git a/inotify/inotify.go b/inotify/inotify.go index 68394c3b..6e30bb1b 100644 --- a/inotify/inotify.go +++ b/inotify/inotify.go @@ -19,7 +19,7 @@ package inotify -import "github.com/syncthing/notify" +import "github.com/rjeczalik/notify" // Create, Remove, Write and Rename are the only event values guaranteed to be // present on all platforms. diff --git a/inotify/inotify_posix.go b/inotify/inotify_posix.go index 76acef8a..62a9909c 100644 --- a/inotify/inotify_posix.go +++ b/inotify/inotify_posix.go @@ -22,7 +22,7 @@ package inotify -import "github.com/syncthing/notify" +import "github.com/rjeczalik/notify" func Watch(path string, c chan<- notify.EventInfo, events ...notify.Event) error { return simpleWatch(path, c, events...) diff --git a/inotify/inotify_windows.go b/inotify/inotify_windows.go index 6d68f673..09ec1f80 100644 --- a/inotify/inotify_windows.go +++ b/inotify/inotify_windows.go @@ -24,7 +24,7 @@ import ( "path/filepath" "github.com/pkg/errors" - "github.com/syncthing/notify" + "github.com/rjeczalik/notify" ) func Watch(path string, c chan<- notify.EventInfo, events ...notify.Event) error { diff --git a/local/logs/tailer.go b/local/logs/tailer.go index 365a7a53..50c11413 100644 --- a/local/logs/tailer.go +++ b/local/logs/tailer.go @@ -30,12 +30,12 @@ import ( "github.com/hpcloud/tail" "github.com/pkg/errors" + realinotify "github.com/rjeczalik/notify" "github.com/stoicperlman/fls" "github.com/symfony-cli/symfony-cli/humanlog" "github.com/symfony-cli/symfony-cli/inotify" "github.com/symfony-cli/symfony-cli/local/pid" "github.com/symfony-cli/terminal" - realinotify "github.com/syncthing/notify" ) type namedLine struct { diff --git a/reexec/reexec.go b/reexec/reexec.go index d447514e..cabcdfa6 100644 --- a/reexec/reexec.go +++ b/reexec/reexec.go @@ -29,11 +29,11 @@ import ( "time" "github.com/pkg/errors" + "github.com/rjeczalik/notify" "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/inotify" "github.com/symfony-cli/symfony-cli/util" "github.com/symfony-cli/terminal" - "github.com/syncthing/notify" ) const UP = "up" From ed2b46a5bba3f09eda484d4673df94f29ae93677 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 4 Nov 2023 17:45:17 +0100 Subject: [PATCH 212/466] Make DOCKER_HOST configurable --- envs/docker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/envs/docker.go b/envs/docker.go index 6347368d..ca7f3c6c 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -69,7 +69,7 @@ func (l *Local) RelationshipsFromDocker() Relationships { } opts := [](docker.Opt){docker.FromEnv} - if host := os.Getenv("DOCKER_HOST"); host != "" && !strings.HasPrefix(host, "unix://") { + if host := os.Getenv(docker.EnvOverrideHost); host != "" && !strings.HasPrefix(host, "unix://") { // Setting a dialer on top of a unix socket breaks the connection // as the client then tries to connect to http:///path/to/socket and // thus tries to resolve the /path/to/socket host @@ -182,13 +182,13 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ } } - host := os.Getenv("DOCKER_HOST") + host := os.Getenv(docker.EnvOverrideHost) if host == "" || strings.HasPrefix(host, "unix://") { host = "127.0.0.1" } else { u, err := url.Parse(host) if err != nil { - fmt.Fprintf(os.Stderr, " ERROR: unable to parse DOCKER_HOST \"%s\", falling back to 127.0.0.1: %s\n", host, err) + fmt.Fprintf(os.Stderr, " ERROR: unable to parse %s \"%s\", falling back to 127.0.0.1: %s\n", docker.EnvOverrideHost, host, err) host = "127.0.0.1" } else { host = u.Hostname() From 3e5405767d3ea39ba725623d782f9aafb344c281 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 10 Jul 2023 18:26:36 -0400 Subject: [PATCH 213/466] Add support for PHP streaming support Relatively easy to implement for PHP builtin but required to change the way we handle CGI and FPM. We now use the golang reverse proxy also for these use cases but tweaking the RoundTripper to communicate over CGI instead. This means we also had to change the way we inspect the responses for the WDT of X-Sendfile because now the original Body needs to be closed in a proper way and at the right time. - --- local/php/cgi.go | 56 +++++++++++++++++++ local/php/context.go | 8 +++ local/php/php_server.go | 116 +++++++++++----------------------------- local/php/toolbar.go | 55 +++++++++++++++++-- local/php/xsendfile.go | 21 ++++++++ 5 files changed, 168 insertions(+), 88 deletions(-) create mode 100644 local/php/cgi.go create mode 100644 local/php/context.go create mode 100644 local/php/xsendfile.go diff --git a/local/php/cgi.go b/local/php/cgi.go new file mode 100644 index 00000000..6af3ec53 --- /dev/null +++ b/local/php/cgi.go @@ -0,0 +1,56 @@ +package php + +import ( + "io" + "net/http" + "time" + + "github.com/pkg/errors" + fcgiclient "github.com/symfony-cli/symfony-cli/local/fcgi_client" +) + +type cgiTransport struct{} + +func (p *cgiTransport) RoundTrip(req *http.Request) (*http.Response, error) { + env := req.Context().Value(environmentContextKey).(map[string]string) + + // as the process might have been just created, it might not be ready yet + var fcgi *fcgiclient.FCGIClient + var err error + max := 10 + i := 0 + for { + if fcgi, err = fcgiclient.Dial("tcp", "127.0.0.1:"+req.URL.Port()); err == nil { + break + } + i++ + if i > max { + return nil, errors.Wrapf(err, "unable to connect to the PHP FastCGI process") + } + time.Sleep(time.Millisecond * 50) + } + + // fetching the response from the fastcgi backend, and check for errors + resp, err := fcgi.Request(env, req.Body) + if err != nil { + return nil, errors.Wrapf(err, "unable to fetch the response from the backend") + } + resp.Body = cgiBodyReadCloser{resp.Body, fcgi} + resp.Request = req + + return resp, nil +} + +// cgiBodyReadCloser is responsible for postponing the CGI connection +// termination when the client finished reading the response. This effectively +// allows to "stream" the CGI response from the server to the client by removing +// the requirement for an in-between buffer. +type cgiBodyReadCloser struct { + io.Reader + *fcgiclient.FCGIClient +} + +func (f cgiBodyReadCloser) Close() error { + f.FCGIClient.Close() + return nil +} diff --git a/local/php/context.go b/local/php/context.go new file mode 100644 index 00000000..8a51b9a4 --- /dev/null +++ b/local/php/context.go @@ -0,0 +1,8 @@ +package php + +type phpServerContextKey string + +const ( + environmentContextKey phpServerContextKey = "env" + responseWriterContextKey phpServerContextKey = "rw" +) diff --git a/local/php/php_server.go b/local/php/php_server.go index 85866c70..44c8a001 100644 --- a/local/php/php_server.go +++ b/local/php/php_server.go @@ -26,7 +26,6 @@ import ( "io" "net" "net/http" - "net/http/httptest" "net/http/httputil" "net/url" "os" @@ -34,14 +33,12 @@ import ( "runtime" "strconv" "strings" - "time" "github.com/pkg/errors" "github.com/rs/xid" "github.com/rs/zerolog" "github.com/symfony-cli/phpstore" "github.com/symfony-cli/symfony-cli/local" - fcgiclient "github.com/symfony-cli/symfony-cli/local/fcgi_client" "github.com/symfony-cli/symfony-cli/local/html" "github.com/symfony-cli/symfony-cli/local/pid" "github.com/symfony-cli/symfony-cli/local/process" @@ -94,6 +91,28 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, return nil, nil, err } p.addr = net.JoinHostPort("", strconv.Itoa(port)) + + target, err := url.Parse(fmt.Sprintf("http://127.0.0.1:%d", port)) + if err != nil { + return nil, nil, errors.WithStack(err) + } + p.proxy = httputil.NewSingleHostReverseProxy(target) + p.proxy.ModifyResponse = func(resp *http.Response) error { + if err, processed := p.processToolbarInResponse(resp); processed { + return err + } + + if err, processed := p.processXSendFile(resp); processed { + return err + } + + return nil + } + p.proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) { + w.WriteHeader(http.StatusBadGateway) + w.Write([]byte(html.WrapHTML(err.Error(), html.CreateErrorTerminal("# "+err.Error()), ""))) + } + workingDir := p.documentRoot env := []string{} var binName, workerName string @@ -103,6 +122,7 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, if err := os.WriteFile(fpmConfigFile, []byte(p.defaultFPMConf()), 0644); err != nil { return nil, nil, errors.WithStack(err) } + p.proxy.Transport = &cgiTransport{} pathsToRemove = append(pathsToRemove, fpmConfigFile) binName = "php-fpm" workerName = "PHP-FPM" @@ -111,6 +131,7 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, args = append(args, "--force-stderr") } } else if p.Version.IsCGIServer() { + p.proxy.Transport = &cgiTransport{} // as php-cgi reads the main php.ini file from the current directory, // we want to execute from another directory to be sure that we // are always loading the default PHP configuration @@ -129,20 +150,10 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, return nil, nil, errors.WithStack(err) } pathsToRemove = append(pathsToRemove, routerPath) - addr := "127.0.0.1:" + strconv.Itoa(port) binName = "php" workerName = "PHP" - args = []string{p.Version.ServerPath(), "-S", addr, "-d", "variables_order=EGPCS", routerPath} - target, err := url.Parse(fmt.Sprintf("http://%s", addr)) - if err != nil { - return nil, nil, errors.WithStack(err) - } + args = []string{p.Version.ServerPath(), "-S", "127.0.0.1:" + strconv.Itoa(port), "-d", "variables_order=EGPCS", routerPath} env = append(env, "APP_FRONT_CONTROLLER="+strings.TrimLeft(p.passthru, "/")) - p.proxy = httputil.NewSingleHostReverseProxy(target) - p.proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) { - w.WriteHeader(http.StatusBadGateway) - w.Write([]byte(html.WrapHTML(err.Error(), html.CreateErrorTerminal("# "+err.Error()), ""))) - } } e := &Executor{ @@ -198,6 +209,12 @@ func (p *Server) Serve(w http.ResponseWriter, r *http.Request, env map[string]st for k, v := range p.generateEnv(r) { env[k] = v } + + // inject our ResponseWriter and our environment into the request's context + // to allow for processing at a later stage + r = r.WithContext(context.WithValue(r.Context(), responseWriterContextKey, w)) + r = r.WithContext(context.WithValue(r.Context(), environmentContextKey, env)) + if p.Version.IsCLIServer() { rid := xid.New().String() r.Header.Add("__SYMFONY_LOCAL_REQUEST_ID__", rid) @@ -211,78 +228,9 @@ func (p *Server) Serve(w http.ResponseWriter, r *http.Request, env map[string]st return err } defer os.Remove(envPath) - pw := httptest.NewRecorder() - p.proxy.ServeHTTP(pw, r) - return p.writeResponse(w, r, env, pw.Result()) - } - return p.serveFastCGI(env, w, r) -} - -func (p *Server) serveFastCGI(env map[string]string, w http.ResponseWriter, r *http.Request) error { - // as the process might have been just created, it might not be ready yet - var fcgi *fcgiclient.FCGIClient - var err error - max := 10 - i := 0 - for { - if fcgi, err = fcgiclient.Dial("tcp", p.addr); err == nil { - break - } - i++ - if i > max { - return errors.Wrapf(err, "unable to connect to the PHP FastCGI process") - } - time.Sleep(time.Millisecond * 50) - } - defer fcgi.Close() - defer r.Body.Close() - - // fetching the response from the fastcgi backend, and check for errors - resp, err := fcgi.Request(env, r.Body) - if err != nil { - return errors.Wrapf(err, "unable to fetch the response from the backend") - } - - // X-SendFile - sendFilename := resp.Header.Get("X-SendFile") - _, err = os.Stat(sendFilename) - if sendFilename != "" && err == nil { - http.ServeFile(w, r, sendFilename) - return nil } - return p.writeResponse(w, r, env, resp) -} -func (p *Server) writeResponse(w http.ResponseWriter, r *http.Request, env map[string]string, resp *http.Response) error { - defer resp.Body.Close() - if env["SYMFONY_TUNNEL"] != "" && env["SYMFONY_TUNNEL_ENV"] == "" { - p.logger.Warn().Msgf("Tunnel to %s open but environment variables not exposed", env["SYMFONY_TUNNEL_BRAND"]) - } - bodyModified := false - if r.Method == http.MethodGet && r.Header.Get("x-requested-with") == "XMLHttpRequest" { - var err error - if resp.Body, err = p.tweakToolbar(resp.Body, env); err != nil { - return err - } - bodyModified = true - } - for k, v := range resp.Header { - if bodyModified && strings.ToLower(k) == "content-length" { - // we drop the incoming Content-Length, it will be recomputed by Go automatically anyway - continue - } - for i := 0; i < len(v); i++ { - if w.Header().Get(k) == "" { - w.Header().Set(k, v[i]) - } else { - w.Header().Add(k, v[i]) - } - } - } - w.WriteHeader(resp.StatusCode) - if r.Method != http.MethodHead { - io.Copy(w, resp.Body) - } + p.proxy.ServeHTTP(w, r) return nil } diff --git a/local/php/toolbar.go b/local/php/toolbar.go index 535c5c75..ac51d489 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -23,7 +23,9 @@ import ( "bytes" "fmt" "io" + "net/http" "regexp" + "strings" "github.com/pkg/errors" "github.com/symfony-cli/symfony-cli/envs" @@ -32,19 +34,52 @@ import ( "golang.org/x/text/language" ) +func (p *Server) processToolbarInResponse(resp *http.Response) (error, bool) { + req := resp.Request + env := req.Context().Value(environmentContextKey).(map[string]string) + if env["SYMFONY_TUNNEL"] != "" && env["SYMFONY_TUNNEL_ENV"] == "" { + p.logger.Warn().Msgf("Tunnel to %s open but environment variables not exposed", env["SYMFONY_TUNNEL_BRAND"]) + } + + if req.Method != http.MethodGet || req.Header.Get("x-requested-with") != "XMLHttpRequest" { + return nil, false + } + + if !strings.HasPrefix(resp.Header.Get("content-type"), "text/html") { + return nil, false + } + + var err error + if resp.Body, err = p.tweakToolbar(resp.Body, env); err != nil { + return err, true + } + + // we changed the body content, so we drop the incoming Content-Length, Go + // will recompute it automatically anyway + resp.Header.Del("content-length") + + return nil, true +} + func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.ReadCloser, error) { // CGI adds a \n at the start of the toolbar code bn := bytes.Repeat([]byte{' '}, 1) n, err := body.Read(bn) // if body is empty, return immediately if n == 0 && err == io.EOF { - return io.NopCloser(bytes.NewReader([]byte{})), nil + return body, nil } if n == len(bn) && err != nil { return nil, errors.WithStack(err) } if bn[0] != '\n' && bn[0] != '<' { - return io.NopCloser(io.MultiReader(bytes.NewReader(bn), body)), nil + return struct { + io.Reader + io.Closer + }{ + io.MultiReader(bytes.NewReader(bn), body), + body, + }, nil } toolbarHint := []byte("") @@ -57,7 +92,13 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea return nil, errors.WithStack(err) } if n != len(toolbarHint) || !bytes.Equal(start, toolbarHint) { - return io.NopCloser(io.MultiReader(bytes.NewReader(bn), bytes.NewReader(start), body)), nil + return struct { + io.Reader + io.Closer + }{ + io.MultiReader(bytes.NewReader(bn), bytes.NewReader(start), body), + body, + }, nil } logoBg := "sf-toolbar-status-normal" @@ -157,5 +198,11 @@ $1`) re := regexp.MustCompile(`(<(?:a|button)[^"]+?class="hide-button")`) b = re.ReplaceAll(b, content) - return io.NopCloser(io.MultiReader(bytes.NewReader(bn), bytes.NewReader(start), bytes.NewReader(b))), nil + return struct { + io.Reader + io.Closer + }{ + io.MultiReader(bytes.NewReader(bn), bytes.NewReader(start), bytes.NewReader(b)), + body, + }, nil } diff --git a/local/php/xsendfile.go b/local/php/xsendfile.go new file mode 100644 index 00000000..70f13ebe --- /dev/null +++ b/local/php/xsendfile.go @@ -0,0 +1,21 @@ +package php + +import ( + "net/http" + "os" +) + +func (p *Server) processXSendFile(resp *http.Response) (error, bool) { + // X-SendFile + sendFilename := resp.Header.Get("X-SendFile") + if _, err := os.Stat(sendFilename); sendFilename == "" || err != nil { + return nil, false + } + + req := resp.Request + w := req.Context().Value(responseWriterContextKey).(http.ResponseWriter) + + http.ServeFile(w, req, sendFilename) + + return nil, true +} From 96e116fe96b6649989bb0d4091155dc38d0e0931 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sun, 5 Nov 2023 17:09:28 +0100 Subject: [PATCH 214/466] - --- local/php/xsendfile.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/local/php/xsendfile.go b/local/php/xsendfile.go index 70f13ebe..7e82d140 100644 --- a/local/php/xsendfile.go +++ b/local/php/xsendfile.go @@ -8,7 +8,9 @@ import ( func (p *Server) processXSendFile(resp *http.Response) (error, bool) { // X-SendFile sendFilename := resp.Header.Get("X-SendFile") - if _, err := os.Stat(sendFilename); sendFilename == "" || err != nil { + if sendFilename == "" { + return nil, false + } else if _, err := os.Stat(sendFilename); err != nil { return nil, false } From 6472de4438d97b03a5be6faa0434890864fcd03f Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 6 Nov 2023 14:24:35 +0100 Subject: [PATCH 215/466] Fix the response content-type check for WDT processing --- local/php/toolbar.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/php/toolbar.go b/local/php/toolbar.go index ac51d489..404ab9b0 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -23,9 +23,9 @@ import ( "bytes" "fmt" "io" + "mime" "net/http" "regexp" - "strings" "github.com/pkg/errors" "github.com/symfony-cli/symfony-cli/envs" @@ -45,7 +45,7 @@ func (p *Server) processToolbarInResponse(resp *http.Response) (error, bool) { return nil, false } - if !strings.HasPrefix(resp.Header.Get("content-type"), "text/html") { + if baseCT, _, _ := mime.ParseMediaType(resp.Header.Get("content-type")); baseCT != "text/html" { return nil, false } From 7b1629faea560cc8b0c917872fae3ca62d13f250 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 6 Nov 2023 16:48:38 +0100 Subject: [PATCH 216/466] Remove banner --- main.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/main.go b/main.go index 550a02b1..9f6ba7f3 100644 --- a/main.go +++ b/main.go @@ -108,16 +108,10 @@ func main() { } cmds = append(cmds, psh.Commands...) console.HelpPrinter = psh.WrapHelpPrinter() - c1 := "#0057B7" - c2 := "#FFDD00" - if os.Getenv("COLORTERM") != "truecolor" { - c1 = "blue" - c2 = "yellow" - } app := &console.Application{ Name: "Symfony CLI", Usage: "Symfony CLI helps developers manage projects, from local code to remote infrastructure", - Copyright: fmt.Sprintf("(c) 2021-%d Fabien Potencier #StandWithUkraine", time.Now().Year(), c1, c2, c2, c1), + Copyright: fmt.Sprintf("(c) 2021-%d Fabien Potencier", time.Now().Year()), FlagEnvPrefix: []string{"SYMFONY", "PLATFORM"}, Commands: cmds, Action: func(ctx *console.Context) error { From 04dffd61251f6cb4c2af7065dc1c72649c42e862 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 6 Nov 2023 19:46:45 +0100 Subject: [PATCH 217/466] Bump deps --- go.mod | 14 +++++++------- go.sum | 28 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index 4cabe13c..e1fdd043 100644 --- a/go.mod +++ b/go.mod @@ -22,12 +22,12 @@ require ( github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 - github.com/symfony-cli/cert v1.0.2 + github.com/symfony-cli/cert v1.0.3 github.com/symfony-cli/console v1.0.3 github.com/symfony-cli/phpstore v1.0.10 github.com/symfony-cli/terminal v1.0.4 - golang.org/x/sync v0.4.0 - golang.org/x/text v0.13.0 + golang.org/x/sync v0.5.0 + golang.org/x/text v0.14.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) @@ -65,17 +65,17 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 // indirect golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/mod v0.13.0 // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/sys v0.14.0 // indirect golang.org/x/term v0.13.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/time v0.4.0 // indirect golang.org/x/tools v0.14.0 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.0 // indirect - software.sslmate.com/src/go-pkcs12 v0.3.0 // indirect + software.sslmate.com/src/go-pkcs12 v0.4.0 // indirect ) go 1.21 diff --git a/go.sum b/go.sum index e075113d..b268970a 100644 --- a/go.sum +++ b/go.sum @@ -129,8 +129,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/symfony-cli/cert v1.0.2 h1:rvveFVIoH6JwdfbsjDy5crsFFBiUwJsfEEZduuBtRNg= -github.com/symfony-cli/cert v1.0.2/go.mod h1:m2aZC0qLifAgsa0uLshMlJRIkS6hx2bqvDLJgGEbY6Q= +github.com/symfony-cli/cert v1.0.3 h1:dRlJPIzQ9ruQYPwKc8qeyjoerKP22oTGpvg6lWglvvs= +github.com/symfony-cli/cert v1.0.3/go.mod h1:m2aZC0qLifAgsa0uLshMlJRIkS6hx2bqvDLJgGEbY6Q= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= github.com/symfony-cli/phpstore v1.0.10 h1:KEgMYIhxHMex1zxt9Tzxpfy5zWXZ3207DWhJrIU6VGE= @@ -155,8 +155,8 @@ golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -167,8 +167,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/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= @@ -177,17 +177,17 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= 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.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= +golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -215,5 +215,5 @@ gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= -software.sslmate.com/src/go-pkcs12 v0.3.0 h1:ZYaL72OA2n9UgvesM62z1xmb4PYjgzswQ7xkuC08FEI= -software.sslmate.com/src/go-pkcs12 v0.3.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= +software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k= +software.sslmate.com/src/go-pkcs12 v0.4.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= From ed79bf1f6fea1e12a79d96e8289137bff7a5aa9c Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 6 Nov 2023 10:10:37 +0100 Subject: [PATCH 218/466] Use `--wait` instead of `--detach` for 'docker_composer` worker Fix #374 --- commands/local_server_start.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 9fc86d1b..0601dca5 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -350,7 +350,7 @@ var localServerStartCmd = &console.Command{ originalBuildCmdHook := runner.BuildCmdHook runner.BuildCmdHook = func(cmd *exec.Cmd) error { - cmd.Args = append(cmd.Args, "--detach") + cmd.Args = append(cmd.Args, "--wait") return originalBuildCmdHook(cmd) } From ec1b7f0ddd7ead2799d7e6f1118f830591408c09 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 7 Nov 2023 22:29:55 +0100 Subject: [PATCH 219/466] Also consider 27018 and 27019 ports for MongoDB service discovery --- envs/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envs/docker.go b/envs/docker.go index ca7f3c6c..05128818 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -397,7 +397,7 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ "scheme": "http", } return rels - } else if p.PrivatePort == 27017 { + } else if p.PrivatePort == 27017 || p.PrivatePort == 27018 || p.PrivatePort == 27019 { username := "" password := "" path := "" From ff05ab475f6a4d7bbbcd7eacb97e795584f64458 Mon Sep 17 00:00:00 2001 From: Pierre du Plessis Date: Thu, 23 Nov 2023 16:47:45 +0200 Subject: [PATCH 220/466] Add --api flag to local:new command to create a new API project --- commands/local_new.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/commands/local_new.go b/commands/local_new.go index ce327f75..085d612d 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -64,6 +64,7 @@ var localNewCmd = &console.Command{ &console.BoolFlag{Name: "full", Usage: "Use github.com/symfony/website-skeleton (deprecated, use --webapp instead)"}, &console.BoolFlag{Name: "demo", Usage: "Use github.com/symfony/demo"}, &console.BoolFlag{Name: "webapp", Usage: "Add the webapp pack to get a fully configured web project"}, + &console.BoolFlag{Name: "api", Usage: "Add the api pack to get a fully configured api project"}, &console.BoolFlag{Name: "book", Usage: "Clone the Symfony: The Fast Track book project"}, &console.BoolFlag{Name: "docker", Usage: "Enable Docker support"}, &console.BoolFlag{Name: "no-git", Usage: "Do not initialize Git"}, @@ -131,6 +132,9 @@ var localNewCmd = &console.Command{ if c.Bool("webapp") && c.Bool("no-git") { return console.Exit("The --webapp flag cannot be used with --no-git", 1) } + if c.Bool("webapp") && c.Bool("api") { + return console.Exit("The --api flag cannot be used with --webapp", 1) + } withCloud := c.Bool("cloud") || c.Bool("upsun") if len(c.StringSlice("service")) > 0 && !withCloud { return console.Exit("The --service flag cannot be used without --cloud or --upsun", 1) @@ -174,6 +178,12 @@ var localNewCmd = &console.Command{ } } + if c.Bool("api") { + if err := runComposer(c, dir, []string{"require", "api"}, c.Bool("debug")); err != nil { + return err + } + } + if withCloud { if err := runComposer(c, dir, []string{"require", "platformsh"}, c.Bool("debug")); err != nil { return err From 8ee3dd34815b03e9ad3347227ac14631547e359f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 30 Nov 2023 10:40:26 +0100 Subject: [PATCH 221/466] Bump dependencies --- go.mod | 20 ++++++++++---------- go.sum | 43 +++++++++++++++++++++---------------------- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/go.mod b/go.mod index e1fdd043..4684f141 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.4 - github.com/compose-spec/compose-go v1.20.0 + github.com/compose-spec/compose-go v1.20.2 github.com/docker/docker v24.0.7+incompatible - github.com/elazarl/goproxy v0.0.0-20231031074852-3ec07828be7a + github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 @@ -18,7 +18,7 @@ require ( github.com/rjeczalik/notify v0.9.3 github.com/rs/xid v1.5.0 github.com/rs/zerolog v1.31.0 - github.com/schollz/progressbar/v3 v3.13.1 + github.com/schollz/progressbar/v3 v3.14.1 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 @@ -63,14 +63,14 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.14.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.16.0 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index b268970a..1424376d 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/blackfireio/osinfo v1.0.4 h1:lQVXqDh+UDFZa9ZzTv/ReyBfu+vXMkjqeGO5CEwbCTs= github.com/blackfireio/osinfo v1.0.4/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA= -github.com/compose-spec/compose-go v1.20.0 h1:h4ZKOst1EF/DwZp7dWkb+wbTVE4nEyT9Lc89to84Ol4= -github.com/compose-spec/compose-go v1.20.0/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= +github.com/compose-spec/compose-go v1.20.2 h1:u/yfZHn4EaHGdidrZycWpxXgFffjYULlTbRfJ51ykjQ= +github.com/compose-spec/compose-go v1.20.2/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -23,8 +23,8 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20231031074852-3ec07828be7a h1:r72lWG/xCv9MLpRTss5BQVHDURXaaD6OwS2HkI5/+Ls= -github.com/elazarl/goproxy v0.0.0-20231031074852-3ec07828be7a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 h1:m62nsMU279qRD9PQSWD1l66kmkXzuYcnVJqL4XLeV2M= +github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/fabpot/local-php-security-checker/v2 v2.0.6 h1:m1znXkwzIPFkJWOnH8Fgt1mHY9hq8u+GY4AC6CPnDME= @@ -68,12 +68,10 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 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-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= @@ -114,8 +112,8 @@ github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= -github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= +github.com/schollz/progressbar/v3 v3.14.1 h1:VD+MJPCr4s3wdhTc7OEJ/Z3dAeBzJ7yKH/P4lC5yRTI= +github.com/schollz/progressbar/v3 v3.14.1/go.mod h1:Zc9xXneTzWXF81TGoqL71u0sBPjULtEHYtj/WVgVy8E= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -149,10 +147,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec 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.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= +golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= @@ -162,8 +160,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -177,23 +175,24 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= 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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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= From 1339531490a01e88cd10dac192b120ef1cf6e85d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 1 Dec 2023 08:11:22 +0000 Subject: [PATCH 222/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 138 +++++++++++++++++++------------------ 1 file changed, 70 insertions(+), 68 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 1b942c51..73b7df1a 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -25,108 +25,110 @@ package platformsh var availablePHPExts = map[string][]string{ "amqp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "apc": {"5.4", "5.5"}, - "apcu": {"5.4", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "apcu": {"5.4", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "apcu_bc": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "applepay": {"7.0", "7.1", "7.4"}, - "bcmath": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "blackfire": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "bz2": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "calendar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "ctype": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "curl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "enchant": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "bcmath": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "blackfire": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "bz2": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "calendar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "ctype": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "curl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "enchant": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "event": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "exif": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "ffi": {"7.4", "8.0", "8.1", "8.2"}, - "fileinfo": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "ftp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "gd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "exif": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "ffi": {"7.4", "8.0", "8.1", "8.2", "8.3"}, + "fileinfo": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "ftp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "gd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "gearman": {"5.4", "5.5", "5.6"}, - "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "gmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "gmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "gnupg": {"8.2"}, - "http": {"5.4", "5.5", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "iconv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "http": {"5.4", "5.5", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "iconv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "imagick": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, - "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "interbase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, - "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "ioncube": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, "json": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, - "ldap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "mailparse": {"7.0", "7.1", "7.2", "7.4", "8.0", "8.1", "8.2"}, - "mbstring": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "ldap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "mailparse": {"7.0", "7.1", "7.2", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "mbstring": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mcrypt": {"5.4", "5.5", "5.6", "7.0", "7.1"}, "memcache": {"5.4", "5.5", "5.6"}, "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "mongo": {"5.4", "5.5", "5.6"}, "mongodb": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mssql": {"5.4", "5.5", "5.6"}, "mysql": {"5.4", "5.5", "5.6"}, - "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "newrelic": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "oauth": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "oauth": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "openswoole": {"8.2"}, + "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, - "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pinba": {"5.4", "5.5", "5.6"}, - "posix": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "posix": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "propro": {"5.6"}, - "pspell": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "pspell": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pthreads": {"7.1"}, - "raphf": {"5.6", "7.4", "8.0", "8.1", "8.2"}, + "raphf": {"5.6", "7.4", "8.0", "8.1", "8.2", "8.3"}, "rdkafka": {"8.1", "8.2"}, - "readline": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "readline": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "recode": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3"}, - "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "simplexml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "snmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sourceguardian": {"7.0", "7.1", "8.2"}, + "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "simplexml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "snmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "sourceguardian": {"7.0", "7.1", "8.2", "8.3"}, "spplus": {"5.4", "5.5"}, - "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "ssh2": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sybase": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "ssh2": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "swoole": {"8.2"}, + "sybase": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "tideways": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "tideways_xhprof": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, - "tidy": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "tidy": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "wddx": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "xcache": {"5.4", "5.5"}, - "xdebug": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "xdebug": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xhprof": {"5.4", "5.5", "5.6"}, - "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, - "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "zbarcode": {"7.0", "7.1", "7.2", "7.3"}, "zendopcache": {"5.4"}, - "zip": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "zip": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, } var availableServices = []*service{ From f6fac5c1c1f799f5d72f6be97ce962536ef8067d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 6 Dec 2023 12:43:43 +0100 Subject: [PATCH 223/466] Avoid adding the same service more than once in psh configs --- commands/local_new.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/local_new.go b/commands/local_new.go index 085d612d..a187a462 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -293,6 +293,8 @@ func parseDockerComposeServices(dir string) []*CloudService { if err != nil { return nil } + + seen := map[string]bool{} for _, service := range project.Services { for _, port := range service.Ports { var s *CloudService @@ -313,7 +315,9 @@ func parseDockerComposeServices(dir string) []*CloudService { } else if port.Target == 9092 { s = &CloudService{Type: "kafka"} } - if s != nil { + _, done := seen[service.Name] + if s != nil && !done { + seen[service.Name] = true s.Name = service.Name parts := strings.Split(service.Image, ":") s.Version = regexp.MustCompile(`\d+(\.\d+)?`).FindString(parts[len(parts)-1]) From 8d96cc96d13ffbde68e66a51481f9ccf0c31ae0f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:15:01 +0000 Subject: [PATCH 224/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 665e2004..d8136672 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1312,6 +1312,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "pull-requests-clone-parent-data", DefaultValue: true,}, &console.StringFlag{Name: "recipients",}, &console.StringFlag{Name: "repository",}, + &console.StringFlag{Name: "resources-init", DefaultValue: "parent",}, &console.BoolFlag{Name: "resync-pull-requests",}, &console.StringFlag{Name: "routing-key",}, &console.StringFlag{Name: "secret",}, @@ -1417,6 +1418,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "pull-requests-clone-parent-data", DefaultValue: true,}, &console.StringFlag{Name: "recipients",}, &console.StringFlag{Name: "repository",}, + &console.StringFlag{Name: "resources-init", DefaultValue: "parent",}, &console.BoolFlag{Name: "resync-pull-requests",}, &console.StringFlag{Name: "routing-key",}, &console.StringFlag{Name: "secret",}, @@ -2203,6 +2205,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "disk", Aliases: []string{"D"},}, &console.BoolFlag{Name: "dry-run",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "size", Aliases: []string{"S"},}, From cef67f4f92d7ecbae880f35ce6fad55e19a1cba6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 7 Dec 2023 17:34:05 +0100 Subject: [PATCH 225/466] Avoid unneeded work --- commands/init_templating.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/init_templating.go b/commands/init_templating.go index aa797a42..d9abb5e2 100644 --- a/commands/init_templating.go +++ b/commands/init_templating.go @@ -236,6 +236,10 @@ func getTemplates(brand platformsh.CloudBrand, rootDirectory, chosenTemplateName continue } + if !strings.HasSuffix(file.Name(), ".yaml") { + continue + } + templateName := strings.TrimSuffix(file.Name(), ".yaml")[strings.Index(file.Name(), "-")+1:] isTemplateChosen := chosenTemplateName == templateName if chosenTemplateName != "" && !isTemplateChosen { From d7763bb5927412a4ef9c2ffe8aa434d69babecec Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 8 Dec 2023 12:40:55 +0100 Subject: [PATCH 226/466] Fix CGI invalid header version on empty responses Fix #385 Fix #381 Partially revert 529f67c92b030af5761a633f5130513b280c9169 --- local/php/toolbar.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/php/toolbar.go b/local/php/toolbar.go index 404ab9b0..95ca595e 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -67,7 +67,7 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea n, err := body.Read(bn) // if body is empty, return immediately if n == 0 && err == io.EOF { - return body, nil + return io.NopCloser(bytes.NewReader([]byte{})), nil } if n == len(bn) && err != nil { return nil, errors.WithStack(err) From 6a93835f2a8796410a18617d2f0bbdc52d6ddf05 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 8 Dec 2023 13:29:54 +0100 Subject: [PATCH 227/466] HTTP push: only consider ressources with no rel or rel=preload --- local/http/push.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/local/http/push.go b/local/http/push.go index b28d01e6..543670b3 100644 --- a/local/http/push.go +++ b/local/http/push.go @@ -56,6 +56,9 @@ func (s *Server) servePreloadLinks(w http.ResponseWriter, r *http.Request) ([]st if _, exists := resource.params["nopush"]; exists { continue } + if rel, exists := resource.params["rel"]; exists && rel != "preload" { + continue + } if isRemoteResource(resource.uri) { continue } From 7d7f389d561c15435602ab35fd18b2fb9632f86c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 8 Dec 2023 14:11:16 +0100 Subject: [PATCH 228/466] Bump dependencies --- go.mod | 6 +++--- go.sum | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4684f141..8e0d22e0 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/symfony-cli/cert v1.0.3 github.com/symfony-cli/console v1.0.3 github.com/symfony-cli/phpstore v1.0.10 - github.com/symfony-cli/terminal v1.0.4 + github.com/symfony-cli/terminal v1.0.6 golang.org/x/sync v0.5.0 golang.org/x/text v0.14.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c @@ -64,7 +64,7 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect + golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/sys v0.15.0 // indirect @@ -74,7 +74,7 @@ require ( gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - howett.net/plist v1.0.0 // indirect + howett.net/plist v1.0.1 // indirect software.sslmate.com/src/go-pkcs12 v0.4.0 // indirect ) diff --git a/go.sum b/go.sum index 1424376d..3491241c 100644 --- a/go.sum +++ b/go.sum @@ -135,6 +135,8 @@ github.com/symfony-cli/phpstore v1.0.10 h1:KEgMYIhxHMex1zxt9Tzxpfy5zWXZ3207DWhJr github.com/symfony-cli/phpstore v1.0.10/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.4 h1:jam7aN7g7WQ9uOwV9UC+iVGBLTlzK8kAC5EKcxq21Z8= github.com/symfony-cli/terminal v1.0.4/go.mod h1:+OxxnU05wyRHKYyQkTzTaCSSxmmIBcvAHLcQ099odj4= +github.com/symfony-cli/terminal v1.0.6 h1:DFjJULx0QZ8ojOahf/NnLkRtt0EaIkdVWRMHstFWtpE= +github.com/symfony-cli/terminal v1.0.6/go.mod h1:ehBd2bz31MHHQgy4qPb9vAGFtnxOazUhAO77GEd1vAM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -151,6 +153,8 @@ golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= +golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= @@ -214,5 +218,7 @@ gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= +howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM= +howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k= software.sslmate.com/src/go-pkcs12 v0.4.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= From 8b06b7efadedc666c41a12c970790232d54b8f31 Mon Sep 17 00:00:00 2001 From: Nihilus118 Date: Sat, 9 Dec 2023 11:54:13 +0100 Subject: [PATCH 229/466] Add command to change the tld of local proxy (issue #159) --- commands/local_proxy_change_tld.go | 55 +++++++++++++++++++++++++++ commands/local_proxy_domain_attach.go | 14 ++++++- commands/root.go | 1 + 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 commands/local_proxy_change_tld.go diff --git a/commands/local_proxy_change_tld.go b/commands/local_proxy_change_tld.go new file mode 100644 index 00000000..550060c3 --- /dev/null +++ b/commands/local_proxy_change_tld.go @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +import ( + "github.com/symfony-cli/console" + "github.com/symfony-cli/symfony-cli/local/proxy" + "github.com/symfony-cli/symfony-cli/util" + "github.com/symfony-cli/terminal" +) + +var localProxyTLD = &console.Command{ + Category: "local", + Name: "proxy:change:tld", + Aliases: []*console.Alias{{Name: "proxy:change:tld"}}, + Usage: "Change the TLD for the proxy", + Flags: []console.Flag{ + dirFlag, + }, + Args: []*console.Arg{ + {Name: "tld", Optional: false, Description: "The TLD for the project proxy", Slice: false}, + }, + Action: func(c *console.Context) error { + homeDir := util.GetHomeDir() + config, err := proxy.Load(homeDir) + if err != nil { + return err + } + + config.TLD = c.Args().Get("tld") + if err = config.Save(); err != nil { + return err + } + + terminal.Printfln("The proxy is now configured with the following tld: %s", config.TLD) + return nil + }, +} diff --git a/commands/local_proxy_domain_attach.go b/commands/local_proxy_domain_attach.go index ea37acf7..d87d95d5 100644 --- a/commands/local_proxy_domain_attach.go +++ b/commands/local_proxy_domain_attach.go @@ -20,6 +20,8 @@ package commands import ( + "strings" + "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/local/proxy" "github.com/symfony-cli/symfony-cli/util" @@ -35,6 +37,7 @@ var localProxyAttachDomainCmd = &console.Command{ dirFlag, }, Args: []*console.Arg{ + {Name: "tld", Optional: true, Default: ".wip", Description: "The TLD for the project proxy domains", Slice: false}, {Name: "domains", Optional: true, Description: "The project's domains", Slice: true}, }, Action: func(c *console.Context) error { @@ -48,7 +51,16 @@ var localProxyAttachDomainCmd = &console.Command{ if err != nil { return err } - if err := config.AddDirDomains(projectDir, c.Args().Tail()); err != nil { + + var domains []string + if strings.HasPrefix(c.Args().Slice()[0], ".") { + config.TLD = strings.TrimPrefix(c.Args().Slice()[0], ".") + domains = c.Args().Slice()[1:] + } else { + domains = c.Args().Slice() + } + + if err := config.AddDirDomains(projectDir, domains); err != nil { return err } terminal.Println("The proxy is now configured with the following domains for this directory:") diff --git a/commands/root.go b/commands/root.go index 7e36f634..bc05012b 100644 --- a/commands/root.go +++ b/commands/root.go @@ -58,6 +58,7 @@ func CommonCommands() []*console.Command { localNewCmd, localPhpListCmd, localPhpRefreshCmd, + localProxyTLD, localProxyAttachDomainCmd, localProxyDetachDomainCmd, localProxyStartCmd, From 5d7a12ef2ae1acee653f4604d37b1853dd100ed7 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 8 Dec 2023 15:53:40 +0100 Subject: [PATCH 230/466] Remove hardcoded value in logging context --- local/http/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/http/http.go b/local/http/http.go index 2f1a419f..031d3908 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -203,7 +203,7 @@ func (s *Server) ProxyHandler(w http.ResponseWriter, r *http.Request) { } else if status >= 400 { l = s.Logger.Warn() } - l = l.Str("ip", ip).Int("status", status).Str("method", r.Method).Str("scheme", "https").Str("host", "127.0.0.1:8004") + l = l.Str("ip", ip).Int("status", status).Str("method", r.Method).Str("scheme", "https").Str("host", r.Host) if len(resources) > 0 { l.Strs("preloaded_resources", resources) } From ff1958fbb1f875372c8d654e37f4c7c29327e9f2 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 8 Dec 2023 15:12:17 +0100 Subject: [PATCH 231/466] Rework workers lifecycle management to make them stop cleanly The workers will already receive the SIGINT signal because Ctrl+C is sent to the whole process group in which they are. This means that in the `server:start` command we only need to disable worker restart and wait for them to finish before exiting. In the `server:stop` command, this means we have to first signal the monitoring process (but without stopping it) and then stop each worker individually. Fix #390 --- commands/local_proxy_start.go | 2 +- commands/local_server_start.go | 43 ++++++++++++++++------- commands/local_server_stop.go | 48 ++++++++++++++++++++------ local/pid/pidfile.go | 62 ++++++++++++++++++++++++++++++++-- local/runner.go | 6 +++- local/runner_posix.go | 19 +++++++++++ local/runner_windows.go | 7 ++++ 7 files changed, 161 insertions(+), 26 deletions(-) create mode 100644 local/runner_posix.go create mode 100644 local/runner_windows.go diff --git a/commands/local_proxy_start.go b/commands/local_proxy_start.go index f3952b14..47f5d8b4 100644 --- a/commands/local_proxy_start.go +++ b/commands/local_proxy_start.go @@ -167,7 +167,7 @@ var localProxyStartCmd = &console.Command{ shutdownCh := make(chan bool, 1) go func() { sigsCh := make(chan os.Signal, 1) - signal.Notify(sigsCh, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM) + signal.Notify(sigsCh, os.Interrupt, syscall.SIGQUIT, syscall.SIGTERM) <-sigsCh signal.Stop(sigsCh) shutdownCh <- true diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 0601dca5..eee631ec 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -88,7 +88,7 @@ var localServerStartCmd = &console.Command{ return err } pidFile := pid.New(projectDir, nil) - pidFile.CustomName = "Web Server" + pidFile.CustomName = pid.WebServerName if pidFile.IsRunning() { ui.Warning("The local web server is already running") return errors.WithStack(printWebServerStatus(projectDir)) @@ -99,15 +99,6 @@ var localServerStartCmd = &console.Command{ homeDir := util.GetHomeDir() - shutdownCh := make(chan bool, 1) - go func() { - sigsCh := make(chan os.Signal, 1) - signal.Notify(sigsCh, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM) - <-sigsCh - signal.Stop(sigsCh) - shutdownCh <- true - }() - if err := reexec.NotifyForeground("boot"); err != nil { terminal.Logger.Error().Msg("Unable to go to the background: %s.\nAborting\n" + err.Error()) return console.Exit("", 1) @@ -138,6 +129,15 @@ var localServerStartCmd = &console.Command{ } } + shutdownCh := make(chan bool) + go func() { + sigsCh := make(chan os.Signal, 10) + signal.Notify(sigsCh, os.Interrupt, syscall.SIGQUIT, syscall.SIGTERM) + <-sigsCh + signal.Stop(sigsCh) + shutdownCh <- true + }() + reexec.NotifyForeground("proxy") proxyConfig, err := proxy.Load(homeDir) if err != nil { @@ -398,8 +398,8 @@ var localServerStartCmd = &console.Command{ return err case <-shutdownCh: terminal.Eprintln("") - terminal.Eprintln("Shutting down!") - if err := cleanupWebServerFiles(projectDir, pidFile); err != nil { + terminal.Eprintln("Shutting down! Waiting for all workers to be done.") + if err := waitForWorkers(projectDir, pidFile); err != nil { return err } terminal.Eprintln("") @@ -425,3 +425,22 @@ func cleanupWebServerFiles(projectDir string, pidFile *pid.PidFile) error { } return nil } + +func waitForWorkers(projectDir string, pidFile *pid.PidFile) error { + pids := pid.AllWorkers(projectDir) + if len(pids) < 1 { + return nil + } + + var g errgroup.Group + for _, p := range pids { + g.Go(p.WaitForExit) + } + if err := g.Wait(); err != nil { + return err + } + if err := pidFile.Remove(); err != nil { + return err + } + return nil +} diff --git a/commands/local_server_stop.go b/commands/local_server_stop.go index 39708f1e..e7232231 100644 --- a/commands/local_server_stop.go +++ b/commands/local_server_stop.go @@ -21,6 +21,7 @@ package commands import ( "fmt" + "os" "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/local/pid" @@ -46,26 +47,53 @@ var localServerStopCmd = &console.Command{ pids := append(pid.AllWorkers(projectDir), webserver) var g errgroup.Group running := 0 + for _, p := range pids { + if !p.IsRunning() { + continue + } + + running++ + g.Go(p.WaitForExit) + + // we first notify the webserver in order to let it know it should + // not restart any workers anymore + if p.CustomName == pid.WebServerName { + p.Signal(os.Interrupt) + continue + } + } + + if running == 0 { + ui.Success("The web server is not running") + return nil + } + for _, p := range pids { terminal.Printf("Stopping %s", p.ShortName()) - if p.IsRunning() { - running++ - g.Go(p.Stop) - terminal.Println("") - } else { + if !p.IsRunning() { terminal.Println(": not running") + continue + } + + // we don't "stop" the webserver because it acts as a monitoring + // process and as such we already signaled it earlier (see previous + // loop). If we do, the signal would be broadcast to the full + // process group, breaking some workers (as docker compose for + // example) because they would receive too many signals for a single + // stop request. + if p.CustomName == pid.WebServerName { + } else if err := p.Stop(); err != nil { + terminal.Printf(": %s", err) } + terminal.Println("") } terminal.Println("") if err := g.Wait(); err != nil { return err } - if running == 0 { - ui.Success("The web server is not running") - } else { - ui.Success(fmt.Sprintf("Stopped %d process(es) successfully", running)) - } + + ui.Success(fmt.Sprintf("Stopped %d process(es) successfully", running)) return nil }, } diff --git a/local/pid/pidfile.go b/local/pid/pidfile.go index c182cfef..53b3b172 100644 --- a/local/pid/pidfile.go +++ b/local/pid/pidfile.go @@ -28,6 +28,7 @@ import ( "path/filepath" "strings" "syscall" + "time" "github.com/mitchellh/go-homedir" "github.com/pkg/errors" @@ -36,6 +37,8 @@ import ( "github.com/symfony-cli/symfony-cli/util" ) +const WebServerName = "Web Server" + type PidFile struct { Dir string `json:"dir"` Watched []string `json:"watch"` @@ -92,7 +95,7 @@ func (p *PidFile) String() string { return p.CustomName } if p.Args == nil { - return "Web Server" + return WebServerName } return p.Command() } @@ -102,11 +105,52 @@ func (p *PidFile) ShortName() string { return p.CustomName } if len(p.Args) == 0 { - return "Web Server" + return WebServerName } return "Worker " + p.Args[0] } +func (p *PidFile) WaitForExit() error { + if p.Pid == 0 { + return nil + } + + process, err := os.FindProcess(p.Pid) + if err != nil { + return err + } + + defer p.Remove() + ch := make(chan error) + go func() { + if process.Signal(syscall.Signal(0)) != nil { + ch <- nil + return + } + + _, err := process.Wait() + if err == nil { + ch <- nil + return + } + if serr, isSysCallError := err.(*os.SyscallError); isSysCallError { + if errn, isErrno := serr.Err.(syscall.Errno); isErrno && errn == syscall.ECHILD { + ch <- nil + return + } + } + ch <- errors.WithMessagef(err, "while waiting for process %v (%s)", p.Pid, p.ShortName()) + close(ch) + }() + + select { + case err := <-ch: + return err + case _ = <-time.After(30 * time.Second): + return errors.Errorf("Time out detected during \"%s\" process exit", p.ShortName()) + } +} + func (p *PidFile) WaitForPid() <-chan error { ch := make(chan error, 1) @@ -266,6 +310,20 @@ func (p *PidFile) Stop() error { return kill(p.Pid) } +// Signal sends a signal to the current process for this PidFile +func (p *PidFile) Signal(sig os.Signal) error { + if p.Pid == 0 { + return nil + } + + process, err := os.FindProcess(p.Pid) + if err != nil { + return err + } + + return process.Signal(sig) +} + func ToConfiguredProjects() (map[string]*projects.ConfiguredProject, error) { ps := make(map[string]*projects.ConfiguredProject) userHomeDir, err := homedir.Dir() diff --git a/local/runner.go b/local/runner.go index f895f450..b67ee30c 100644 --- a/local/runner.go +++ b/local/runner.go @@ -108,7 +108,7 @@ func (r *Runner) Run() error { cmdExitChan := make(chan error) // receives command exit status, allow to cmd.Wait() in non-blocking way restartChan := make(chan bool) // receives requests to restart the command sigChan := make(chan os.Signal, 1) - signal.Notify(sigChan, os.Kill, os.Interrupt, syscall.SIGINT, syscall.SIGTERM) + signal.Notify(sigChan, os.Kill, os.Interrupt, syscall.SIGQUIT, syscall.SIGTERM) defer signal.Stop(sigChan) if len(r.pidFile.Watched) > 0 { @@ -277,6 +277,10 @@ func (r *Runner) buildCmd() (*exec.Cmd, error) { cmd.Env = os.Environ() cmd.Dir = r.pidFile.Dir + if err := buildCmd(cmd); err != nil { + return nil, err + } + if r.mode == RunnerModeOnce { cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr diff --git a/local/runner_posix.go b/local/runner_posix.go new file mode 100644 index 00000000..a19321c2 --- /dev/null +++ b/local/runner_posix.go @@ -0,0 +1,19 @@ +//go:build !windows +// +build !windows + +package local + +import ( + "os/exec" + "syscall" +) + +func buildCmd(cmd *exec.Cmd) error { + cmd.SysProcAttr = &syscall.SysProcAttr{ + // isolate each command in a new process group that we can cleanly send + // signal to when we want to stop it + Setpgid: true, + } + + return nil +} diff --git a/local/runner_windows.go b/local/runner_windows.go new file mode 100644 index 00000000..46fe4438 --- /dev/null +++ b/local/runner_windows.go @@ -0,0 +1,7 @@ +package local + +import "os/exec" + +func buildCmd(*exec.Cmd) error { + return nil +} From 7cead69d68d48625ac55f69603850a6b6c5eaf17 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:10:44 +0000 Subject: [PATCH 232/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 73b7df1a..8e9543d3 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -219,8 +219,8 @@ var availableServices = []*service{ { Type: "postgresql", Versions: serviceVersions{ - Deprecated: []string{"9.3", "9.4", "9.5", "9.6", "10"}, - Supported: []string{"11", "12", "13", "14", "15"}, + Deprecated: []string{"9.3", "9.4", "9.5", "9.6", "10", "11"}, + Supported: []string{"12", "13", "14", "15", "16"}, }, }, { From 7ae7fa9015454c06860e000e147af89917e356da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 12:14:50 +0000 Subject: [PATCH 233/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 8e9543d3..53d5ce86 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -23,7 +23,7 @@ package platformsh var availablePHPExts = map[string][]string{ - "amqp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "amqp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "apc": {"5.4", "5.5"}, "apcu": {"5.4", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "apcu_bc": {"7.0", "7.1", "7.2", "7.3", "7.4"}, From 6728ce040ac318a31c123c115666f98dba6b638e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 14 Dec 2023 19:33:42 +0100 Subject: [PATCH 234/466] Fix speed issue --- envs/envs.go | 5 +++-- envs/local.go | 9 ++++++--- envs/local_test.go | 2 +- local/platformsh/applications.go | 9 +++++++-- local/platformsh/brand.go | 3 ++- local/platformsh/project.go | 3 +++ 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/envs/envs.go b/envs/envs.go index 811ba499..79e4ac6b 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -148,7 +148,8 @@ func extractRelationshipsEnvs(env Environment) Envs { } url += fmt.Sprintf("%s:%s/%s?sslmode=disable", endpoint["host"].(string), formatInt(endpoint["port"]), path) values[fmt.Sprintf("%sURL", prefix)] = url - if env.Language() != "golang" { + detectedLanguage := env.Language() + if detectedLanguage != "golang" { charset := "utf8" if envCharset := os.Getenv(fmt.Sprintf("%sCHARSET", prefix)); envCharset != "" { charset = envCharset @@ -157,7 +158,7 @@ func extractRelationshipsEnvs(env Environment) Envs { } values[fmt.Sprintf("%sURL", prefix)] = values[fmt.Sprintf("%sURL", prefix)] + "&charset=" + charset } - if env.Language() == "php" { + if detectedLanguage == "php" { if v, ok := endpoint["type"]; ok { versionKey := fmt.Sprintf("%sVERSION", prefix) if version, hasVersionInEnv := os.LookupEnv(versionKey); hasVersionInEnv { diff --git a/envs/local.go b/envs/local.go index d14c870a..2eee8089 100644 --- a/envs/local.go +++ b/envs/local.go @@ -160,8 +160,9 @@ func (l *Local) Relationships() Relationships { project, err := platformsh.ProjectFromDir(l.Dir, l.Debug) if err != nil { if l.Debug { - brand := platformsh.GuessCloudFromDirectory(l.Dir) - fmt.Fprintf(os.Stderr, "ERROR: unable to get %s project information\n", brand) + if brand := platformsh.GuessCloudFromDirectory(l.Dir); brand != platformsh.NoBrand { + fmt.Fprintf(os.Stderr, "ERROR: unable to get %s project information\n", brand) + } } return dockerRel } @@ -228,7 +229,9 @@ func (l *Local) Language() string { app := platformsh.GuessSelectedAppByWd(platformsh.FindLocalApplications(projectRoot)) if app == nil { if l.Debug { - fmt.Fprint(os.Stderr, "ERROR: unable to get project configuration\n") + if platformsh.GuessCloudFromDirectory(l.Dir) != platformsh.NoBrand { + fmt.Fprint(os.Stderr, "ERROR: unable to get project configuration\n") + } } return "php" } diff --git a/envs/local_test.go b/envs/local_test.go index 1fd344b3..68fd5163 100644 --- a/envs/local_test.go +++ b/envs/local_test.go @@ -37,7 +37,7 @@ func (s *LocalSuite) TestExtra(c *C) { c.Assert(l.Extra(), DeepEquals, Envs{ "SYMFONY_TUNNEL": "", "SYMFONY_TUNNEL_ENV": "", - "SYMFONY_TUNNEL_BRAND": "Platform.sh", + "SYMFONY_TUNNEL_BRAND": "", "SYMFONY_DOCKER_ENV": "", }) diff --git a/local/platformsh/applications.go b/local/platformsh/applications.go index d9a33c50..93a9dc0a 100644 --- a/local/platformsh/applications.go +++ b/local/platformsh/applications.go @@ -34,9 +34,9 @@ var skippedDirectories = map[string]interface{}{ "vendor": nil, "node_modules": nil, "bundles": nil, - "var": nil, "cache": nil, "config": nil, + "public": nil, "tests": nil, "templates": nil, "assets": nil, @@ -44,6 +44,8 @@ var skippedDirectories = map[string]interface{}{ "fonts": nil, "js": nil, "src": nil, + "var": nil, + "web": nil, } type UpsunDotYaml struct { @@ -102,6 +104,9 @@ func FindLocalApplications(rootDirectory string) LocalApplications { } brand := GuessCloudFromDirectory(rootDirectory) + if brand == NoBrand { + return apps + } go func() { for file := range appParser { content, err := os.ReadFile(file) @@ -198,7 +203,7 @@ func findAppConfigFiles(brand CloudBrand, dir string) []string { } // don't go too deep down the tree - if len(strings.Split(path[rootDirectoryLen:], separator)) > 5 { + if len(strings.Split(path[rootDirectoryLen:], separator)) > 3 { return filepath.SkipDir } } diff --git a/local/platformsh/brand.go b/local/platformsh/brand.go index b31e402f..936eec25 100644 --- a/local/platformsh/brand.go +++ b/local/platformsh/brand.go @@ -53,6 +53,7 @@ var PlatformshBrand = CloudBrand{ GitRemoteName: "platform", BinName: "platform", } +var NoBrand = CloudBrand{} func (b CloudBrand) String() string { return b.Name @@ -82,5 +83,5 @@ func GuessCloudFromDirectory(dir string) CloudBrand { return brand } } - return PlatformshBrand + return NoBrand } diff --git a/local/platformsh/project.go b/local/platformsh/project.go index 8db7162d..b9ff4c98 100644 --- a/local/platformsh/project.go +++ b/local/platformsh/project.go @@ -98,6 +98,9 @@ func repositoryRootDir(currentDir string) string { func getProjectID(projectRoot string, debug bool) string { brand := GuessCloudFromDirectory(projectRoot) + if brand == NoBrand { + return "" + } id := getProjectIDFromConfigFile(brand, projectRoot, debug) if id != "" { return id From 030effe62b1b9f6245ec61854281ad17d84fe5cf Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 15 Dec 2023 13:41:37 +0100 Subject: [PATCH 235/466] Stop using a deprecated flag on goreleaser --- .github/workflows/releaser.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 95071cad..1de6a03b 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -79,7 +79,7 @@ jobs: if: ${{ !startsWith(github.ref, 'refs/tags/v') }} with: version: latest - args: release --rm-dist --snapshot --skip-publish --skip-sign + args: release --clean --snapshot --skip-publish --skip-sign env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - @@ -89,7 +89,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') with: version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAP_GITHUB_TOKEN: ${{ secrets.GH_PAT }} From 13e759a308b3d07562041cefe947b2f271199392 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 19 Dec 2023 11:36:29 +0100 Subject: [PATCH 236/466] Bump deps --- go.mod | 8 ++++---- go.sum | 22 ++++++++-------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 8e0d22e0..78644cbc 100644 --- a/go.mod +++ b/go.mod @@ -58,19 +58,19 @@ require ( github.com/opencontainers/image-spec v1.1.0-rc5 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect + golang.org/x/crypto v0.17.0 // indirect + golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/term v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.16.0 // indirect + golang.org/x/tools v0.16.1 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 3491241c..f700c045 100644 --- a/go.sum +++ b/go.sum @@ -106,8 +106,8 @@ github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZe github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +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/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= @@ -133,8 +133,6 @@ github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/Z github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= github.com/symfony-cli/phpstore v1.0.10 h1:KEgMYIhxHMex1zxt9Tzxpfy5zWXZ3207DWhJrIU6VGE= github.com/symfony-cli/phpstore v1.0.10/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= -github.com/symfony-cli/terminal v1.0.4 h1:jam7aN7g7WQ9uOwV9UC+iVGBLTlzK8kAC5EKcxq21Z8= -github.com/symfony-cli/terminal v1.0.4/go.mod h1:+OxxnU05wyRHKYyQkTzTaCSSxmmIBcvAHLcQ099odj4= github.com/symfony-cli/terminal v1.0.6 h1:DFjJULx0QZ8ojOahf/NnLkRtt0EaIkdVWRMHstFWtpE= github.com/symfony-cli/terminal v1.0.6/go.mod h1:ehBd2bz31MHHQgy4qPb9vAGFtnxOazUhAO77GEd1vAM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -149,12 +147,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec 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.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= -golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= -golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= -golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 h1:qCEDpW1G+vcj3Y7Fy52pEM1AWm3abj8WimGYejI3SC4= +golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= @@ -195,8 +191,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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= @@ -216,8 +212,6 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= -howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM= howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k= From b8b71b5717ffae19afe00c712ab029801cb1a66c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 Dec 2023 16:08:15 +0000 Subject: [PATCH 237/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 53d5ce86..7ee5678b 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -163,8 +163,8 @@ var availableServices = []*service{ { Type: "mariadb", Versions: serviceVersions{ - Deprecated: []string{"5.5", "10.0", "10.1", "10.2"}, - Supported: []string{"10.3", "10.4", "10.5", "10.6", "10.11", "11.0"}, + Deprecated: []string{"5.5", "10.0", "10.1", "10.2", "10.3"}, + Supported: []string{"10.4", "10.5", "10.6", "10.11", "11.0", "11.2"}, }, }, { From ee494a64d17a01c4e1059036b71f15182a50ca5d Mon Sep 17 00:00:00 2001 From: Johannes Ritter <60194885+Nihilus118@users.noreply.github.com> Date: Thu, 21 Dec 2023 20:15:53 +0100 Subject: [PATCH 238/466] Update commands/local_proxy_change_tld.go Co-authored-by: Tugdual Saunier --- commands/local_proxy_change_tld.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/local_proxy_change_tld.go b/commands/local_proxy_change_tld.go index 550060c3..784c8b23 100644 --- a/commands/local_proxy_change_tld.go +++ b/commands/local_proxy_change_tld.go @@ -35,7 +35,7 @@ var localProxyTLD = &console.Command{ dirFlag, }, Args: []*console.Arg{ - {Name: "tld", Optional: false, Description: "The TLD for the project proxy", Slice: false}, + {Name: "tld", Description: "The TLD for the project proxy"}, }, Action: func(c *console.Context) error { homeDir := util.GetHomeDir() From 36428517be9f156bd40185df984b1aaea71996fd Mon Sep 17 00:00:00 2001 From: Nihilus118 Date: Thu, 21 Dec 2023 20:16:54 +0100 Subject: [PATCH 239/466] remove unused flags --- commands/local_proxy_change_tld.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/commands/local_proxy_change_tld.go b/commands/local_proxy_change_tld.go index 784c8b23..66697655 100644 --- a/commands/local_proxy_change_tld.go +++ b/commands/local_proxy_change_tld.go @@ -31,9 +31,6 @@ var localProxyTLD = &console.Command{ Name: "proxy:change:tld", Aliases: []*console.Alias{{Name: "proxy:change:tld"}}, Usage: "Change the TLD for the proxy", - Flags: []console.Flag{ - dirFlag, - }, Args: []*console.Arg{ {Name: "tld", Description: "The TLD for the project proxy"}, }, From d8c8815582b6fb6b684c3587d0d492322fb59ef6 Mon Sep 17 00:00:00 2001 From: Nihilus118 Date: Thu, 21 Dec 2023 20:18:23 +0100 Subject: [PATCH 240/466] revert changes --- commands/local_proxy_domain_attach.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/commands/local_proxy_domain_attach.go b/commands/local_proxy_domain_attach.go index d87d95d5..ea37acf7 100644 --- a/commands/local_proxy_domain_attach.go +++ b/commands/local_proxy_domain_attach.go @@ -20,8 +20,6 @@ package commands import ( - "strings" - "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/local/proxy" "github.com/symfony-cli/symfony-cli/util" @@ -37,7 +35,6 @@ var localProxyAttachDomainCmd = &console.Command{ dirFlag, }, Args: []*console.Arg{ - {Name: "tld", Optional: true, Default: ".wip", Description: "The TLD for the project proxy domains", Slice: false}, {Name: "domains", Optional: true, Description: "The project's domains", Slice: true}, }, Action: func(c *console.Context) error { @@ -51,16 +48,7 @@ var localProxyAttachDomainCmd = &console.Command{ if err != nil { return err } - - var domains []string - if strings.HasPrefix(c.Args().Slice()[0], ".") { - config.TLD = strings.TrimPrefix(c.Args().Slice()[0], ".") - domains = c.Args().Slice()[1:] - } else { - domains = c.Args().Slice() - } - - if err := config.AddDirDomains(projectDir, domains); err != nil { + if err := config.AddDirDomains(projectDir, c.Args().Tail()); err != nil { return err } terminal.Println("The proxy is now configured with the following domains for this directory:") From 947bf87643a137dec67fe5b57baeabc9e795460b Mon Sep 17 00:00:00 2001 From: Nihilus118 Date: Thu, 21 Dec 2023 20:25:43 +0100 Subject: [PATCH 241/466] validate the tld before saving --- commands/local_proxy_change_tld.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/commands/local_proxy_change_tld.go b/commands/local_proxy_change_tld.go index 66697655..51287607 100644 --- a/commands/local_proxy_change_tld.go +++ b/commands/local_proxy_change_tld.go @@ -20,6 +20,9 @@ package commands import ( + "fmt" + "regexp" + "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/local/proxy" "github.com/symfony-cli/symfony-cli/util" @@ -42,6 +45,9 @@ var localProxyTLD = &console.Command{ } config.TLD = c.Args().Get("tld") + if !regexp.MustCompile(`^[a-z0-9-]{2,63}$`).MatchString(config.TLD) { + return fmt.Errorf("the TLD must not contain any dot and must be at least two characters long") + } if err = config.Save(); err != nil { return err } From 796a24bb530c8c1ec7deb655eb771cffeb3597ee Mon Sep 17 00:00:00 2001 From: Nihilus118 Date: Thu, 21 Dec 2023 20:31:54 +0100 Subject: [PATCH 242/466] Update TLD validation error message --- commands/local_proxy_change_tld.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/local_proxy_change_tld.go b/commands/local_proxy_change_tld.go index 51287607..852d1217 100644 --- a/commands/local_proxy_change_tld.go +++ b/commands/local_proxy_change_tld.go @@ -46,7 +46,7 @@ var localProxyTLD = &console.Command{ config.TLD = c.Args().Get("tld") if !regexp.MustCompile(`^[a-z0-9-]{2,63}$`).MatchString(config.TLD) { - return fmt.Errorf("the TLD must not contain any dot and must be at least two characters long") + return fmt.Errorf("the TLD must only contain lowercase letters, numbers and hyphens") } if err = config.Save(); err != nil { return err From 896997d21c16abee43ecedbb20dc78718c06caa8 Mon Sep 17 00:00:00 2001 From: Nihilus118 Date: Sat, 23 Dec 2023 12:58:21 +0100 Subject: [PATCH 243/466] Update TLD validation regex --- commands/local_proxy_change_tld.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/local_proxy_change_tld.go b/commands/local_proxy_change_tld.go index 852d1217..2ee77e18 100644 --- a/commands/local_proxy_change_tld.go +++ b/commands/local_proxy_change_tld.go @@ -45,8 +45,8 @@ var localProxyTLD = &console.Command{ } config.TLD = c.Args().Get("tld") - if !regexp.MustCompile(`^[a-z0-9-]{2,63}$`).MatchString(config.TLD) { - return fmt.Errorf("the TLD must only contain lowercase letters, numbers and hyphens") + if !regexp.MustCompile(`^[a-z]{1,63}$`).MatchString(config.TLD) { + return fmt.Errorf("the TLD must only contain lowercase letters") } if err = config.Save(); err != nil { return err From 2cfcef7a188b551be0d347fce4c1da24797a9a03 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 28 Dec 2023 19:16:05 +0100 Subject: [PATCH 244/466] Bump deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 78644cbc..d9e8c6a5 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/symfony-cli/symfony-cli require ( github.com/NYTimes/gziphandler v1.1.1 - github.com/blackfireio/osinfo v1.0.4 + github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 github.com/docker/docker v24.0.7+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 @@ -64,7 +64,7 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect + golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/sys v0.15.0 // indirect diff --git a/go.sum b/go.sum index f700c045..0699ef82 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/blackfireio/osinfo v1.0.4 h1:lQVXqDh+UDFZa9ZzTv/ReyBfu+vXMkjqeGO5CEwbCTs= -github.com/blackfireio/osinfo v1.0.4/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA= +github.com/blackfireio/osinfo v1.0.5 h1:6hlaWzfcpb87gRmznVf7wSdhysGqLRz9V/xuSdCEXrA= +github.com/blackfireio/osinfo v1.0.5/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA= github.com/compose-spec/compose-go v1.20.2 h1:u/yfZHn4EaHGdidrZycWpxXgFffjYULlTbRfJ51ykjQ= github.com/compose-spec/compose-go v1.20.2/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -149,8 +149,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 h1:qCEDpW1G+vcj3Y7Fy52pEM1AWm3abj8WimGYejI3SC4= -golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= From 041d0074cfd2134840943aa623d7ee57bf65ed2b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 2 Jan 2024 19:26:02 +0100 Subject: [PATCH 245/466] Bump deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d9e8c6a5..0555e3bf 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 - github.com/symfony-cli/cert v1.0.3 + github.com/symfony-cli/cert v1.0.5 github.com/symfony-cli/console v1.0.3 github.com/symfony-cli/phpstore v1.0.10 github.com/symfony-cli/terminal v1.0.6 diff --git a/go.sum b/go.sum index 0699ef82..d8b01cae 100644 --- a/go.sum +++ b/go.sum @@ -127,8 +127,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/symfony-cli/cert v1.0.3 h1:dRlJPIzQ9ruQYPwKc8qeyjoerKP22oTGpvg6lWglvvs= -github.com/symfony-cli/cert v1.0.3/go.mod h1:m2aZC0qLifAgsa0uLshMlJRIkS6hx2bqvDLJgGEbY6Q= +github.com/symfony-cli/cert v1.0.5 h1:U0H97eRf4bMhlD2WWB42fuapQ/wImqZVHP+PW2z5T1c= +github.com/symfony-cli/cert v1.0.5/go.mod h1:9axy74P/rAP0Jia6JFfqst26tn2h2U0JCJj288t8iuc= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= github.com/symfony-cli/phpstore v1.0.10 h1:KEgMYIhxHMex1zxt9Tzxpfy5zWXZ3207DWhJrIU6VGE= From d269ad2c35afd2bc7ff716580f1ffa6ade572d10 Mon Sep 17 00:00:00 2001 From: Sarim Khan Date: Thu, 4 Jan 2024 08:52:12 +0600 Subject: [PATCH 246/466] Set SysProcAttr Foreground: true when user run cmd Fixes: #404 --- local/runner.go | 2 +- local/runner_posix.go | 5 +++-- local/runner_windows.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/local/runner.go b/local/runner.go index b67ee30c..5e9a3135 100644 --- a/local/runner.go +++ b/local/runner.go @@ -277,7 +277,7 @@ func (r *Runner) buildCmd() (*exec.Cmd, error) { cmd.Env = os.Environ() cmd.Dir = r.pidFile.Dir - if err := buildCmd(cmd); err != nil { + if err := buildCmd(cmd, r.mode == RunnerModeOnce); err != nil { return nil, err } diff --git a/local/runner_posix.go b/local/runner_posix.go index a19321c2..71cb7abf 100644 --- a/local/runner_posix.go +++ b/local/runner_posix.go @@ -8,11 +8,12 @@ import ( "syscall" ) -func buildCmd(cmd *exec.Cmd) error { +func buildCmd(cmd *exec.Cmd, foreground bool) error { cmd.SysProcAttr = &syscall.SysProcAttr{ // isolate each command in a new process group that we can cleanly send // signal to when we want to stop it - Setpgid: true, + Setpgid: true, + Foreground: foreground, } return nil diff --git a/local/runner_windows.go b/local/runner_windows.go index 46fe4438..4b0ec0b9 100644 --- a/local/runner_windows.go +++ b/local/runner_windows.go @@ -2,6 +2,6 @@ package local import "os/exec" -func buildCmd(*exec.Cmd) error { +func buildCmd(*exec.Cmd, bool) error { return nil } From 9eabae568c4cd2a0dbffde3bdee824caca203060 Mon Sep 17 00:00:00 2001 From: Nihilus118 Date: Thu, 4 Jan 2024 11:57:42 +0100 Subject: [PATCH 247/466] Refactor kill function to gracefully terminate process group --- local/pid/pidfile_other.go | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/local/pid/pidfile_other.go b/local/pid/pidfile_other.go index 01b73db0..ef3ba3a1 100644 --- a/local/pid/pidfile_other.go +++ b/local/pid/pidfile_other.go @@ -22,12 +22,40 @@ package pid -import "syscall" +import ( + "errors" + "syscall" + "time" +) func kill(pid int) error { pgid, err := syscall.Getpgid(pid) if err != nil { return err } - return syscall.Kill(-pgid, syscall.SIGTERM) + + // Send SIGTERM to the process group + err = syscall.Kill(-pgid, syscall.SIGINT) + if err != nil { + return err + } + + // Wait for the process group to exit gracefully with a timeout of 5 seconds + done := make(chan error, 1) + go func() { + _, err := syscall.Wait4(-pgid, nil, 0, nil) + done <- err + }() + + select { + case err := <-done: + if err != nil { + return err + } + case <-time.After(5 * time.Second): + return errors.New("timeout waiting for process group to exit gracefully") + } + + // Send SIGKILL to the process group + return syscall.Kill(-pgid, syscall.SIGKILL) } From 54ba3d226923af4294ece2d28a8be8f3db9ee2f0 Mon Sep 17 00:00:00 2001 From: Johannes Ritter <60194885+Nihilus118@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:59:34 +0100 Subject: [PATCH 248/466] Update commands/local_proxy_change_tld.go Co-authored-by: Fabien Potencier --- commands/local_proxy_change_tld.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/local_proxy_change_tld.go b/commands/local_proxy_change_tld.go index 2ee77e18..9eb19a51 100644 --- a/commands/local_proxy_change_tld.go +++ b/commands/local_proxy_change_tld.go @@ -52,7 +52,7 @@ var localProxyTLD = &console.Command{ return err } - terminal.Printfln("The proxy is now configured with the following tld: %s", config.TLD) + terminal.Printfln("The proxy is now configured with the following TLD: %s", config.TLD) return nil }, } From 7a230364775891d0fd04d370ec33644b36cf9340 Mon Sep 17 00:00:00 2001 From: Johannes Ritter <60194885+Nihilus118@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:59:40 +0100 Subject: [PATCH 249/466] Update commands/local_proxy_change_tld.go Co-authored-by: Fabien Potencier --- commands/local_proxy_change_tld.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/local_proxy_change_tld.go b/commands/local_proxy_change_tld.go index 9eb19a51..47bbc592 100644 --- a/commands/local_proxy_change_tld.go +++ b/commands/local_proxy_change_tld.go @@ -31,7 +31,7 @@ import ( var localProxyTLD = &console.Command{ Category: "local", - Name: "proxy:change:tld", + Name: "proxy:tld", Aliases: []*console.Alias{{Name: "proxy:change:tld"}}, Usage: "Change the TLD for the proxy", Args: []*console.Arg{ From bae78592e63d68a670cf77ea052b7b31679b9100 Mon Sep 17 00:00:00 2001 From: Johannes Ritter <60194885+Nihilus118@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:59:45 +0100 Subject: [PATCH 250/466] Update commands/local_proxy_change_tld.go Co-authored-by: Fabien Potencier --- commands/local_proxy_change_tld.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/local_proxy_change_tld.go b/commands/local_proxy_change_tld.go index 47bbc592..3905e5dc 100644 --- a/commands/local_proxy_change_tld.go +++ b/commands/local_proxy_change_tld.go @@ -33,7 +33,7 @@ var localProxyTLD = &console.Command{ Category: "local", Name: "proxy:tld", Aliases: []*console.Alias{{Name: "proxy:change:tld"}}, - Usage: "Change the TLD for the proxy", + Usage: "Display or change the TLD for the proxy", Args: []*console.Arg{ {Name: "tld", Description: "The TLD for the project proxy"}, }, From bdc27baa84bbc5e4ea643051cac5896c44623ce2 Mon Sep 17 00:00:00 2001 From: Nihilus118 Date: Fri, 5 Jan 2024 12:16:33 +0100 Subject: [PATCH 251/466] consistent naming and prevent index out of range error --- ...proxy_change_tld.go => local_proxy_tld.go} | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) rename commands/{local_proxy_change_tld.go => local_proxy_tld.go} (72%) diff --git a/commands/local_proxy_change_tld.go b/commands/local_proxy_tld.go similarity index 72% rename from commands/local_proxy_change_tld.go rename to commands/local_proxy_tld.go index 3905e5dc..0aa5b630 100644 --- a/commands/local_proxy_change_tld.go +++ b/commands/local_proxy_tld.go @@ -32,10 +32,10 @@ import ( var localProxyTLD = &console.Command{ Category: "local", Name: "proxy:tld", - Aliases: []*console.Alias{{Name: "proxy:change:tld"}}, + Aliases: []*console.Alias{{Name: "proxy:tld"}, {Name: "proxy:change:tld"}}, Usage: "Display or change the TLD for the proxy", Args: []*console.Arg{ - {Name: "tld", Description: "The TLD for the project proxy"}, + {Name: "tld", Description: "The TLD for the project proxy", Optional: true}, }, Action: func(c *console.Context) error { homeDir := util.GetHomeDir() @@ -44,15 +44,17 @@ var localProxyTLD = &console.Command{ return err } - config.TLD = c.Args().Get("tld") - if !regexp.MustCompile(`^[a-z]{1,63}$`).MatchString(config.TLD) { - return fmt.Errorf("the TLD must only contain lowercase letters") - } - if err = config.Save(); err != nil { - return err + if c.Args().Present() { + config.TLD = c.Args().Get("tld") + if !regexp.MustCompile(`^[a-z]{1,63}$`).MatchString(config.TLD) { + return fmt.Errorf("the TLD must only contain lowercase letters") + } + if err = config.Save(); err != nil { + return err + } } - terminal.Printfln("The proxy is now configured with the following TLD: %s", config.TLD) + terminal.Printfln("The proxy is configured with the following TLD: %s", config.TLD) return nil }, } From 906ab817c46b1e3a473885d7ad44753dee9cd243 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:14:13 +0000 Subject: [PATCH 252/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 7ee5678b..406245e6 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -37,7 +37,7 @@ var availablePHPExts = map[string][]string{ "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "enchant": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "event": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "event": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "exif": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "ffi": {"7.4", "8.0", "8.1", "8.2", "8.3"}, "fileinfo": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, @@ -53,7 +53,7 @@ var availablePHPExts = map[string][]string{ "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "imagick": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "interbase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "interbase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "ioncube": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, "json": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, From 720b61784d9a649db319483156ad7bbc41dac68a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 8 Jan 2024 09:54:58 +0100 Subject: [PATCH 253/466] Fix cloud commands when the CLI is ran in a non-project directory --- go.mod | 1 + go.sum | 2 ++ local/platformsh/brand.go | 12 +++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 0555e3bf..60057e7d 100644 --- a/go.mod +++ b/go.mod @@ -60,6 +60,7 @@ require ( github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect + github.com/symfony-cli/dumper v1.0.2 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect diff --git a/go.sum b/go.sum index d8b01cae..1db0ab07 100644 --- a/go.sum +++ b/go.sum @@ -131,6 +131,8 @@ github.com/symfony-cli/cert v1.0.5 h1:U0H97eRf4bMhlD2WWB42fuapQ/wImqZVHP+PW2z5T1 github.com/symfony-cli/cert v1.0.5/go.mod h1:9axy74P/rAP0Jia6JFfqst26tn2h2U0JCJj288t8iuc= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= +github.com/symfony-cli/dumper v1.0.2 h1:f/jiaOoBhUucxD61SFQIC/ljON21y2ecYA9VFgTfSqs= +github.com/symfony-cli/dumper v1.0.2/go.mod h1:Pq9NvpawWbQNZa8t/dGPN0StnQ6XdOR9/nmHl2S3H/M= github.com/symfony-cli/phpstore v1.0.10 h1:KEgMYIhxHMex1zxt9Tzxpfy5zWXZ3207DWhJrIU6VGE= github.com/symfony-cli/phpstore v1.0.10/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.6 h1:DFjJULx0QZ8ojOahf/NnLkRtt0EaIkdVWRMHstFWtpE= diff --git a/local/platformsh/brand.go b/local/platformsh/brand.go index 936eec25..ac067c04 100644 --- a/local/platformsh/brand.go +++ b/local/platformsh/brand.go @@ -53,7 +53,17 @@ var PlatformshBrand = CloudBrand{ GitRemoteName: "platform", BinName: "platform", } -var NoBrand = CloudBrand{} + +// NoBrand is used when there is no explicit setting for the brand. +var NoBrand = CloudBrand{ + Name: "", + ProjectConfigPath: "", + CLIConfigPath: "", + CLIPrefix: "PLATFORMSH_CLI_", + CommandPrefix: "cloud:", + GitRemoteName: "", + BinName: "platform", +} func (b CloudBrand) String() string { return b.Name From c800622ba3fc6cb53fcf58e9af87265bb6390ed4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 9 Jan 2024 10:52:22 +0100 Subject: [PATCH 254/466] Fix services.yaml generation --- commands/init_templating.go | 2 +- commands/init_templating_php_test.go | 137 ++++++++++++++++++++++++ commands/init_templating_test.go | 152 +++++++++------------------ 3 files changed, 188 insertions(+), 103 deletions(-) create mode 100644 commands/init_templating_php_test.go diff --git a/commands/init_templating.go b/commands/init_templating.go index d9abb5e2..e2b1430b 100644 --- a/commands/init_templating.go +++ b/commands/init_templating.go @@ -291,7 +291,7 @@ func getTemplates(brand platformsh.CloudBrand, rootDirectory, chosenTemplateName type: {{ $service.Type }}{{ if $service.Version }}:{{ $service.Version }}{{ end }} {{- if index $.ServiceDiskSizes $service.Type }} disk: {{ index $.ServiceDiskSizes $service.Type }} -{{ end -}} +{{ end }} {{ end -}} ` diff --git a/commands/init_templating_php_test.go b/commands/init_templating_php_test.go new file mode 100644 index 00000000..52167cbc --- /dev/null +++ b/commands/init_templating_php_test.go @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +import ( + "path/filepath" + "testing" +) + +var validurlcases = []string{ + "http://symfony.com", + "https://symfony.com", + "https://symfony.com/blog", + "https://symfony.com/blog?foo=bar", + "https://foo:bar@symfony.com/blog?foo=bar", +} + +var invalidurlcases = []string{ + "symfony.com", + "/Users/tucksaun/Work/src/github.com/symfony-cli/symfony-cli/cloud/init-templates/00-flex.yaml", + "c:\\windows\test.yaml", +} + +func TestIsValidUrl(t *testing.T) { + for _, test := range validurlcases { + if !isValidURL(test) { + t.Errorf("isValidUrl(%q): got false, expected true", test) + } + } + for _, test := range invalidurlcases { + if isValidURL(test) { + t.Errorf("isValidUrl(%q): got true, expected false", test) + } + } +} + +var validfilecases = []string{ + "init_templating.go", +} + +var invalidfilecases = []string{ + "../cmd", + "foo.go", + "http://symfony.com", + "https://symfony.com", + "https://symfony.com/blog", + "https://symfony.com/blog?foo=bar", + "https://foo:bar@symfony.com/blog?foo=bar", +} + +func TestIsValidFilePath(t *testing.T) { + for _, test := range validfilecases { + if !isValidFilePath(test) { + t.Errorf("isValidFilePath(%q): got false, expected true", test) + } + } + for _, test := range invalidfilecases { + if isValidFilePath(test) { + t.Errorf("isValidFilePath(%q): got true, expected false", test) + } + } +} + +func TestHasComposerPackage(t *testing.T) { + for pkg, expected := range map[string]bool{ + "foo/bar": false, + "symfony/symfony": false, + } { + result := hasComposerPackage(filepath.Join("tests", "composer_packages", "none"), pkg) + + if result != expected { + t.Errorf("hasComposerPackage(none/%q): got %v, expected %v", pkg, result, expected) + } + } + + packages := map[string]bool{ + "foo/bar": false, + "symfony/flex": true, + "symfony/dotenv": true, + } + + for _, testCase := range []string{"lock", "json", "both"} { + for pkg, expected := range packages { + result := hasComposerPackage(filepath.Join("tests", "composer_packages", testCase), pkg) + + if result != expected { + t.Errorf("hasComposerPackage(%q/%q): got %v, expected %v", testCase, pkg, result, expected) + } + } + } +} + +func TestHasPHPExtension(t *testing.T) { + for pkg, expected := range map[string]bool{ + "iconv": false, + "pdo": false, + } { + result := hasPHPExtension(filepath.Join("tests", "composer_packages", "none"), pkg) + + if result != expected { + t.Errorf("hasPHPExtension(none/%q): got %v, expected %v", pkg, result, expected) + } + } + + exts := map[string]bool{ + "pdo": false, + "iconv": true, + "ext-iconv": true, + } + + for _, testCase := range []string{"lock", "json", "both"} { + for ext, expected := range exts { + result := hasPHPExtension(filepath.Join("tests", "composer_packages", testCase), ext) + + if result != expected { + t.Errorf("hasPHPExtension(%q/%q): got %v, expected %v", testCase, ext, result, expected) + } + } + } +} diff --git a/commands/init_templating_test.go b/commands/init_templating_test.go index 52167cbc..e3548c05 100644 --- a/commands/init_templating_test.go +++ b/commands/init_templating_test.go @@ -20,118 +20,66 @@ package commands import ( + "bytes" + "fmt" + "os" "path/filepath" + "strings" "testing" -) - -var validurlcases = []string{ - "http://symfony.com", - "https://symfony.com", - "https://symfony.com/blog", - "https://symfony.com/blog?foo=bar", - "https://foo:bar@symfony.com/blog?foo=bar", -} - -var invalidurlcases = []string{ - "symfony.com", - "/Users/tucksaun/Work/src/github.com/symfony-cli/symfony-cli/cloud/init-templates/00-flex.yaml", - "c:\\windows\test.yaml", -} - -func TestIsValidUrl(t *testing.T) { - for _, test := range validurlcases { - if !isValidURL(test) { - t.Errorf("isValidUrl(%q): got false, expected true", test) - } - } - for _, test := range invalidurlcases { - if isValidURL(test) { - t.Errorf("isValidUrl(%q): got true, expected false", test) - } - } -} - -var validfilecases = []string{ - "init_templating.go", -} - -var invalidfilecases = []string{ - "../cmd", - "foo.go", - "http://symfony.com", - "https://symfony.com", - "https://symfony.com/blog", - "https://symfony.com/blog?foo=bar", - "https://foo:bar@symfony.com/blog?foo=bar", -} -func TestIsValidFilePath(t *testing.T) { - for _, test := range validfilecases { - if !isValidFilePath(test) { - t.Errorf("isValidFilePath(%q): got false, expected true", test) - } - } - for _, test := range invalidfilecases { - if isValidFilePath(test) { - t.Errorf("isValidFilePath(%q): got true, expected false", test) - } - } -} - -func TestHasComposerPackage(t *testing.T) { - for pkg, expected := range map[string]bool{ - "foo/bar": false, - "symfony/symfony": false, - } { - result := hasComposerPackage(filepath.Join("tests", "composer_packages", "none"), pkg) + "github.com/symfony-cli/symfony-cli/local/platformsh" +) - if result != expected { - t.Errorf("hasComposerPackage(none/%q): got %v, expected %v", pkg, result, expected) - } +func TestCreateRequiredFilesProject(t *testing.T) { + projectDir, err := os.MkdirTemp("", "clitest") + if err != nil { + panic(err) } - - packages := map[string]bool{ - "foo/bar": false, - "symfony/flex": true, - "symfony/dotenv": true, + slug := "slug" + services := []*CloudService{ + { + Name: "foo", + Type: "bar", + Version: "baz", + }, + { + Name: "foo1", + Type: "bar1", + Version: "baz1", + }, + { + Name: "foo2", + Type: "postgresql", + Version: "baz2", + }, } - for _, testCase := range []string{"lock", "json", "both"} { - for pkg, expected := range packages { - result := hasComposerPackage(filepath.Join("tests", "composer_packages", testCase), pkg) - - if result != expected { - t.Errorf("hasComposerPackage(%q/%q): got %v, expected %v", testCase, pkg, result, expected) - } - } + createdFiles, err := createRequiredFilesProject(platformsh.PlatformshBrand, projectDir, slug, "", "8.0", services, false, true) + if err != nil { + panic(err) } -} - -func TestHasPHPExtension(t *testing.T) { - for pkg, expected := range map[string]bool{ - "iconv": false, - "pdo": false, - } { - result := hasPHPExtension(filepath.Join("tests", "composer_packages", "none"), pkg) - if result != expected { - t.Errorf("hasPHPExtension(none/%q): got %v, expected %v", pkg, result, expected) - } - } + fmt.Printf("%v", createdFiles) - exts := map[string]bool{ - "pdo": false, - "iconv": true, - "ext-iconv": true, + path := filepath.Join(projectDir, ".platform", "services.yaml") + result, err := os.ReadFile(path) + if err != nil { + panic(err) } - - for _, testCase := range []string{"lock", "json", "both"} { - for ext, expected := range exts { - result := hasPHPExtension(filepath.Join("tests", "composer_packages", testCase), ext) - - if result != expected { - t.Errorf("hasPHPExtension(%q/%q): got %v, expected %v", testCase, ext, result, expected) - } - } + expected := ` +foo: + type: bar:baz + +foo1: + type: bar1:baz1 + +foo2: + type: postgresql:baz2 + disk: 1024 +` + result = bytes.TrimSpace(result) + expected = strings.TrimSpace(expected) + if string(result) != expected { + t.Errorf("services.yaml: got %v, expected %v", string(result), expected) } } From 782a27fd9ab25a81fb5559e13411b1eca9f839dc Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 9 Jan 2024 12:20:38 +0100 Subject: [PATCH 255/466] Add more tests --- commands/init_templating_test.go | 62 ++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 10 deletions(-) diff --git a/commands/init_templating_test.go b/commands/init_templating_test.go index e3548c05..d392c7ee 100644 --- a/commands/init_templating_test.go +++ b/commands/init_templating_test.go @@ -21,7 +21,6 @@ package commands import ( "bytes" - "fmt" "os" "path/filepath" "strings" @@ -31,10 +30,7 @@ import ( ) func TestCreateRequiredFilesProject(t *testing.T) { - projectDir, err := os.MkdirTemp("", "clitest") - if err != nil { - panic(err) - } + projectDir := "./testdata/project" slug := "slug" services := []*CloudService{ { @@ -54,13 +50,10 @@ func TestCreateRequiredFilesProject(t *testing.T) { }, } - createdFiles, err := createRequiredFilesProject(platformsh.PlatformshBrand, projectDir, slug, "", "8.0", services, false, true) - if err != nil { + if _, err := createRequiredFilesProject(platformsh.PlatformshBrand, projectDir, slug, "", "8.0", services, false, true); err != nil { panic(err) } - fmt.Printf("%v", createdFiles) - path := filepath.Join(projectDir, ".platform", "services.yaml") result, err := os.ReadFile(path) if err != nil { @@ -80,6 +73,55 @@ foo2: result = bytes.TrimSpace(result) expected = strings.TrimSpace(expected) if string(result) != expected { - t.Errorf("services.yaml: got %v, expected %v", string(result), expected) + t.Errorf("platform/services.yaml: got %v, expected %v", string(result), expected) + } +} + +func TestCreateRequiredFilesProjectForUpsun(t *testing.T) { + projectDir := "./testdata/project" + slug := "slug" + services := []*CloudService{ + { + Name: "foo", + Type: "bar", + Version: "baz", + }, + { + Name: "foo1", + Type: "bar1", + Version: "baz1", + }, + { + Name: "foo2", + Type: "postgresql", + Version: "baz2", + }, + } + + if _, err := createRequiredFilesProject(platformsh.UpsunBrand, projectDir, slug, "", "8.0", services, false, true); err != nil { + panic(err) + } + + path := filepath.Join(projectDir, ".upsun", "config.yaml") + result, err := os.ReadFile(path) + if err != nil { + panic(err) + } + expected := ` +services: + foo: + type: bar:baz + + foo1: + type: bar1:baz1 + + foo2: + type: postgresql:baz2 + disk: 1024 +` + result = bytes.TrimSpace(result) + expected = strings.TrimSpace(expected) + if strings.Contains(string(result), expected) { + t.Errorf("upsun/config.yaml: got %v, expected %v", string(result), expected) } } From c4e4083d4fb7368572aab86e6ccc7a21114f3309 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 9 Jan 2024 12:25:04 +0100 Subject: [PATCH 256/466] Make an error message more explicit --- commands/cloud_env_debug.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/cloud_env_debug.go b/commands/cloud_env_debug.go index b0f1f118..ac2a1eb2 100644 --- a/commands/cloud_env_debug.go +++ b/commands/cloud_env_debug.go @@ -92,21 +92,21 @@ var cloudEnvDebugCmd = &console.Command{ terminal.Println("Setting APP_ENV and APP_DEBUG to dev/debug (can take some time, --debug to tail commands)") if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, prefix+"var:create", "--name=env:APP_ENV", "--value=dev"), c.Bool("debug"), nil); !ok { if !strings.Contains(out.String(), "already exists on the environment") { - return errors.New("An error occurred while adding APP_ENV") + return errors.New("An error occurred while adding APP_ENV: it already exists on the environment") } if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, prefix+"var:update", "--value=dev", "env:APP_ENV"), c.Bool("debug"), nil); !ok { if !strings.Contains(out.String(), "No changes were provided") { - return errors.New("An error occurred while adding APP_ENV") + return errors.New("An error occurred while adding APP_ENV: no changes provided") } } } if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, prefix+"var:create", "--name=env:APP_DEBUG", "--value=1"), c.Bool("debug"), nil); !ok { if !strings.Contains(out.String(), "already exists on the environment") { - return errors.New("An error occurred while adding APP_DEBUG") + return errors.New("An error occurred while adding APP_DEBUG: it already exists on the environment") } if out, ok := psh.RunInteractive(terminal.Logger, "", append(defaultArgs, prefix+"var:update", "--value=1", "env:APP_DEBUG"), c.Bool("debug"), nil); !ok { if !strings.Contains(out.String(), "No changes were provided") { - return errors.New("An error occurred while adding APP_DEBUG") + return errors.New("An error occurred while adding APP_DEBUG: no changes provided") } } } From 038895ca2bbbe95386423e91341bf326259c30bd Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 9 Jan 2024 12:26:00 +0100 Subject: [PATCH 257/466] Fix tests --- commands/testdata/project/.platform.app.yaml | 65 ++++++++++ .../testdata/project/.platform/routes.yaml | 2 + .../testdata/project/.platform/services.yaml | 12 ++ commands/testdata/project/.upsun/config.yaml | 82 ++++++++++++ commands/testdata/project/composer.json | 0 commands/testdata/project/composer.lock | 120 ++++++++++++++++++ commands/testdata/project/php.ini | 8 ++ 7 files changed, 289 insertions(+) create mode 100644 commands/testdata/project/.platform.app.yaml create mode 100644 commands/testdata/project/.platform/routes.yaml create mode 100644 commands/testdata/project/.platform/services.yaml create mode 100644 commands/testdata/project/.upsun/config.yaml create mode 100644 commands/testdata/project/composer.json create mode 100644 commands/testdata/project/composer.lock create mode 100644 commands/testdata/project/php.ini diff --git a/commands/testdata/project/.platform.app.yaml b/commands/testdata/project/.platform.app.yaml new file mode 100644 index 00000000..67698ab3 --- /dev/null +++ b/commands/testdata/project/.platform.app.yaml @@ -0,0 +1,65 @@ +name: slug + +type: php:8.0 + +dependencies: + php: + composer/composer: "^2" + +runtime: + extensions: + - apcu + - blackfire + - ctype + - iconv + - mbstring + - pdo_pgsql + - sodium + - xsl + + +variables: + php: + opcache.preload: config/preload.php +build: + flavor: none + +disk: 1024 + +web: + locations: + "/": + root: "public" + expires: 1h + passthru: "/index.php" + +mounts: + "/var": { source: local, source_path: var } + + +relationships: + foo: "foo:bar" + foo1: "foo1:bar1" + foo2: "foo2:postgresql" + +hooks: + build: | + set -x -e + + curl -fs https://get.symfony.com/cloud/configurator | bash + + NODE_VERSION=18 symfony-build + + deploy: | + set -x -e + + symfony-deploy + +crons: + security-check: + # Check that no security issues have been found for PHP packages deployed in production + # See https://github.com/fabpot/local-php-security-checker + spec: '50 23 * * *' + cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape php-security-checker; fi + + diff --git a/commands/testdata/project/.platform/routes.yaml b/commands/testdata/project/.platform/routes.yaml new file mode 100644 index 00000000..3c9483b6 --- /dev/null +++ b/commands/testdata/project/.platform/routes.yaml @@ -0,0 +1,2 @@ +"https://{all}/": { type: upstream, upstream: "slug:http" } +"http://{all}/": { type: redirect, to: "https://{all}/" } diff --git a/commands/testdata/project/.platform/services.yaml b/commands/testdata/project/.platform/services.yaml new file mode 100644 index 00000000..b2ba9ff3 --- /dev/null +++ b/commands/testdata/project/.platform/services.yaml @@ -0,0 +1,12 @@ + +foo: + type: bar:baz + +foo1: + type: bar1:baz1 + +foo2: + type: postgresql:baz2 + disk: 1024 + + diff --git a/commands/testdata/project/.upsun/config.yaml b/commands/testdata/project/.upsun/config.yaml new file mode 100644 index 00000000..b88a2e09 --- /dev/null +++ b/commands/testdata/project/.upsun/config.yaml @@ -0,0 +1,82 @@ +routes: + "https://{all}/": { type: upstream, upstream: "slug:http" } + "http://{all}/": { type: redirect, to: "https://{all}/" } + +services: + foo: + type: bar:baz + + foo1: + type: bar1:baz1 + + foo2: + type: postgresql:baz2 + + + +applications: + slug: + source: + root: "/" + + type: php:8.0 + + dependencies: + php: + composer/composer: "^2" + + runtime: + extensions: + - apcu + - blackfire + - ctype + - iconv + - mbstring + - pdo_pgsql + - sodium + - xsl + + + variables: + php: + opcache.preload: config/preload.php + build: + flavor: none + + web: + locations: + "/": + root: "public" + expires: 1h + passthru: "/index.php" + + mounts: + "/var": { source: storage, source_path: var } + + + relationships: + foo: "foo:bar" + foo1: "foo1:bar1" + foo2: "foo2:postgresql" + + hooks: + build: | + set -x -e + + curl -fs https://get.symfony.com/cloud/configurator | bash + + NODE_VERSION=18 symfony-build + + deploy: | + set -x -e + + symfony-deploy + + crons: + security-check: + # Check that no security issues have been found for PHP packages deployed in production + # See https://github.com/fabpot/local-php-security-checker + spec: '50 23 * * *' + cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape php-security-checker; fi + + diff --git a/commands/testdata/project/composer.json b/commands/testdata/project/composer.json new file mode 100644 index 00000000..e69de29b diff --git a/commands/testdata/project/composer.lock b/commands/testdata/project/composer.lock new file mode 100644 index 00000000..495cd0d3 --- /dev/null +++ b/commands/testdata/project/composer.lock @@ -0,0 +1,120 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "f369468988f7ddaabf0a8c690d4307df", + "packages": [ + { + "name": "symfony/flex", + "version": "v2.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/flex.git", + "reference": "6b44ac75c7f07f48159ec36c2d21ef8cf48a21b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/flex/zipball/6b44ac75c7f07f48159ec36c2d21ef8cf48a21b1", + "reference": "6b44ac75c7f07f48159ec36c2d21ef8cf48a21b1", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.1", + "php": ">=8.0" + }, + "require-dev": { + "composer/composer": "^2.1", + "symfony/dotenv": "^5.4|^6.0", + "symfony/filesystem": "^5.4|^6.0", + "symfony/phpunit-bridge": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Symfony\\Flex\\Flex" + }, + "autoload": { + "psr-4": { + "Symfony\\Flex\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "Composer plugin for Symfony", + "support": { + "issues": "https://github.com/symfony/flex/issues", + "source": "https://github.com/symfony/flex/tree/v2.4.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-02T11:08:32+00:00" + }, + { + "name": "symfonycorp/platformsh-meta", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfonycorp/platformsh-meta.git", + "reference": "3e8559c75ed759921015cc7ebf5952c306afcaf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfonycorp/platformsh-meta/zipball/3e8559c75ed759921015cc7ebf5952c306afcaf8", + "reference": "3e8559c75ed759921015cc7ebf5952c306afcaf8", + "shasum": "" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A meta package for platformsh projects", + "support": { + "issues": "https://github.com/symfonycorp/platformsh-meta/issues", + "source": "https://github.com/symfonycorp/platformsh-meta/tree/v1.0.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/symfonycorp/connect", + "type": "tidelift" + } + ], + "time": "2021-10-20T16:38:02+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": ">=8.2", + "ext-ctype": "*", + "ext-iconv": "*" + }, + "platform-dev": [], + "plugin-api-version": "2.6.0" +} diff --git a/commands/testdata/project/php.ini b/commands/testdata/project/php.ini new file mode 100644 index 00000000..9b0ba5e0 --- /dev/null +++ b/commands/testdata/project/php.ini @@ -0,0 +1,8 @@ +allow_url_include=off +assert.active=off +display_errors=off +display_startup_errors=off +max_execution_time=30 +session.use_strict_mode=On +realpath_cache_ttl=3600 +zend.detect_unicode=Off From acb75cea7998bdeb19a4af214e43798e38af2333 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 9 Jan 2024 17:24:27 +0100 Subject: [PATCH 258/466] Remove unneeded dep --- go.mod | 1 - go.sum | 2 -- 2 files changed, 3 deletions(-) diff --git a/go.mod b/go.mod index 60057e7d..0555e3bf 100644 --- a/go.mod +++ b/go.mod @@ -60,7 +60,6 @@ require ( github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/symfony-cli/dumper v1.0.2 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect diff --git a/go.sum b/go.sum index 1db0ab07..d8b01cae 100644 --- a/go.sum +++ b/go.sum @@ -131,8 +131,6 @@ github.com/symfony-cli/cert v1.0.5 h1:U0H97eRf4bMhlD2WWB42fuapQ/wImqZVHP+PW2z5T1 github.com/symfony-cli/cert v1.0.5/go.mod h1:9axy74P/rAP0Jia6JFfqst26tn2h2U0JCJj288t8iuc= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= -github.com/symfony-cli/dumper v1.0.2 h1:f/jiaOoBhUucxD61SFQIC/ljON21y2ecYA9VFgTfSqs= -github.com/symfony-cli/dumper v1.0.2/go.mod h1:Pq9NvpawWbQNZa8t/dGPN0StnQ6XdOR9/nmHl2S3H/M= github.com/symfony-cli/phpstore v1.0.10 h1:KEgMYIhxHMex1zxt9Tzxpfy5zWXZ3207DWhJrIU6VGE= github.com/symfony-cli/phpstore v1.0.10/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.6 h1:DFjJULx0QZ8ojOahf/NnLkRtt0EaIkdVWRMHstFWtpE= From 2058b9452305dd0bb1eeec4073bd60013093b8d3 Mon Sep 17 00:00:00 2001 From: Sarim Khan Date: Tue, 9 Jan 2024 23:06:44 +0600 Subject: [PATCH 259/466] Set SysProcAttr Foreground only when terminal is Interactive --- local/runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/runner.go b/local/runner.go index 5e9a3135..c6800ff3 100644 --- a/local/runner.go +++ b/local/runner.go @@ -277,7 +277,7 @@ func (r *Runner) buildCmd() (*exec.Cmd, error) { cmd.Env = os.Environ() cmd.Dir = r.pidFile.Dir - if err := buildCmd(cmd, r.mode == RunnerModeOnce); err != nil { + if err := buildCmd(cmd, r.mode == RunnerModeOnce && terminal.Stdin.IsInteractive()); err != nil { return nil, err } From d29ad009e3fc533e57dab1276c338106f9f2bea9 Mon Sep 17 00:00:00 2001 From: KitCat Date: Thu, 18 Jan 2024 03:47:32 +0200 Subject: [PATCH 260/466] Replace hardcoded temp directory path $TMPDIR instead of /tmp --- installer/bash-installer | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/installer/bash-installer b/installer/bash-installer index 8b96937f..03763155 100755 --- a/installer/bash-installer +++ b/installer/bash-installer @@ -166,10 +166,10 @@ latest_url=${CLI_DOWNLOAD_URL_PATTERN/~platform~/${platform}} output " Downloading ${latest_url}..."; case $downloader in "curl") - curl --fail --location "${latest_url}" > "/tmp/${CLI_TMP_NAME}.tar.gz" + curl --fail --location "${latest_url}" > "${TMPDIR}/${CLI_TMP_NAME}.tar.gz" ;; "wget") - wget -q --show-progress "${latest_url}" -O "/tmp/${CLI_TMP_NAME}.tar.gz" + wget -q --show-progress "${latest_url}" -O "${TMPDIR}/${CLI_TMP_NAME}.tar.gz" ;; esac @@ -180,8 +180,8 @@ if [ $? != 0 ]; then fi output " Uncompress binary..." -tar -xz --directory "/tmp" -f "/tmp/${CLI_TMP_NAME}.tar.gz" -rm "/tmp/${CLI_TMP_NAME}.tar.gz" +tar -xz --directory "${TMPDIR}" -f "${TMPDIR}/${CLI_TMP_NAME}.tar.gz" +rm "${TMPDIR}/${CLI_TMP_NAME}.tar.gz" if [ ! -d "${binary_dest}" ]; then if ! mkdir -p "${binary_dest}"; then @@ -195,11 +195,11 @@ else output " Installing the binary into your home directory..." fi -if mv "/tmp/${CLI_EXECUTABLE}" "${binary_dest}/${CLI_EXECUTABLE}"; then +if mv "${TMPDIR}/${CLI_EXECUTABLE}" "${binary_dest}/${CLI_EXECUTABLE}"; then output " The binary was saved to: ${binary_dest}/${CLI_EXECUTABLE}" else output " Failed to move the binary to ${binary_dest}." "error" - rm "/tmp/${CLI_EXECUTABLE}" + rm "${TMPDIR}/${CLI_EXECUTABLE}" exit 1 fi From b633fe4fdd74063e1f6b7f53248384f05b2432e9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 18 Jan 2024 07:21:15 +0100 Subject: [PATCH 261/466] Revert "Merge pull request #406 from Nihilus118/issue#402" This reverts commit 6a10856e7561e9ac2fac71759d5acd726611a482, reversing changes made to 041d0074cfd2134840943aa623d7ee57bf65ed2b. --- local/pid/pidfile_other.go | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/local/pid/pidfile_other.go b/local/pid/pidfile_other.go index ef3ba3a1..01b73db0 100644 --- a/local/pid/pidfile_other.go +++ b/local/pid/pidfile_other.go @@ -22,40 +22,12 @@ package pid -import ( - "errors" - "syscall" - "time" -) +import "syscall" func kill(pid int) error { pgid, err := syscall.Getpgid(pid) if err != nil { return err } - - // Send SIGTERM to the process group - err = syscall.Kill(-pgid, syscall.SIGINT) - if err != nil { - return err - } - - // Wait for the process group to exit gracefully with a timeout of 5 seconds - done := make(chan error, 1) - go func() { - _, err := syscall.Wait4(-pgid, nil, 0, nil) - done <- err - }() - - select { - case err := <-done: - if err != nil { - return err - } - case <-time.After(5 * time.Second): - return errors.New("timeout waiting for process group to exit gracefully") - } - - // Send SIGKILL to the process group - return syscall.Kill(-pgid, syscall.SIGKILL) + return syscall.Kill(-pgid, syscall.SIGTERM) } From 319a57bd5a15faf1582528270e782909b31fbc43 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 18 Jan 2024 09:53:38 +0100 Subject: [PATCH 262/466] Tweak comment --- envs/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envs/docker.go b/envs/docker.go index 05128818..91166436 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -199,7 +199,7 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ for _, p := range exposedPorts { rels := make(map[string]map[string]interface{}) if p.PrivatePort == 1025 { - // recommended image: schickling/mailcatcher + // recommended image: sj26/mailcatcher or axllent/mailpit (default now) for _, pw := range exposedPorts { if pw.PrivatePort == 1080 || pw.PrivatePort == 8025 { rels["-web"] = map[string]interface{}{ From 3255c1a24edda2dc24bc2db5f5fbe9bc58631cb0 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 19 Jan 2024 11:56:21 +0100 Subject: [PATCH 263/466] Revert "Merge pull request #410 from sarim/main" This reverts commit e4dd0651f978e258436e35fab04724de0beff939, reversing changes made to acb75cea7998bdeb19a4af214e43798e38af2333. --- local/runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/runner.go b/local/runner.go index c6800ff3..5e9a3135 100644 --- a/local/runner.go +++ b/local/runner.go @@ -277,7 +277,7 @@ func (r *Runner) buildCmd() (*exec.Cmd, error) { cmd.Env = os.Environ() cmd.Dir = r.pidFile.Dir - if err := buildCmd(cmd, r.mode == RunnerModeOnce && terminal.Stdin.IsInteractive()); err != nil { + if err := buildCmd(cmd, r.mode == RunnerModeOnce); err != nil { return nil, err } From ebd43a8a3cf798a9c13f85640cb7df476ef2746b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 19 Jan 2024 11:56:50 +0100 Subject: [PATCH 264/466] Revert "Merge pull request #405 from sarim/main" This reverts commit e6e203f378f8e5cff425613cee3064a315f6e4dc, reversing changes made to 6a10856e7561e9ac2fac71759d5acd726611a482. --- local/runner.go | 2 +- local/runner_posix.go | 5 ++--- local/runner_windows.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/local/runner.go b/local/runner.go index 5e9a3135..b67ee30c 100644 --- a/local/runner.go +++ b/local/runner.go @@ -277,7 +277,7 @@ func (r *Runner) buildCmd() (*exec.Cmd, error) { cmd.Env = os.Environ() cmd.Dir = r.pidFile.Dir - if err := buildCmd(cmd, r.mode == RunnerModeOnce); err != nil { + if err := buildCmd(cmd); err != nil { return nil, err } diff --git a/local/runner_posix.go b/local/runner_posix.go index 71cb7abf..a19321c2 100644 --- a/local/runner_posix.go +++ b/local/runner_posix.go @@ -8,12 +8,11 @@ import ( "syscall" ) -func buildCmd(cmd *exec.Cmd, foreground bool) error { +func buildCmd(cmd *exec.Cmd) error { cmd.SysProcAttr = &syscall.SysProcAttr{ // isolate each command in a new process group that we can cleanly send // signal to when we want to stop it - Setpgid: true, - Foreground: foreground, + Setpgid: true, } return nil diff --git a/local/runner_windows.go b/local/runner_windows.go index 4b0ec0b9..46fe4438 100644 --- a/local/runner_windows.go +++ b/local/runner_windows.go @@ -2,6 +2,6 @@ package local import "os/exec" -func buildCmd(*exec.Cmd, bool) error { +func buildCmd(*exec.Cmd) error { return nil } From 7fae70e459c97841d29786bdba66b4317af93d18 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 19 Jan 2024 12:04:41 +0100 Subject: [PATCH 265/466] Fix test data --- commands/testdata/project/php.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/commands/testdata/project/php.ini b/commands/testdata/project/php.ini index 9b0ba5e0..6efbd07c 100644 --- a/commands/testdata/project/php.ini +++ b/commands/testdata/project/php.ini @@ -1,5 +1,4 @@ allow_url_include=off -assert.active=off display_errors=off display_startup_errors=off max_execution_time=30 From 9c22d79476d30d9805fa13764b78e248a206ea05 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:10:06 +0000 Subject: [PATCH 266/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 90 +++++++----------------------------- 1 file changed, 16 insertions(+), 74 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index d8136672..d379e01a 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -471,7 +471,7 @@ var Commands = []*console.Command{ {Name: "blue-green:conclude", Hidden: true}, {Name: "upsun:blue-green:conclude", Hidden: true}, }, - Usage: " ALPHA Conclude a blue/green deployment", + Usage: "ALPHA Conclude a blue/green deployment", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -485,7 +485,7 @@ var Commands = []*console.Command{ {Name: "blue-green:deploy", Hidden: true}, {Name: "upsun:blue-green:deploy", Hidden: true}, }, - Usage: " ALPHA Perform a blue/green deployment", + Usage: "ALPHA Perform a blue/green deployment", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -500,7 +500,7 @@ var Commands = []*console.Command{ {Name: "blue-green:enable", Hidden: true}, {Name: "upsun:blue-green:enable", Hidden: true}, }, - Usage: " ALPHA Enable blue/green deployments", + Usage: "ALPHA Enable blue/green deployments", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -636,7 +636,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "exclude-table",}, &console.StringFlag{Name: "file", Aliases: []string{"f"},}, &console.BoolFlag{Name: "gzip", Aliases: []string{"z"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, &console.StringFlag{Name: "schema",}, @@ -646,27 +645,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "timestamp", Aliases: []string{"t"},}, }, }, - { - Category: "cloud:db", - Name: "size", - Aliases: []*console.Alias{ - {Name: "db:size", Hidden: true}, - {Name: "upsun:db:size", Hidden: true}, - }, - Usage: "Estimate the disk usage of a database", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, - &console.BoolFlag{Name: "cleanup", Aliases: []string{"C"},}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, - }, - }, { Category: "cloud:db", Name: "sql", @@ -681,7 +659,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "raw",}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -806,6 +783,7 @@ var Commands = []*console.Command{ Usage: "Branch an environment", Flags: []console.Flag{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.BoolFlag{Name: "no-checkout",}, &console.BoolFlag{Name: "no-clone-parent",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -825,9 +803,6 @@ var Commands = []*console.Command{ {Name: "checkout", Hidden: true}, }, Usage: "Check out an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - }, }, { Category: "cloud:environment", @@ -1033,7 +1008,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, &console.BoolFlag{Name: "force-with-lease",}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.BoolFlag{Name: "no-clone-parent",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "parent",}, @@ -1079,7 +1053,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, &console.BoolFlag{Name: "refresh",}, @@ -1114,7 +1087,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "recursive", Aliases: []string{"r"},}, @@ -1146,8 +1118,8 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "all",}, &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, + &console.StringFlag{Name: "option", Aliases: []string{"o"},}, &console.BoolFlag{Name: "pipe",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "worker",}, @@ -1205,7 +1177,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "port",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, @@ -1461,7 +1432,7 @@ var Commands = []*console.Command{ {Name: "upsun:met", Hidden: true}, {Name: "met", Hidden: true}, }, - Usage: " BETA Show CPU, disk and memory metrics for an environment", + Usage: "Show CPU, disk and memory metrics for an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1488,7 +1459,7 @@ var Commands = []*console.Command{ {Name: "upsun:cpu", Hidden: true}, {Name: "cpu", Hidden: true}, }, - Usage: " BETA Show CPU usage of an environment", + Usage: "Show CPU usage of an environment", Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, @@ -1568,7 +1539,7 @@ var Commands = []*console.Command{ {Name: "upsun:memory", Hidden: true}, {Name: "memory", Hidden: true}, }, - Usage: " BETA Show memory usage of an environment", + Usage: "Show memory usage of an environment", Flags: []console.Flag{ &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1599,7 +1570,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "delete",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude",}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "include",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "mount", Aliases: []string{"m"},}, @@ -1634,28 +1604,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "worker",}, }, }, - { - Category: "cloud:mount", - Name: "size", - Aliases: []*console.Alias{ - {Name: "mount:size", Hidden: true}, - {Name: "upsun:mount:size", Hidden: true}, - }, - Usage: "Check the disk usage of mounts", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, - &console.StringFlag{Name: "worker",}, - }, - }, { Category: "cloud:mount", Name: "upload", @@ -1669,7 +1617,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "delete",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude",}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "include",}, &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, &console.StringFlag{Name: "mount", Aliases: []string{"m"},}, @@ -1689,7 +1636,7 @@ var Commands = []*console.Command{ {Name: "upsun:ops", Hidden: true}, {Name: "ops", Hidden: true}, }, - Usage: " BETA List runtime operations on an environment", + Usage: "List runtime operations on an environment", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, @@ -1708,7 +1655,7 @@ var Commands = []*console.Command{ {Name: "operation:run", Hidden: true}, {Name: "upsun:operation:run", Hidden: true}, }, - Usage: " BETA Run an operation on the environment", + Usage: "Run an operation on the environment", Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, @@ -1920,12 +1867,15 @@ var Commands = []*console.Command{ }, Usage: "List organization users", Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.BoolFlag{Name: "reverse",}, + &console.StringFlag{Name: "sort", DefaultValue: "created_at",}, }, }, { @@ -2050,7 +2000,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "build",}, &console.StringFlag{Name: "depth",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2320,7 +2269,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gzip", Aliases: []string{"z"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, &console.BoolFlag{Name: "stdout", Aliases: []string{"o"},}, @@ -2342,7 +2290,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "fields", Aliases: []string{"f"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.BoolFlag{Name: "jsonArray",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -2364,7 +2311,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -2384,7 +2330,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "eval",}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -2403,7 +2348,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, }, @@ -2415,7 +2359,7 @@ var Commands = []*console.Command{ {Name: "session:switch", Hidden: true}, {Name: "upsun:session:switch", Hidden: true}, }, - Usage: " BETA Switch between sessions", + Usage: "BETA Switch between sessions", Hidden: console.Hide, }, { @@ -2602,7 +2546,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, @@ -2618,7 +2561,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "app", Aliases: []string{"A"},}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, &console.StringFlag{Name: "port",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, @@ -2826,7 +2768,7 @@ var Commands = []*console.Command{ {Name: "upsun:versions", Hidden: true}, {Name: "versions", Hidden: true}, }, - Usage: " ALPHA List environment versions", + Usage: "ALPHA List environment versions", Hidden: console.Hide, Flags: []console.Flag{ &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, From 40ab6f828d399d08e1874ee361139101e23a1481 Mon Sep 17 00:00:00 2001 From: Arthur Bols Date: Fri, 19 Jan 2024 16:04:26 +0100 Subject: [PATCH 267/466] Replace unmaintained `github.com/hpcloud/tail` Replaces the unmaintained `github.com/hpcloud/tail` with the active fork `github.com/nxadm/tail` --- go.mod | 3 +-- go.sum | 8 ++++---- local/logs/tailer.go | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 0555e3bf..7e4f16bf 100644 --- a/go.mod +++ b/go.mod @@ -10,9 +10,9 @@ require ( github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru/arc/v2 v2.0.7 - github.com/hpcloud/tail v1.0.0 github.com/joho/godotenv v1.5.1 github.com/mitchellh/go-homedir v1.1.0 + github.com/nxadm/tail v1.4.11 github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 github.com/rjeczalik/notify v0.9.3 @@ -71,7 +71,6 @@ require ( golang.org/x/term v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.16.1 // indirect - gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.1 // indirect diff --git a/go.sum b/go.sum index d8b01cae..aa6d4675 100644 --- a/go.sum +++ b/go.sum @@ -31,6 +31,7 @@ github.com/fabpot/local-php-security-checker/v2 v2.0.6 h1:m1znXkwzIPFkJWOnH8Fgt1 github.com/fabpot/local-php-security-checker/v2 v2.0.6/go.mod h1:bDff0jDpxt1pHsDtQ3v++cc/QuCM9K7Nq0dv65P1Ai8= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 h1:R2K7yLHPmwoTdmNuQ5Wfm0/evh/+QFdoI6EbW3OSMKw= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76/go.mod h1:jr1MMO0KsDD+PQ57K7oJGk97TLYtbhLUOjCS577Ddm4= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -48,8 +49,6 @@ github.com/hashicorp/golang-lru/arc/v2 v2.0.7 h1:QxkVTxwColcduO+LP7eJO56r2hFiG8z github.com/hashicorp/golang-lru/arc/v2 v2.0.7/go.mod h1:Pe7gBlGdc8clY5LJ0LpJXMt5AmgmWNH1g+oFFVUHOEc= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -86,6 +85,8 @@ github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -173,6 +174,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -200,8 +202,6 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -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= diff --git a/local/logs/tailer.go b/local/logs/tailer.go index 50c11413..56f226d6 100644 --- a/local/logs/tailer.go +++ b/local/logs/tailer.go @@ -28,7 +28,7 @@ import ( "strings" "sync" - "github.com/hpcloud/tail" + "github.com/nxadm/tail" "github.com/pkg/errors" realinotify "github.com/rjeczalik/notify" "github.com/stoicperlman/fls" From 1da35b49654a21d197253af8601d77fef9d8b6ee Mon Sep 17 00:00:00 2001 From: KitCat Date: Mon, 22 Jan 2024 01:08:02 +0200 Subject: [PATCH 268/466] The script variable with the system temp directory path and fallback to /tmp --- installer/bash-installer | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/installer/bash-installer b/installer/bash-installer index 03763155..fa69881e 100755 --- a/installer/bash-installer +++ b/installer/bash-installer @@ -23,6 +23,7 @@ CLI_EXECUTABLE="symfony" CLI_TMP_NAME="$CLI_EXECUTABLE-"$(date +"%s") CLI_NAME="Symfony CLI" CLI_DOWNLOAD_URL_PATTERN="https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_~platform~.tar.gz" +CLI_TMPDIR="${TMPDIR:-/tmp}" function output { style_start="" @@ -166,10 +167,10 @@ latest_url=${CLI_DOWNLOAD_URL_PATTERN/~platform~/${platform}} output " Downloading ${latest_url}..."; case $downloader in "curl") - curl --fail --location "${latest_url}" > "${TMPDIR}/${CLI_TMP_NAME}.tar.gz" + curl --fail --location "${latest_url}" > "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" ;; "wget") - wget -q --show-progress "${latest_url}" -O "${TMPDIR}/${CLI_TMP_NAME}.tar.gz" + wget -q --show-progress "${latest_url}" -O "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" ;; esac @@ -180,8 +181,8 @@ if [ $? != 0 ]; then fi output " Uncompress binary..." -tar -xz --directory "${TMPDIR}" -f "${TMPDIR}/${CLI_TMP_NAME}.tar.gz" -rm "${TMPDIR}/${CLI_TMP_NAME}.tar.gz" +tar -xz --directory "${CLI_TMPDIR}" -f "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" +rm "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" if [ ! -d "${binary_dest}" ]; then if ! mkdir -p "${binary_dest}"; then @@ -195,11 +196,11 @@ else output " Installing the binary into your home directory..." fi -if mv "${TMPDIR}/${CLI_EXECUTABLE}" "${binary_dest}/${CLI_EXECUTABLE}"; then +if mv "${CLI_TMPDIR}/${CLI_EXECUTABLE}" "${binary_dest}/${CLI_EXECUTABLE}"; then output " The binary was saved to: ${binary_dest}/${CLI_EXECUTABLE}" else output " Failed to move the binary to ${binary_dest}." "error" - rm "${TMPDIR}/${CLI_EXECUTABLE}" + rm "${CLI_TMPDIR}/${CLI_EXECUTABLE}" exit 1 fi From 5ed4c1e81c363e1db5da30b3b7d294c90809fcea Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 22 Jan 2024 14:24:05 +0100 Subject: [PATCH 269/466] Fix binary path --- local/platformsh/brand.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/brand.go b/local/platformsh/brand.go index ac067c04..0335a491 100644 --- a/local/platformsh/brand.go +++ b/local/platformsh/brand.go @@ -58,7 +58,7 @@ var PlatformshBrand = CloudBrand{ var NoBrand = CloudBrand{ Name: "", ProjectConfigPath: "", - CLIConfigPath: "", + CLIConfigPath: ".platformsh", CLIPrefix: "PLATFORMSH_CLI_", CommandPrefix: "cloud:", GitRemoteName: "", From cdaf57bb125d275394c4ffedea56708c096beb62 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 22 Jan 2024 14:26:25 +0100 Subject: [PATCH 270/466] Mark optional book reqs as OK --- book/reqs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/reqs.go b/book/reqs.go index 7cc8a9de..f3f119b8 100644 --- a/book/reqs.go +++ b/book/reqs.go @@ -112,7 +112,7 @@ func CheckRequirements() (bool, error) { ready = false terminal.Printfln(`[KO] PHP extension "%s" not found, please install it - %s`, ext, reason) } else { - terminal.Printfln(`[KO] PHP extension "%s" not found, %s`, ext, reason) + terminal.Printfln(`[OK] PHP extension "%s" not found, %s`, ext, reason) } } else { terminal.Printfln(`[OK] PHP extension "%s" installed - %s`, ext, reason) From 1c0b3c8c3fb6595a5e87d3176377f9add543d023 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 24 Jan 2024 11:27:33 +0100 Subject: [PATCH 271/466] Add support for database read replica on Platform.sh --- envs/envs.go | 3 -- envs/remote_test.go | 18 ++++++++ .../relationships_with_read_replica.json | 46 +++++++++++++++++++ 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 envs/testdata/dedicated/relationships_with_read_replica.json diff --git a/envs/envs.go b/envs/envs.go index 79e4ac6b..fdf5b91c 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -122,9 +122,6 @@ func extractRelationshipsEnvs(env Environment) Envs { prefix = strings.Replace(prefix, "-", "_", -1) if scheme == "pgsql" || scheme == "mysql" { - if !isMaster(endpoint) { - continue - } if scheme == "pgsql" { // works for both Doctrine and Go endpoint["scheme"] = "postgres" diff --git a/envs/remote_test.go b/envs/remote_test.go index 0ffafc78..627464c8 100644 --- a/envs/remote_test.go +++ b/envs/remote_test.go @@ -20,6 +20,7 @@ package envs import ( + "encoding/base64" "os" . "gopkg.in/check.v1" @@ -256,6 +257,7 @@ func (s *RemoteSuite) TestDefaultRoute(c *C) { func (s *RemoteSuite) TestRelationships(c *C) { r := &Remote{} + os.Setenv("PLATFORM_RELATIONSHIPS", "") c.Assert(extractRelationshipsEnvs(r), DeepEquals, Envs{}) os.Setenv("PLATFORM_RELATIONSHIPS", "eyJzZWN1cml0eS1zZXJ2ZXIiOiBbeyJpcCI6ICIxNjkuMjU0LjI2LjIzMSIsICJob3N0IjogInNlY3VyaXR5LXNlcnZlci5pbnRlcm5hbCIsICJzY2hlbWUiOiAiaHR0cCIsICJwb3J0IjogODAsICJyZWwiOiAiaHR0cCJ9XSwgImRhdGFiYXNlIjogW3sidXNlcm5hbWUiOiAibWFpbiIsICJzY2hlbWUiOiAicGdzcWwiLCAiaXAiOiAiMTY5LjI1NC4xMjAuNDgiLCAiaG9zdCI6ICJkYXRhYmFzZS5pbnRlcm5hbCIsICJyZWwiOiAicG9zdGdyZXNxbCIsICJwYXRoIjogIm1haW4iLCAicXVlcnkiOiB7ImlzX21hc3RlciI6IHRydWV9LCAicGFzc3dvcmQiOiAibWFpbiIsICJwb3J0IjogNTQzMn1dfQ==") @@ -403,3 +405,19 @@ func (s *RemoteSuite) TestRelationships(c *C) { "DATABASE_NAME": "main", }) } + +func (s *RemoteSuite) TestMySQLReadReplicaForDedicated(c *C) { + r := &Remote{} + value, err := os.ReadFile("testdata/dedicated/relationships_with_read_replica.json") + if err != nil { + panic(err) + } + if err := os.Setenv("PLATFORM_RELATIONSHIPS", base64.StdEncoding.EncodeToString(value)); err != nil { + panic(err) + } + + e := extractRelationshipsEnvs(r) + + c.Assert("mysql://mysql:xxx@dbread.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=10.6.0-MariaDB", DeepEquals, e["DBREAD_URL"]) + c.Assert("mysql://mysql:xxx@db.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=10.6.0-MariaDB", DeepEquals, e["DB_URL"]) +} diff --git a/envs/testdata/dedicated/relationships_with_read_replica.json b/envs/testdata/dedicated/relationships_with_read_replica.json new file mode 100644 index 00000000..36242d0e --- /dev/null +++ b/envs/testdata/dedicated/relationships_with_read_replica.json @@ -0,0 +1,46 @@ +{ + "db": [ + { + "username": "mysql", + "scheme": "mysql", + "service": "db", + "fragment": null, + "ip": "169.254.193.18", + "hostname": "x2.db.service.._.platform.sh", + "port": 3306, + "cluster": "zz-master-7rqtwti", + "host": "db.internal", + "rel": "mysql", + "path": "main", + "query": { + "is_master": true + }, + "password": "xxx", + "type": "mariadb:10.6", + "public": false, + "host_mapped": false + } + ], + "dbread": [ + { + "username": "mysql", + "scheme": "mysql", + "service": "db", + "fragment": null, + "ip": "169.254.150.110", + "hostname": "x2.db.service.._.platform.sh", + "port": 3306, + "cluster": "zz-master-7rqtwti", + "host": "dbread.internal", + "rel": "mysql-replica", + "path": "main", + "query": { + "is_master": false + }, + "password": "xxx", + "type": "mariadb:10.6", + "public": false, + "host_mapped": false + } + ] +} From d67aa4d8a05193ea125caebd81c9fa115a4298af Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 25 Jan 2024 16:10:42 +0000 Subject: [PATCH 272/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index d379e01a..32232009 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1821,7 +1821,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "permission",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1834,7 +1833,6 @@ var Commands = []*console.Command{ Usage: "Remove a user from an organization", Flags: []console.Flag{ &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1851,7 +1849,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "property", Aliases: []string{"P"},}, }, }, @@ -1873,7 +1870,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.BoolFlag{Name: "reverse",}, &console.StringFlag{Name: "sort", DefaultValue: "created_at",}, }, @@ -1896,9 +1892,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "list-all",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "reverse",}, - &console.BoolFlag{Name: "sort-granted",}, }, }, { @@ -1912,7 +1905,6 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "permission",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, { @@ -1944,7 +1936,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "no-set-remote",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "plan",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, &console.StringFlag{Name: "region",}, &console.BoolFlag{Name: "set-remote",}, &console.StringFlag{Name: "storage",}, From 5766fb411eaf7f25c66cf9af0180f1281cf98238 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Jan 2024 08:54:14 +0100 Subject: [PATCH 273/466] Add DB versions to Doctrine config when using Docker locally --- envs/envs.go | 14 +++++-- envs/envs_test.go | 94 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 3 deletions(-) diff --git a/envs/envs.go b/envs/envs.go index fdf5b91c..7c5018a5 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -22,6 +22,7 @@ package envs import ( "encoding/json" "fmt" + neturl "net/url" "os" "path/filepath" "strconv" @@ -156,11 +157,11 @@ func extractRelationshipsEnvs(env Environment) Envs { values[fmt.Sprintf("%sURL", prefix)] = values[fmt.Sprintf("%sURL", prefix)] + "&charset=" + charset } if detectedLanguage == "php" { + versionKey := fmt.Sprintf("%sVERSION", prefix) + // type is available when in the cloud or locally via a tunnel if v, ok := endpoint["type"]; ok { - versionKey := fmt.Sprintf("%sVERSION", prefix) if version, hasVersionInEnv := os.LookupEnv(versionKey); hasVersionInEnv { values[versionKey] = version - values[fmt.Sprintf("%sURL", prefix)] = values[fmt.Sprintf("%sURL", prefix)] + "&serverVersion=" + values[versionKey] } else if strings.Contains(v.(string), ":") { version := strings.SplitN(v.(string), ":", 2)[1] @@ -174,8 +175,15 @@ func extractRelationshipsEnvs(env Environment) Envs { } values[versionKey] = version - values[fmt.Sprintf("%sURL", prefix)] = values[fmt.Sprintf("%sURL", prefix)] + "&serverVersion=" + values[versionKey] } + } else if env.Local() { + // Docker support + if v, ok := endpoint["version"]; ok { + values[versionKey] = v.(string) + } + } + if v, ok := values[versionKey]; ok && v != "" { + values[fmt.Sprintf("%sURL", prefix)] += "&serverVersion=" + neturl.QueryEscape(v) } } values[fmt.Sprintf("%sSERVER", prefix)] = formatServer(endpoint) diff --git a/envs/envs_test.go b/envs/envs_test.go index 0694dd44..24c392cb 100644 --- a/envs/envs_test.go +++ b/envs/envs_test.go @@ -94,3 +94,97 @@ func (s *ScenvSuite) TestElasticsearchURLEndsWithTrailingSlash(c *C) { rels = extractRelationshipsEnvs(env) c.Assert(rels["ELASTICSEARCH_URL"], Equals, "http://localhost:9200") } + +func (s *ScenvSuite) TestDockerDatabaseURLs(c *C) { + env := fakeEnv{ + Rels: map[string][]map[string]interface{}{ + "mysql": { + map[string]interface{}{ + "host": "127.0.0.1", + "ip": "127.0.0.1", + "password": "!ChangeMe!", + "path": "root", + "port": "56614", + "query": map[string]bool{"is_master": true}, + "rel": "mysql", + "scheme": "mysql", + "username": "root", + "version": "10.0.38+maria-1~xenial", + }, + }, + "postgresql": { + map[string]interface{}{ + "host": "127.0.0.1", + "ip": "127.0.0.1", + "password": "main", + "path": "main", + "port": "63574", + "query": map[string]bool{"is_master": true}, + "rel": "pgsql", + "scheme": "pgsql", + "username": "main", + "version": "13.13", + }, + }, + }, + } + + rels := extractRelationshipsEnvs(env) + c.Assert(rels["MYSQL_URL"], Equals, "mysql://root:!ChangeMe!@127.0.0.1:56614/root?sslmode=disable&charset=utf8mb4&serverVersion=10.0.38%2Bmaria-1~xenial") + c.Assert(rels["POSTGRESQL_URL"], Equals, "postgres://main:main@127.0.0.1:63574/main?sslmode=disable&charset=utf8&serverVersion=13.13") +} + +func (s *ScenvSuite) TestCloudTunnelDatabaseURLs(c *C) { + env := fakeEnv{ + Rels: map[string][]map[string]interface{}{ + "mysql": { + { + "cluster": "d3xkaapt4cyik-main-bvxea6i", + "epoch": 0, + "fragment": interface{}(nil), + "host": "127.0.0.1", + "host_mapped": false, + "hostname": "vd4wb3toqpyybms2qktcjmdng4.database.service._.eu-5.platformsh.site", + "instance_ips": []interface{}{"249.175.144.213"}, + "ip": "127.0.0.1", + "password": "", + "path": "main", + "port": "30001", + "public": false, + "query": map[string]interface{}{"is_master": true}, + "rel": "mysql", + "scheme": "mysql", + "service": "database", + "type": "mysql:10.0", + "username": "user", + }, + }, + "postgresql": { + { + "cluster": "xxx-master-yyy", + "epoch": 0, + "fragment": interface{}(nil), + "host": "127.0.0.1", + "host_mapped": false, + "hostname": "xxx.pgsqldb.service._.fr-4.platformsh.site", + "instance_ips": []interface{}{"240.7.208.71"}, + "ip": "127.0.0.1", + "password": "main", + "path": "main", + "port": "30000", + "public": false, + "query": map[string]interface{}{"is_master": true}, + "rel": "postgresql", + "scheme": "pgsql", + "service": "pgsqldb", + "type": "postgresql:13", + "username": "main", + }, + }, + }, + } + + rels := extractRelationshipsEnvs(env) + c.Assert(rels["MYSQL_URL"], Equals, "mysql://user@127.0.0.1:30001/main?sslmode=disable&charset=utf8mb4&serverVersion=10.0.0-MariaDB") + c.Assert(rels["POSTGRESQL_URL"], Equals, "postgres://main:main@127.0.0.1:30000/main?sslmode=disable&charset=utf8&serverVersion=13") +} From cff50473602d648211ff6956ca181adb4c816b93 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 29 Jan 2024 19:16:13 +0100 Subject: [PATCH 274/466] Make sure Doctrine configuration takes precedence over Platform.sh configuration --- commands/platformsh_hooks.go | 10 ++--- envs/envs.go | 8 +++- envs/envs_test.go | 39 ++++++++++++++++++- .../config/packages/doctrine.yaml | 11 ++++++ {commands => local/platformsh}/db_versions.go | 10 ++--- 5 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 envs/testdata/doctrine-project/config/packages/doctrine.yaml rename {commands => local/platformsh}/db_versions.go (88%) diff --git a/commands/platformsh_hooks.go b/commands/platformsh_hooks.go index 6c0b1f1b..b8e77cd6 100644 --- a/commands/platformsh_hooks.go +++ b/commands/platformsh_hooks.go @@ -41,7 +41,7 @@ var platformshBeforeHooks = map[string]console.BeforeFunc{ return nil } - dbName, dbVersion, err := readDBVersionFromPlatformServiceYAML(projectDir) + dbName, dbVersion, err := platformsh.ReadDBVersionFromPlatformServiceYAML(projectDir) if err != nil { return nil } @@ -58,19 +58,19 @@ but %%s. Before deploying, fix the version mismatch. `, dbName, dbVersion) - dotEnvVersion, err := readDBVersionFromDotEnv(projectDir) + dotEnvVersion, err := platformsh.ReadDBVersionFromDotEnv(projectDir) if err != nil { return nil } - if databaseVersiondUnsynced(dotEnvVersion, dbVersion) { + if platformsh.DatabaseVersiondUnsynced(dotEnvVersion, dbVersion) { return fmt.Errorf(errorTpl, fmt.Sprintf("the \".env\" file requires version %s", dotEnvVersion)) } - doctrineConfigVersion, err := readDBVersionFromDoctrineConfigYAML(projectDir) + doctrineConfigVersion, err := platformsh.ReadDBVersionFromDoctrineConfigYAML(projectDir) if err != nil { return nil } - if databaseVersiondUnsynced(doctrineConfigVersion, dbVersion) { + if platformsh.DatabaseVersiondUnsynced(doctrineConfigVersion, dbVersion) { return fmt.Errorf(errorTpl, fmt.Sprintf("the \"config/packages/doctrine.yaml\" file requires version %s", doctrineConfigVersion)) } diff --git a/envs/envs.go b/envs/envs.go index 7c5018a5..d4b89e63 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -28,6 +28,7 @@ import ( "strconv" "strings" + "github.com/symfony-cli/symfony-cli/local/platformsh" "github.com/symfony-cli/symfony-cli/util" ) @@ -158,8 +159,11 @@ func extractRelationshipsEnvs(env Environment) Envs { } if detectedLanguage == "php" { versionKey := fmt.Sprintf("%sVERSION", prefix) - // type is available when in the cloud or locally via a tunnel - if v, ok := endpoint["type"]; ok { + if doctrineConfigVersion, err := platformsh.ReadDBVersionFromDoctrineConfigYAML(env.Path()); err == nil && doctrineConfigVersion != "" { + // configuration from doctrine.yaml + values[versionKey] = doctrineConfigVersion + } else if v, ok := endpoint["type"]; ok { + // type is available when in the cloud or locally via a tunnel if version, hasVersionInEnv := os.LookupEnv(versionKey); hasVersionInEnv { values[versionKey] = version } else if strings.Contains(v.(string), ":") { diff --git a/envs/envs_test.go b/envs/envs_test.go index 24c392cb..a1a0abef 100644 --- a/envs/envs_test.go +++ b/envs/envs_test.go @@ -39,10 +39,14 @@ func (s *ScenvSuite) TestAppID(c *C) { } type fakeEnv struct { - Rels Relationships + Rels Relationships + RootPath string } func (f fakeEnv) Path() string { + if f.RootPath != "" { + return f.RootPath + } return "/dev/null" } @@ -188,3 +192,36 @@ func (s *ScenvSuite) TestCloudTunnelDatabaseURLs(c *C) { c.Assert(rels["MYSQL_URL"], Equals, "mysql://user@127.0.0.1:30001/main?sslmode=disable&charset=utf8mb4&serverVersion=10.0.0-MariaDB") c.Assert(rels["POSTGRESQL_URL"], Equals, "postgres://main:main@127.0.0.1:30000/main?sslmode=disable&charset=utf8&serverVersion=13") } + +func (s *ScenvSuite) TestDoctrineConfigTakesPrecedenceDatabaseURLs(c *C) { + env := fakeEnv{ + Rels: map[string][]map[string]interface{}{ + "mysql": { + { + "cluster": "d3xkaapt4cyik-main-bvxea6i", + "epoch": 0, + "fragment": interface{}(nil), + "host": "127.0.0.1", + "host_mapped": false, + "hostname": "vd4wb3toqpyybms2qktcjmdng4.database.service._.eu-5.platformsh.site", + "instance_ips": []interface{}{"249.175.144.213"}, + "ip": "127.0.0.1", + "password": "", + "path": "main", + "port": "30001", + "public": false, + "query": map[string]interface{}{"is_master": true}, + "rel": "mysql", + "scheme": "mysql", + "service": "database", + "type": "mysql:10.0", + "username": "user", + }, + }, + }, + RootPath: "testdata/doctrine-project", + } + + rels := extractRelationshipsEnvs(env) + c.Assert(rels["MYSQL_URL"], Equals, "mysql://user@127.0.0.1:30001/main?sslmode=disable&charset=utf8mb4&serverVersion=8.0.33") +} diff --git a/envs/testdata/doctrine-project/config/packages/doctrine.yaml b/envs/testdata/doctrine-project/config/packages/doctrine.yaml new file mode 100644 index 00000000..cb7fcf7e --- /dev/null +++ b/envs/testdata/doctrine-project/config/packages/doctrine.yaml @@ -0,0 +1,11 @@ +doctrine: + dbal: + url: '%env(resolve:DATABASE_URL)%' + use_savepoints: true + + # IMPORTANT: You MUST configure your server version, + # either here or in the DATABASE_URL env var (see .env file) + server_version: '8.0.33' + driver: 'mysql' + + profiling_collect_backtrace: '%kernel.debug%' diff --git a/commands/db_versions.go b/local/platformsh/db_versions.go similarity index 88% rename from commands/db_versions.go rename to local/platformsh/db_versions.go index 39448e09..78cba9cc 100644 --- a/commands/db_versions.go +++ b/local/platformsh/db_versions.go @@ -1,4 +1,4 @@ -package commands +package platformsh import ( "errors" @@ -11,7 +11,7 @@ import ( "gopkg.in/yaml.v2" ) -func readDBVersionFromPlatformServiceYAML(projectDir string) (string, string, error) { +func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, error) { servicesYAML, err := os.ReadFile(filepath.Join(projectDir, ".platform", "services.yaml")) if err != nil { // no services.yaml or unreadable @@ -42,7 +42,7 @@ func readDBVersionFromPlatformServiceYAML(projectDir string) (string, string, er return dbName, dbVersion, nil } -func readDBVersionFromDotEnv(projectDir string) (string, error) { +func ReadDBVersionFromDotEnv(projectDir string) (string, error) { path := filepath.Join(projectDir, ".env") if _, err := os.Stat(path); errors.Is(err, os.ErrNotExist) { return "", nil @@ -70,7 +70,7 @@ func readDBVersionFromDotEnv(projectDir string) (string, error) { return url.Query().Get("serverVersion"), nil } -func readDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { +func ReadDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { path := filepath.Join(projectDir, "config", "packages", "doctrine.yaml") if _, err := os.Stat(path); errors.Is(err, os.ErrNotExist) { return "", nil @@ -95,7 +95,7 @@ func readDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { return doctrineConfig.Doctrine.Dbal.ServerVersion, nil } -func databaseVersiondUnsynced(providedVersion, dbVersion string) bool { +func DatabaseVersiondUnsynced(providedVersion, dbVersion string) bool { providedVersion = strings.Replace(providedVersion, "mariadb-", "", 1) return providedVersion != "" && !strings.HasPrefix(providedVersion, dbVersion) From a9297adf45c5524aa3b505ed52e3f17122dfcb97 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 30 Jan 2024 13:56:52 +0100 Subject: [PATCH 275/466] Fix Doctrine URLs (do not encode to avoid having %xxx% that would be seen as parameter name to replace by Symfony DI) --- envs/envs.go | 3 +-- envs/envs_test.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/envs/envs.go b/envs/envs.go index d4b89e63..2ba9cd8b 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -22,7 +22,6 @@ package envs import ( "encoding/json" "fmt" - neturl "net/url" "os" "path/filepath" "strconv" @@ -187,7 +186,7 @@ func extractRelationshipsEnvs(env Environment) Envs { } } if v, ok := values[versionKey]; ok && v != "" { - values[fmt.Sprintf("%sURL", prefix)] += "&serverVersion=" + neturl.QueryEscape(v) + values[fmt.Sprintf("%sURL", prefix)] += "&serverVersion=" + v } } values[fmt.Sprintf("%sSERVER", prefix)] = formatServer(endpoint) diff --git a/envs/envs_test.go b/envs/envs_test.go index a1a0abef..ff10f40b 100644 --- a/envs/envs_test.go +++ b/envs/envs_test.go @@ -134,7 +134,7 @@ func (s *ScenvSuite) TestDockerDatabaseURLs(c *C) { } rels := extractRelationshipsEnvs(env) - c.Assert(rels["MYSQL_URL"], Equals, "mysql://root:!ChangeMe!@127.0.0.1:56614/root?sslmode=disable&charset=utf8mb4&serverVersion=10.0.38%2Bmaria-1~xenial") + c.Assert(rels["MYSQL_URL"], Equals, "mysql://root:!ChangeMe!@127.0.0.1:56614/root?sslmode=disable&charset=utf8mb4&serverVersion=10.0.38+maria-1~xenial") c.Assert(rels["POSTGRESQL_URL"], Equals, "postgres://main:main@127.0.0.1:63574/main?sslmode=disable&charset=utf8&serverVersion=13.13") } From eb4b01e6a6fa53407789dd147a28d112d6409d9d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:09:47 +0000 Subject: [PATCH 276/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 188 +++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 32232009..1284dee9 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1012,6 +1012,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "parent",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "resources-init",}, &console.BoolFlag{Name: "set-upstream", Aliases: []string{"u"},}, &console.StringFlag{Name: "target",}, &console.StringFlag{Name: "type",}, @@ -2473,6 +2474,193 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, + { + Category: "cloud:team", + Name: "create", + Aliases: []*console.Alias{ + {Name: "team:create", Hidden: true}, + {Name: "upsun:team:create", Hidden: true}, + }, + Usage: "Create a new team", + Flags: []console.Flag{ + &console.StringFlag{Name: "label",}, + &console.BoolFlag{Name: "no-check-unique",}, + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.BoolFlag{Name: "output-id",}, + &console.StringFlag{Name: "role", Aliases: []string{"r"},}, + }, + }, + { + Category: "cloud:team", + Name: "delete", + Aliases: []*console.Alias{ + {Name: "team:delete", Hidden: true}, + {Name: "upsun:team:delete", Hidden: true}, + }, + Usage: "Delete a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + }, + }, + { + Category: "cloud:team", + Name: "get", + Aliases: []*console.Alias{ + {Name: "team:get", Hidden: true}, + {Name: "upsun:team:get", Hidden: true}, + }, + Usage: "View a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + }, + }, + { + Category: "cloud:team", + Name: "list", + Aliases: []*console.Alias{ + {Name: "team:list", Hidden: true}, + {Name: "upsun:team:list", Hidden: true}, + {Name: "cloud:teams"}, + {Name: "upsun:teams", Hidden: true}, + {Name: "teams", Hidden: true}, + }, + Usage: "List teams", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "count", Aliases: []string{"c"},}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.BoolFlag{Name: "reverse",}, + &console.StringFlag{Name: "sort", DefaultValue: "label",}, + }, + }, + { + Category: "cloud:team", + Name: "project:add", + Aliases: []*console.Alias{ + {Name: "team:project:add", Hidden: true}, + {Name: "upsun:team:project:add", Hidden: true}, + }, + Usage: "Add project(s) to a team", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all",}, + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + }, + }, + { + Category: "cloud:team", + Name: "project:delete", + Aliases: []*console.Alias{ + {Name: "team:project:delete", Hidden: true}, + {Name: "upsun:team:project:delete", Hidden: true}, + }, + Usage: "Remove a project from a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + }, + }, + { + Category: "cloud:team", + Name: "project:list", + Aliases: []*console.Alias{ + {Name: "team:project:list", Hidden: true}, + {Name: "upsun:team:project:list", Hidden: true}, + {Name: "cloud:team:projects"}, + {Name: "upsun:team:projects", Hidden: true}, + {Name: "team:projects", Hidden: true}, + {Name: "cloud:team:pro"}, + {Name: "upsun:team:pro", Hidden: true}, + {Name: "team:pro", Hidden: true}, + }, + Usage: "List projects in a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "count", Aliases: []string{"c"},}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + }, + }, + { + Category: "cloud:team", + Name: "update", + Aliases: []*console.Alias{ + {Name: "team:update", Hidden: true}, + {Name: "upsun:team:update", Hidden: true}, + }, + Usage: "Update a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "label",}, + &console.BoolFlag{Name: "no-check-unique",}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "role", Aliases: []string{"r"},}, + &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + &console.BoolFlag{Name: "wait",}, + }, + }, + { + Category: "cloud:team", + Name: "user:add", + Aliases: []*console.Alias{ + {Name: "team:user:add", Hidden: true}, + {Name: "upsun:team:user:add", Hidden: true}, + }, + Usage: "Add a user to a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + }, + }, + { + Category: "cloud:team", + Name: "user:delete", + Aliases: []*console.Alias{ + {Name: "team:user:delete", Hidden: true}, + {Name: "upsun:team:user:delete", Hidden: true}, + }, + Usage: "Remove a user from a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + }, + }, + { + Category: "cloud:team", + Name: "user:list", + Aliases: []*console.Alias{ + {Name: "team:user:list", Hidden: true}, + {Name: "upsun:team:user:list", Hidden: true}, + {Name: "cloud:team:users"}, + {Name: "upsun:team:users", Hidden: true}, + {Name: "team:users", Hidden: true}, + }, + Usage: "List users in a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns",}, + &console.StringFlag{Name: "count", Aliases: []string{"c"},}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + }, + }, { Category: "cloud:tunnel", Name: "close", From 6faf2a3de8f0c8832df5bf83aab016cd534962cd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 08:11:18 +0000 Subject: [PATCH 277/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 406245e6..60abcea9 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -82,7 +82,7 @@ var availablePHPExts = map[string][]string{ "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "pdo_sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pinba": {"5.4", "5.5", "5.6"}, @@ -104,7 +104,7 @@ var availablePHPExts = map[string][]string{ "sourceguardian": {"7.0", "7.1", "8.2", "8.3"}, "spplus": {"5.4", "5.5"}, "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "ssh2": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "swoole": {"8.2"}, "sybase": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, From 425e36590875ad4cbd3b9916c3aff59cd167ff98 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Tue, 6 Feb 2024 10:59:13 +0100 Subject: [PATCH 278/466] Remove port from `$_SERVER['SERVER_NAME']` --- local/http/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/http/http.go b/local/http/http.go index 031d3908..80ea7072 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -232,7 +232,7 @@ func (s *Server) Handler(w http.ResponseWriter, r *http.Request) { } env := map[string]string{ "SERVER_PORT": s.serverPort, - "SERVER_NAME": r.Host, + "SERVER_NAME": strings.Split(r.Host, ":")[0], "SERVER_PROTOCOL": r.Proto, "SERVER_SOFTWARE": fmt.Sprintf("symfony-cli/%s", s.Appversion), } From acab6135cc430a672a9908078f10ff4fe9f2c597 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 08:10:36 +0000 Subject: [PATCH 279/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 60abcea9..b7073976 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -24,8 +24,8 @@ package platformsh var availablePHPExts = map[string][]string{ "amqp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "apc": {"5.4", "5.5"}, - "apcu": {"5.4", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "apc": {"5.4"}, + "apcu": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "apcu_bc": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "applepay": {"7.0", "7.1", "7.4"}, "bcmath": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, @@ -78,11 +78,12 @@ var availablePHPExts = map[string][]string{ "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, - "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pdo_mysql": {"5.4", "5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pecl-http": {"5.6"}, "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pinba": {"5.4", "5.5", "5.6"}, @@ -118,7 +119,7 @@ var availablePHPExts = map[string][]string{ "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "wddx": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "xcache": {"5.4", "5.5"}, - "xdebug": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "xdebug": {"5.5", "5.6", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xhprof": {"5.4", "5.5", "5.6"}, "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, From cce8ca11b278f19f8f9bc67725b1932c4386a589 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Tue, 6 Feb 2024 21:25:45 +0100 Subject: [PATCH 280/466] Add support for `--all` flag on `server:stop` --- commands/local_server_list.go | 2 +- commands/local_server_stop.go | 62 +++++++++++++++++++--- local/pid/pidfile.go | 4 +- local/projects/configured_test.go | 85 +++++++++++++++++++++++++++++++ local/proxy/proxy.go | 2 +- 5 files changed, 144 insertions(+), 11 deletions(-) create mode 100644 local/projects/configured_test.go diff --git a/commands/local_server_list.go b/commands/local_server_list.go index 4b7dbdac..5c04fa95 100644 --- a/commands/local_server_list.go +++ b/commands/local_server_list.go @@ -50,7 +50,7 @@ func printConfiguredServers() error { if err != nil { return errors.WithStack(err) } - runningProjects, err := pid.ToConfiguredProjects() + runningProjects, err := pid.ToConfiguredProjects(true) if err != nil { return errors.WithStack(err) } diff --git a/commands/local_server_stop.go b/commands/local_server_stop.go index e7232231..591566f4 100644 --- a/commands/local_server_stop.go +++ b/commands/local_server_stop.go @@ -36,23 +36,68 @@ var localServerStopCmd = &console.Command{ Usage: "Stop the local web server", Flags: []console.Flag{ dirFlag, + &console.BoolFlag{Name: "all", Usage: "Stop all local web servers"}, }, Action: func(c *console.Context) error { - projectDir, err := getProjectDir(c.String("dir")) + if c.Bool("all") && c.IsSet("dir") { + return fmt.Errorf("you cannot use the --all option with a specific directory") + } + + var dirs []string + + if c.Bool("all") { + configuredAndRunning, err := pid.ToConfiguredProjects(false) + if err != nil { + return err + } + + for dir := range configuredAndRunning { + dirs = append(dirs, dir) + } + } else { + projectDir, err := getProjectDir(c.String("dir")) + if err != nil { + return err + } + + dirs = append(dirs, projectDir) + } + + return stopProjects(dirs, c.Bool("all")) + }, +} + +func stopProjects(dirs []string, allFlag bool) error { + ui := terminal.SymfonyStyle(terminal.Stdout, terminal.Stdin) + running := 0 + + if len(dirs) == 0 { + ui.Success("No local web servers to stop") + + return nil + } + + for _, dir := range dirs { + projectDir, err := getProjectDir(dir) + runningProcessesForProject := 0 if err != nil { return err } - ui := terminal.SymfonyStyle(terminal.Stdout, terminal.Stdin) + + if allFlag { + ui.Section(fmt.Sprintf("Stopping project %s", projectDir)) + } + webserver := pid.New(projectDir, nil) pids := append(pid.AllWorkers(projectDir), webserver) var g errgroup.Group - running := 0 for _, p := range pids { if !p.IsRunning() { continue } running++ + runningProcessesForProject++ g.Go(p.WaitForExit) // we first notify the webserver in order to let it know it should @@ -63,9 +108,9 @@ var localServerStopCmd = &console.Command{ } } - if running == 0 { + if runningProcessesForProject == 0 { ui.Success("The web server is not running") - return nil + continue } for _, p := range pids { @@ -92,8 +137,11 @@ var localServerStopCmd = &console.Command{ if err := g.Wait(); err != nil { return err } + } + if running > 0 { ui.Success(fmt.Sprintf("Stopped %d process(es) successfully", running)) - return nil - }, + } + + return nil } diff --git a/local/pid/pidfile.go b/local/pid/pidfile.go index 53b3b172..b5e41f28 100644 --- a/local/pid/pidfile.go +++ b/local/pid/pidfile.go @@ -324,7 +324,7 @@ func (p *PidFile) Signal(sig os.Signal) error { return process.Signal(sig) } -func ToConfiguredProjects() (map[string]*projects.ConfiguredProject, error) { +func ToConfiguredProjects(shortenHomeDir bool) (map[string]*projects.ConfiguredProject, error) { ps := make(map[string]*projects.ConfiguredProject) userHomeDir, err := homedir.Dir() if err != nil { @@ -336,7 +336,7 @@ func ToConfiguredProjects() (map[string]*projects.ConfiguredProject, error) { } port := pid.Port shortDir := pid.Dir - if strings.HasPrefix(shortDir, userHomeDir) { + if strings.HasPrefix(shortDir, userHomeDir) && shortenHomeDir { shortDir = "~" + shortDir[len(userHomeDir):] } ps[shortDir] = &projects.ConfiguredProject{ diff --git a/local/projects/configured_test.go b/local/projects/configured_test.go new file mode 100644 index 00000000..afe0facc --- /dev/null +++ b/local/projects/configured_test.go @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2024-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package projects + +import ( + "testing" +) + +func TestGetConfiguredAndRunning(t *testing.T) { + proxyProjects := map[string]*ConfiguredProject{ + "~/app1": { + Scheme: "https", + Port: 8000, + }, + "/var/www/app2": { + Scheme: "http", + Port: 8001, + }, + } + + runningProjects := map[string]*ConfiguredProject{ + "~/app1": { + Scheme: "https", + Port: 8000, + }, + "/var/www/app2": { + Scheme: "http", + Port: 8001, + }, + "/var/www/app3": { + Scheme: "ftp", + Port: 8002, + }, + } + + projects, err := GetConfiguredAndRunning(proxyProjects, runningProjects) + if err != nil { + t.Errorf("Error was not expected: %v", err) + } + + if len(projects) != 3 { + t.Errorf("Expected 2 projects, got %d", len(projects)) + } + + if projects["~/app1"].Port != 8000 { + t.Errorf("Expected 8000, got %d", projects["~/app1"].Port) + } + + if projects["~/app1"].Scheme != "https" { + t.Errorf("Expected \"https\", got %s", projects["~/app1"].Scheme) + } + + if projects["/var/www/app2"].Port != 8001 { + t.Errorf("Expected 8001, got %d", projects["/var/www/app2"].Port) + } + + if projects["/var/www/app2"].Scheme != "http" { + t.Errorf("Expected \"http\", got %s", projects["/var/www/app2"].Scheme) + } + + if projects["/var/www/app3"].Port != 8002 { + t.Errorf("Expected 8002, got %d", projects["/var/www/app3"].Port) + } + + if projects["/var/www/app3"].Scheme != "ftp" { + t.Errorf("Expected \"ftp\", got %s", projects["/var/www/app3"].Scheme) + } +} diff --git a/local/proxy/proxy.go b/local/proxy/proxy.go index ad10c381..c66b9e22 100644 --- a/local/proxy/proxy.go +++ b/local/proxy/proxy.go @@ -345,7 +345,7 @@ func (p *Proxy) serveIndex(w http.ResponseWriter, r *http.Request) { if err != nil { return } - runningProjects, err := pid.ToConfiguredProjects() + runningProjects, err := pid.ToConfiguredProjects(true) if err != nil { return } From 03c431ef80f3fdb83bbf01425def6bc7080e3467 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 8 Feb 2024 12:37:55 +0100 Subject: [PATCH 281/466] Allow PATCH method over HTTP, fix #428 --- local/http/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/http/http.go b/local/http/http.go index 031d3908..a44ff5b3 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -135,7 +135,7 @@ func (s *Server) Start(errChan chan error) (int, error) { } m := cmux.New(ln) - httpl := m.Match(cmux.HTTP1Fast()) + httpl := m.Match(cmux.HTTP1Fast(http.MethodPatch)) tlsl := m.Match(cmux.Any()) if !s.AllowHTTP { From 55e40ab8cb8b5dae095dc303e5be2a32dc73c4f2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 9 Feb 2024 14:13:17 +0100 Subject: [PATCH 282/466] Use doctrine.dbal.connections.default.server_version in addition to doctrine.dbal.server_version --- local/platformsh/db_versions.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/local/platformsh/db_versions.go b/local/platformsh/db_versions.go index 78cba9cc..0225a85c 100644 --- a/local/platformsh/db_versions.go +++ b/local/platformsh/db_versions.go @@ -85,6 +85,11 @@ func ReadDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { Doctrine struct { Dbal struct { ServerVersion string `yaml:"server_version"` + Connections struct { + Default struct { + ServerVersion string `yaml:"server_version"` + } `yaml:"default"` + } } `yaml:"dbal"` } `yaml:"doctrine"` } @@ -92,6 +97,11 @@ func ReadDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { // format is wrong return "", err } + + if doctrineConfig.Doctrine.Dbal.Connections.Default.ServerVersion != "" { + return doctrineConfig.Doctrine.Dbal.Connections.Default.ServerVersion, nil + } + return doctrineConfig.Doctrine.Dbal.ServerVersion, nil } From c3adf8096de33541c8e1a8461845f15fd76b93ab Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 9 Feb 2024 14:41:54 +0100 Subject: [PATCH 283/466] Strip 1: from DB version on Docker --- envs/envs.go | 3 +++ envs/envs_test.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/envs/envs.go b/envs/envs.go index 2ba9cd8b..c1ba1d62 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -183,6 +183,9 @@ func extractRelationshipsEnvs(env Environment) Envs { // Docker support if v, ok := endpoint["version"]; ok { values[versionKey] = v.(string) + if strings.HasPrefix(values[versionKey], "1:") { + values[versionKey] = values[versionKey][2:] + } } } if v, ok := values[versionKey]; ok && v != "" { diff --git a/envs/envs_test.go b/envs/envs_test.go index ff10f40b..ee4f16c5 100644 --- a/envs/envs_test.go +++ b/envs/envs_test.go @@ -113,7 +113,7 @@ func (s *ScenvSuite) TestDockerDatabaseURLs(c *C) { "rel": "mysql", "scheme": "mysql", "username": "root", - "version": "10.0.38+maria-1~xenial", + "version": "1:10.0.38+maria-1~xenial", }, }, "postgresql": { From 1d49ee9131e11b3021bc956b8579b69a6895525e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 9 Feb 2024 15:03:02 +0100 Subject: [PATCH 284/466] Fix Doctrine URL when server_version is referencing an env var --- local/platformsh/db_versions.go | 16 ++++++-- local/platformsh/db_versions_test.go | 38 +++++++++++++++++++ .../projectA/config/packages/doctrine.yaml | 3 ++ 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 local/platformsh/db_versions_test.go create mode 100644 local/platformsh/testdata/projectA/config/packages/doctrine.yaml diff --git a/local/platformsh/db_versions.go b/local/platformsh/db_versions.go index 0225a85c..36d7a038 100644 --- a/local/platformsh/db_versions.go +++ b/local/platformsh/db_versions.go @@ -98,11 +98,19 @@ func ReadDBVersionFromDoctrineConfigYAML(projectDir string) (string, error) { return "", err } - if doctrineConfig.Doctrine.Dbal.Connections.Default.ServerVersion != "" { - return doctrineConfig.Doctrine.Dbal.Connections.Default.ServerVersion, nil + version := doctrineConfig.Doctrine.Dbal.Connections.Default.ServerVersion + if version == "" { + version = doctrineConfig.Doctrine.Dbal.ServerVersion } - - return doctrineConfig.Doctrine.Dbal.ServerVersion, nil + if version == "" { + // empty version + return "", nil + } + if version[0] == '%' && version[len(version)-1] == '%' { + // references an env var, ignore + return "", nil + } + return version, nil } func DatabaseVersiondUnsynced(providedVersion, dbVersion string) bool { diff --git a/local/platformsh/db_versions_test.go b/local/platformsh/db_versions_test.go new file mode 100644 index 00000000..a515c31c --- /dev/null +++ b/local/platformsh/db_versions_test.go @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package platformsh + +import ( + "testing" + + . "gopkg.in/check.v1" +) + +func Test(t *testing.T) { TestingT(t) } + +type PlatformSuite struct{} + +var _ = Suite(&PlatformSuite{}) + +func (s *PlatformSuite) TestReadDBVersionFromDoctrineConfigYAML(c *C) { + version, err := ReadDBVersionFromDoctrineConfigYAML("testdata/projectA") + c.Assert(err, IsNil) + c.Assert(version, Equals, "") +} diff --git a/local/platformsh/testdata/projectA/config/packages/doctrine.yaml b/local/platformsh/testdata/projectA/config/packages/doctrine.yaml new file mode 100644 index 00000000..4a05bd1c --- /dev/null +++ b/local/platformsh/testdata/projectA/config/packages/doctrine.yaml @@ -0,0 +1,3 @@ +doctrine: + dbal: + server_version: '%env(DATABASE_VERSION)%' From 868898480a06560c5e85aa6befb3fef73fad8315 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 9 Feb 2024 15:10:45 +0100 Subject: [PATCH 285/466] Rework database URL precedence --- envs/envs.go | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/envs/envs.go b/envs/envs.go index c1ba1d62..25e62086 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -158,26 +158,29 @@ func extractRelationshipsEnvs(env Environment) Envs { } if detectedLanguage == "php" { versionKey := fmt.Sprintf("%sVERSION", prefix) - if doctrineConfigVersion, err := platformsh.ReadDBVersionFromDoctrineConfigYAML(env.Path()); err == nil && doctrineConfigVersion != "" { - // configuration from doctrine.yaml - values[versionKey] = doctrineConfigVersion - } else if v, ok := endpoint["type"]; ok { - // type is available when in the cloud or locally via a tunnel - if version, hasVersionInEnv := os.LookupEnv(versionKey); hasVersionInEnv { - values[versionKey] = version - } else if strings.Contains(v.(string), ":") { - version := strings.SplitN(v.(string), ":", 2)[1] + if v, ok := endpoint["type"]; ok { + // configuration from doctrine.yaml takes precedence over psh config + if doctrineConfigVersion, err := platformsh.ReadDBVersionFromDoctrineConfigYAML(env.Path()); err == nil && doctrineConfigVersion != "" { + // configuration from doctrine.yaml + values[versionKey] = doctrineConfigVersion + } else { + // type is available when in the cloud or locally via a tunnel + if version, hasVersionInEnv := os.LookupEnv(versionKey); hasVersionInEnv { + values[versionKey] = version + } else if strings.Contains(v.(string), ":") { + version := strings.SplitN(v.(string), ":", 2)[1] - // we actually provide mariadb not mysql - if endpoint["scheme"].(string) == "mysql" { - minor := 0 - if version == "10.2" { - minor = 7 + // we actually provide mariadb not mysql + if endpoint["scheme"].(string) == "mysql" { + minor := 0 + if version == "10.2" { + minor = 7 + } + version = fmt.Sprintf("%s.%d-MariaDB", version, minor) } - version = fmt.Sprintf("%s.%d-MariaDB", version, minor) - } - values[versionKey] = version + values[versionKey] = version + } } } else if env.Local() { // Docker support From 338f266488b269dd241b25de1f05f43e93de83be Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 12 Feb 2024 08:37:17 +0100 Subject: [PATCH 286/466] Update Go to 1.22 --- .github/workflows/go_generate_update.yml | 2 +- .github/workflows/releaser.yml | 2 +- go.mod | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go_generate_update.yml b/.github/workflows/go_generate_update.yml index cc47ef4b..69e18ca9 100644 --- a/.github/workflows/go_generate_update.yml +++ b/.github/workflows/go_generate_update.yml @@ -17,7 +17,7 @@ jobs: name: Set up Go uses: actions/setup-go@v3 with: - go-version: '^1.21.1' + go-version: '^1.22.0' - uses: actions/cache@v3 with: path: | diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 1de6a03b..362a0c2f 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -35,7 +35,7 @@ jobs: name: Set up Go uses: actions/setup-go@v3 with: - go-version: '^1.21.1' + go-version: '^1.22.0' - uses: actions/cache@v3 with: path: | diff --git a/go.mod b/go.mod index 7e4f16bf..330ca4b6 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/symfony-cli/symfony-cli +go 1.22 + require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 @@ -76,5 +78,3 @@ require ( howett.net/plist v1.0.1 // indirect software.sslmate.com/src/go-pkcs12 v0.4.0 // indirect ) - -go 1.21 From f3ee4eaccb30765c3dd1c77ae2b9d01faf65c7e4 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 10 Aug 2022 10:34:23 -0400 Subject: [PATCH 287/466] Fix chunked requests are not supported --- local/php/cgi.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/local/php/cgi.go b/local/php/cgi.go index 6af3ec53..f1b1ff67 100644 --- a/local/php/cgi.go +++ b/local/php/cgi.go @@ -1,8 +1,10 @@ package php import ( + "bytes" "io" "net/http" + "strconv" "time" "github.com/pkg/errors" @@ -30,6 +32,24 @@ func (p *cgiTransport) RoundTrip(req *http.Request) (*http.Response, error) { time.Sleep(time.Millisecond * 50) } + // The CGI spec doesn't allow chunked requests. Go is already assembling the + // chunks from the request to a usable Reader (see net/http.readTransfer and + // net/http/internal.NewChunkedReader), so the only thing we have to + // do to is get the content length and add it to the header but to do so we + // have to read and buffer the body content. + if len(req.TransferEncoding) > 0 && req.TransferEncoding[0] == "chunked" { + bodyBuffer := &bytes.Buffer{} + bodyBytes, err := io.Copy(bodyBuffer, req.Body) + if err != nil { + return nil, err + } + + req.Body = io.NopCloser(bodyBuffer) + req.TransferEncoding = nil + env["CONTENT_LENGTH"] = strconv.FormatInt(bodyBytes, 10) + env["HTTP_CONTENT_LENGTH"] = env["CONTENT_LENGTH"] + } + // fetching the response from the fastcgi backend, and check for errors resp, err := fcgi.Request(env, req.Body) if err != nil { From fefaff92256888d0d22c7cf69a2c5ab48e7aa3d7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 14 Feb 2024 12:20:31 +0100 Subject: [PATCH 288/466] Fix MariaDB version when using Docker --- envs/envs.go | 6 ++++-- envs/envs_test.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/envs/envs.go b/envs/envs.go index 25e62086..4f04ed06 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -24,6 +24,7 @@ import ( "fmt" "os" "path/filepath" + "regexp" "strconv" "strings" @@ -186,8 +187,9 @@ func extractRelationshipsEnvs(env Environment) Envs { // Docker support if v, ok := endpoint["version"]; ok { values[versionKey] = v.(string) - if strings.HasPrefix(values[versionKey], "1:") { - values[versionKey] = values[versionKey][2:] + + if matches := regexp.MustCompile("^\\d:(\\d+\\.\\d+\\.\\d+).maria").FindStringSubmatch(values[versionKey]); matches != nil { + values[versionKey] = fmt.Sprintf("%s-MariaDB", matches[1]) } } } diff --git a/envs/envs_test.go b/envs/envs_test.go index ee4f16c5..09431a1e 100644 --- a/envs/envs_test.go +++ b/envs/envs_test.go @@ -134,7 +134,7 @@ func (s *ScenvSuite) TestDockerDatabaseURLs(c *C) { } rels := extractRelationshipsEnvs(env) - c.Assert(rels["MYSQL_URL"], Equals, "mysql://root:!ChangeMe!@127.0.0.1:56614/root?sslmode=disable&charset=utf8mb4&serverVersion=10.0.38+maria-1~xenial") + c.Assert(rels["MYSQL_URL"], Equals, "mysql://root:!ChangeMe!@127.0.0.1:56614/root?sslmode=disable&charset=utf8mb4&serverVersion=10.0.38-MariaDB") c.Assert(rels["POSTGRESQL_URL"], Equals, "postgres://main:main@127.0.0.1:63574/main?sslmode=disable&charset=utf8&serverVersion=13.13") } From a468b4911a34879a99a5157bbd639783149c4f66 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 15 Feb 2024 07:40:46 +0100 Subject: [PATCH 289/466] Fix env vars when IP is not available --- envs/envs.go | 24 ++++++++++---- envs/remote_test.go | 14 ++++++++ .../dedicated/no_ips_for_dedicated.json | 33 +++++++++++++++++++ 3 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 envs/testdata/dedicated/no_ips_for_dedicated.json diff --git a/envs/envs.go b/envs/envs.go index 4f04ed06..e20bf601 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -263,21 +263,29 @@ func extractRelationshipsEnvs(env Environment) Envs { } else if scheme == "memcached" { values[fmt.Sprintf("%sHOST", prefix)] = endpoint["host"].(string) values[fmt.Sprintf("%sPORT", prefix)] = formatInt(endpoint["port"]) - values[fmt.Sprintf("%sIP", prefix)] = endpoint["ip"].(string) + if v, ok := endpoint["ip"]; ok && v != nil { + values[fmt.Sprintf("%sIP", prefix)] = v.(string) + } } else if rel == "influxdb" { values[fmt.Sprintf("%sSCHEME", prefix)] = endpoint["scheme"].(string) values[fmt.Sprintf("%sHOST", prefix)] = endpoint["host"].(string) values[fmt.Sprintf("%sPORT", prefix)] = formatInt(endpoint["port"]) - values[fmt.Sprintf("%sIP", prefix)] = endpoint["ip"].(string) + if v, ok := endpoint["ip"]; ok && v != nil { + values[fmt.Sprintf("%sIP", prefix)] = v.(string) + } } else if scheme == "kafka" { values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s", endpoint["scheme"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) values[fmt.Sprintf("%sSCHEME", prefix)] = endpoint["scheme"].(string) values[fmt.Sprintf("%sHOST", prefix)] = endpoint["host"].(string) values[fmt.Sprintf("%sPORT", prefix)] = formatInt(endpoint["port"]) - values[fmt.Sprintf("%sIP", prefix)] = endpoint["ip"].(string) + if v, ok := endpoint["ip"]; ok && v != nil { + values[fmt.Sprintf("%sIP", prefix)] = v.(string) + } } else if scheme == "tcp" { values[fmt.Sprintf("%sURL", prefix)] = formatServer(endpoint) - values[fmt.Sprintf("%sIP", prefix)] = endpoint["ip"].(string) + if v, ok := endpoint["ip"]; ok && v != nil { + values[fmt.Sprintf("%sIP", prefix)] = v.(string) + } values[fmt.Sprintf("%sPORT", prefix)] = formatInt(endpoint["port"]) values[fmt.Sprintf("%sSCHEME", prefix)] = endpoint["scheme"].(string) values[fmt.Sprintf("%sHOST", prefix)] = endpoint["host"].(string) @@ -296,7 +304,9 @@ func extractRelationshipsEnvs(env Environment) Envs { values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s", endpoint["scheme"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) } values[fmt.Sprintf("%sSERVER", prefix)] = formatServer(endpoint) - values[fmt.Sprintf("%sIP", prefix)] = endpoint["ip"].(string) + if v, ok := endpoint["ip"]; ok && v != nil { + values[fmt.Sprintf("%sIP", prefix)] = v.(string) + } values[fmt.Sprintf("%sPORT", prefix)] = formatInt(endpoint["port"]) values[fmt.Sprintf("%sSCHEME", prefix)] = endpoint["scheme"].(string) values[fmt.Sprintf("%sHOST", prefix)] = endpoint["host"].(string) @@ -323,7 +333,9 @@ func extractRelationshipsEnvs(env Environment) Envs { // for Symfony Mailer, use a MAILER prefix values[fmt.Sprintf("%sDSN", prefix)] = fmt.Sprintf("%s://%s:%s", endpoint["scheme"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) } else if rel == "simple" { - values[fmt.Sprintf("%sIP", prefix)] = endpoint["ip"].(string) + if v, ok := endpoint["ip"]; ok && v != nil { + values[fmt.Sprintf("%sIP", prefix)] = v.(string) + } values[fmt.Sprintf("%sPORT", prefix)] = formatInt(endpoint["port"]) values[fmt.Sprintf("%sHOST", prefix)] = endpoint["host"].(string) } diff --git a/envs/remote_test.go b/envs/remote_test.go index 627464c8..c07af7f0 100644 --- a/envs/remote_test.go +++ b/envs/remote_test.go @@ -421,3 +421,17 @@ func (s *RemoteSuite) TestMySQLReadReplicaForDedicated(c *C) { c.Assert("mysql://mysql:xxx@dbread.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=10.6.0-MariaDB", DeepEquals, e["DBREAD_URL"]) c.Assert("mysql://mysql:xxx@db.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=10.6.0-MariaDB", DeepEquals, e["DB_URL"]) } + +func (s *RemoteSuite) TestSomeBugForDedicated(c *C) { + r := &Remote{} + value, err := os.ReadFile("testdata/dedicated/no_ips_for_dedicated.json") + if err != nil { + panic(err) + } + if err := os.Setenv("PLATFORM_RELATIONSHIPS", base64.StdEncoding.EncodeToString(value)); err != nil { + panic(err) + } + + rels := extractRelationshipsEnvs(r) + c.Assert(rels, DeepEquals, Envs{"DATABASE_DATABASE": "x_stg", "DATABASE_DRIVER": "mysql", "DATABASE_HOST": "127.0.0.1", "DATABASE_NAME": "x_stg", "DATABASE_PASSWORD": "x", "DATABASE_PORT": "3306", "DATABASE_SERVER": "mysql://127.0.0.1:3306", "DATABASE_URL": "mysql://xstg:x@127.0.0.1:3306/x_stg?sslmode=disable&charset=utf8", "DATABASE_USER": "xstg", "DATABASE_USERNAME": "xstg", "RABBITMQ_DSN": "amqp://x_stg:x@localhost:5672", "RABBITMQ_HOST": "localhost", "RABBITMQ_MANAGEMENT_HOST": "localhost", "RABBITMQ_MANAGEMENT_PASSWORD": "x", "RABBITMQ_MANAGEMENT_PORT": "15672", "RABBITMQ_MANAGEMENT_SCHEME": "http", "RABBITMQ_MANAGEMENT_SERVER": "http://localhost:15672", "RABBITMQ_MANAGEMENT_URL": "http://x_stg:x@localhost:15672", "RABBITMQ_MANAGEMENT_USER": "x_stg", "RABBITMQ_MANAGEMENT_USERNAME": "x_stg", "RABBITMQ_PASSWORD": "x", "RABBITMQ_PORT": "5672", "RABBITMQ_SCHEME": "amqp", "RABBITMQ_SERVER": "amqp://localhost:5672", "RABBITMQ_URL": "amqp://x_stg:x@localhost:5672", "RABBITMQ_USER": "x_stg", "RABBITMQ_USERNAME": "x_stg", "REDISCACHE_HOST": "localhost", "REDISCACHE_PORT": "6379", "REDISCACHE_SCHEME": "redis", "REDISCACHE_URL": "redis://localhost:6379"}) +} diff --git a/envs/testdata/dedicated/no_ips_for_dedicated.json b/envs/testdata/dedicated/no_ips_for_dedicated.json new file mode 100644 index 00000000..81f09371 --- /dev/null +++ b/envs/testdata/dedicated/no_ips_for_dedicated.json @@ -0,0 +1,33 @@ +{ + "database" : [ + { + "host" : "127.0.0.1", + "password" : "x", + "path" : "x_stg", + "port" : "3306", + "query" : { + "compression" : true, + "is_master" : true + }, + "scheme" : "mysql", + "username" : "xstg" + } + ], + "rabbitmq" : [ + { + "host" : "localhost", + "password" : "x", + "port" : "5672", + "scheme" : "amqp", + "username" : "x_stg", + "vhost" : "x_stg" + } + ], + "rediscache" : [ + { + "host" : "localhost", + "port" : "6379", + "scheme" : "redis" + } + ] +} From b0736f03e5f741acc33c40f44dfef58d334dc719 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 15 Feb 2024 14:30:52 +0100 Subject: [PATCH 290/466] Add vhost to the RabbitMQ URL when available --- envs/envs.go | 9 +++++++-- envs/remote_test.go | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/envs/envs.go b/envs/envs.go index e20bf601..7d597b79 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -251,8 +251,13 @@ func extractRelationshipsEnvs(env Environment) Envs { values[fmt.Sprintf("%sUSERNAME", prefix)] = endpoint["username"].(string) values[fmt.Sprintf("%sPASSWORD", prefix)] = endpoint["password"].(string) } else if scheme == "amqp" { - values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) - values[fmt.Sprintf("%sDSN", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"])) + vhost := "" + if v, ok := endpoint["vhost"]; ok && v != nil { + values[fmt.Sprintf("%sVHOST", prefix)] = endpoint["vhost"].(string) + vhost = "/" + endpoint["vhost"].(string) + } + values[fmt.Sprintf("%sURL", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"]), vhost) + values[fmt.Sprintf("%sDSN", prefix)] = fmt.Sprintf("%s://%s:%s@%s:%s%s", endpoint["scheme"].(string), endpoint["username"].(string), endpoint["password"].(string), endpoint["host"].(string), formatInt(endpoint["port"]), vhost) values[fmt.Sprintf("%sSERVER", prefix)] = formatServer(endpoint) values[fmt.Sprintf("%sHOST", prefix)] = endpoint["host"].(string) values[fmt.Sprintf("%sPORT", prefix)] = formatInt(endpoint["port"]) diff --git a/envs/remote_test.go b/envs/remote_test.go index c07af7f0..3e1d648c 100644 --- a/envs/remote_test.go +++ b/envs/remote_test.go @@ -404,6 +404,8 @@ func (s *RemoteSuite) TestRelationships(c *C) { "DATABASE_DATABASE": "main", "DATABASE_NAME": "main", }) + os.Unsetenv("DATABASE_VERSION") + os.Unsetenv("DATABASE_CHARSET") } func (s *RemoteSuite) TestMySQLReadReplicaForDedicated(c *C) { @@ -422,7 +424,7 @@ func (s *RemoteSuite) TestMySQLReadReplicaForDedicated(c *C) { c.Assert("mysql://mysql:xxx@db.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=10.6.0-MariaDB", DeepEquals, e["DB_URL"]) } -func (s *RemoteSuite) TestSomeBugForDedicated(c *C) { +func (s *RemoteSuite) TestNoIPsForDedicated(c *C) { r := &Remote{} value, err := os.ReadFile("testdata/dedicated/no_ips_for_dedicated.json") if err != nil { @@ -433,5 +435,38 @@ func (s *RemoteSuite) TestSomeBugForDedicated(c *C) { } rels := extractRelationshipsEnvs(r) - c.Assert(rels, DeepEquals, Envs{"DATABASE_DATABASE": "x_stg", "DATABASE_DRIVER": "mysql", "DATABASE_HOST": "127.0.0.1", "DATABASE_NAME": "x_stg", "DATABASE_PASSWORD": "x", "DATABASE_PORT": "3306", "DATABASE_SERVER": "mysql://127.0.0.1:3306", "DATABASE_URL": "mysql://xstg:x@127.0.0.1:3306/x_stg?sslmode=disable&charset=utf8", "DATABASE_USER": "xstg", "DATABASE_USERNAME": "xstg", "RABBITMQ_DSN": "amqp://x_stg:x@localhost:5672", "RABBITMQ_HOST": "localhost", "RABBITMQ_MANAGEMENT_HOST": "localhost", "RABBITMQ_MANAGEMENT_PASSWORD": "x", "RABBITMQ_MANAGEMENT_PORT": "15672", "RABBITMQ_MANAGEMENT_SCHEME": "http", "RABBITMQ_MANAGEMENT_SERVER": "http://localhost:15672", "RABBITMQ_MANAGEMENT_URL": "http://x_stg:x@localhost:15672", "RABBITMQ_MANAGEMENT_USER": "x_stg", "RABBITMQ_MANAGEMENT_USERNAME": "x_stg", "RABBITMQ_PASSWORD": "x", "RABBITMQ_PORT": "5672", "RABBITMQ_SCHEME": "amqp", "RABBITMQ_SERVER": "amqp://localhost:5672", "RABBITMQ_URL": "amqp://x_stg:x@localhost:5672", "RABBITMQ_USER": "x_stg", "RABBITMQ_USERNAME": "x_stg", "REDISCACHE_HOST": "localhost", "REDISCACHE_PORT": "6379", "REDISCACHE_SCHEME": "redis", "REDISCACHE_URL": "redis://localhost:6379"}) + c.Assert(rels, DeepEquals, Envs{ + "DATABASE_DATABASE": "x_stg", + "DATABASE_DRIVER": "mysql", + "DATABASE_HOST": "127.0.0.1", + "DATABASE_NAME": "x_stg", + "DATABASE_PASSWORD": "x", + "DATABASE_PORT": "3306", + "DATABASE_SERVER": "mysql://127.0.0.1:3306", + "DATABASE_URL": "mysql://xstg:x@127.0.0.1:3306/x_stg?sslmode=disable&charset=utf8mb4", + "DATABASE_USER": "xstg", + "DATABASE_USERNAME": "xstg", + "RABBITMQ_VHOST": "x_stg", + "RABBITMQ_DSN": "amqp://x_stg:x@localhost:5672/x_stg", + "RABBITMQ_HOST": "localhost", + "RABBITMQ_MANAGEMENT_HOST": "localhost", + "RABBITMQ_MANAGEMENT_PASSWORD": "x", + "RABBITMQ_MANAGEMENT_PORT": "15672", + "RABBITMQ_MANAGEMENT_SCHEME": "http", + "RABBITMQ_MANAGEMENT_SERVER": "http://localhost:15672", + "RABBITMQ_MANAGEMENT_URL": "http://x_stg:x@localhost:15672", + "RABBITMQ_MANAGEMENT_USER": "x_stg", + "RABBITMQ_MANAGEMENT_USERNAME": "x_stg", + "RABBITMQ_PASSWORD": "x", + "RABBITMQ_PORT": "5672", + "RABBITMQ_SCHEME": "amqp", + "RABBITMQ_SERVER": "amqp://localhost:5672", + "RABBITMQ_URL": "amqp://x_stg:x@localhost:5672/x_stg", + "RABBITMQ_USER": "x_stg", + "RABBITMQ_USERNAME": "x_stg", + "REDISCACHE_HOST": "localhost", + "REDISCACHE_PORT": "6379", + "REDISCACHE_SCHEME": "redis", + "REDISCACHE_URL": "redis://localhost:6379", + }) } From 638c05b3bcc31eb1495f1bf5b2908e56bce69d2d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 12:14:26 +0000 Subject: [PATCH 291/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index b7073976..8bf11d42 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -242,7 +242,7 @@ var availableServices = []*service{ Type: "solr", Versions: serviceVersions{ Deprecated: []string{"3.6", "4.10", "6.3", "6.6", "7.6", "7.7", "8.0", "8.4", "8.6"}, - Supported: []string{"8.11", "9.1", "9.2"}, + Supported: []string{"8.11", "9.1", "9.2", "9.4"}, }, }, { From 44a3082b4db1eda6bde7e23b6e91588b29b670d0 Mon Sep 17 00:00:00 2001 From: Jeffrey Cafferata Date: Mon, 19 Feb 2024 21:00:25 +0100 Subject: [PATCH 292/466] Updated the PHP `7.2.x` versions to the (current) PHP `8.2.x` in de `local:php:list` text output. --- commands/local_php_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/local_php_list.go b/commands/local_php_list.go index 967d80ff..f687596d 100644 --- a/commands/local_php_list.go +++ b/commands/local_php_list.go @@ -88,7 +88,7 @@ var localPhpListCmd = &console.Command{ } terminal.Println("") - terminal.Println("To control the version used in a directory, create a .php-version file that contains the version number (e.g. 7.2 or 7.2.15),") + terminal.Println("To control the version used in a directory, create a .php-version file that contains the version number (e.g. 8.2 or 8.2.16),") terminal.Println("or define config.platform.php inside composer.json.") terminal.Println("If you're using Platform.sh or Upsun, the version can also be specified in their configuration files.") From 1e7931be57d36513775377adcac0132356ab6189 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 12:14:27 +0000 Subject: [PATCH 293/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 1284dee9..48d50d2e 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -460,6 +460,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.BoolFlag{Name: "restore-code",}, &console.StringFlag{Name: "target",}, &console.BoolFlag{Name: "wait",}, }, @@ -1012,7 +1013,6 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "parent",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "resources-init",}, &console.BoolFlag{Name: "set-upstream", Aliases: []string{"u"},}, &console.StringFlag{Name: "target",}, &console.StringFlag{Name: "type",}, From 2819d58a9b0bd4bfeace38ac70d6815edb311ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Thu, 22 Feb 2024 09:47:35 +0100 Subject: [PATCH 294/466] Add alias for `server:ls` --- commands/local_server_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/local_server_list.go b/commands/local_server_list.go index 5c04fa95..55e972a8 100644 --- a/commands/local_server_list.go +++ b/commands/local_server_list.go @@ -34,7 +34,7 @@ import ( var localServerListCmd = &console.Command{ Category: "local", Name: "server:list", - Aliases: []*console.Alias{{Name: "server:list"}}, + Aliases: []*console.Alias{{Name: "server:list"}, {Name: "server:ls"}}, Usage: "List all configured local web servers", Action: func(c *console.Context) error { return printConfiguredServers() From e6b66fd3ced4f81baf17556290846dbe8c84e2c9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:14:06 +0000 Subject: [PATCH 295/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 8bf11d42..d9bc2b5a 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -158,7 +158,7 @@ var availableServices = []*service{ Type: "kafka", Versions: serviceVersions{ Deprecated: []string{"2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7"}, - Supported: []string{"3.2", "3.4"}, + Supported: []string{"3.2", "3.4", "3.6"}, }, }, { From d3f09d091466bec72d9d4502aaea623953c85266 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 08:10:58 +0000 Subject: [PATCH 296/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index d9bc2b5a..dd1848c0 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -227,8 +227,8 @@ var availableServices = []*service{ { Type: "rabbitmq", Versions: serviceVersions{ - Deprecated: []string{"3.5", "3.6", "3.7", "3.8"}, - Supported: []string{"3.9", "3.10", "3.11", "3.12"}, + Deprecated: []string{"3.5", "3.6", "3.7", "3.8", "3.9", "3.10"}, + Supported: []string{"3.11", "3.12", "3.13"}, }, }, { From f2f7add306ba9f4715ac8136320a1201b5d0e264 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:09:46 +0000 Subject: [PATCH 297/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index dd1848c0..0c0bc241 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -158,7 +158,7 @@ var availableServices = []*service{ Type: "kafka", Versions: serviceVersions{ Deprecated: []string{"2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7"}, - Supported: []string{"3.2", "3.4", "3.6"}, + Supported: []string{"3.2", "3.4", "3.6", "3.7"}, }, }, { From bea92de463a0cdec07cb2d16aa7dd4f07854e94d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 08:10:49 +0000 Subject: [PATCH 298/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 51 ++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 0c0bc241..7c3301d4 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -27,13 +27,14 @@ var availablePHPExts = map[string][]string{ "apc": {"5.4"}, "apcu": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "apcu_bc": {"7.0", "7.1", "7.2", "7.3", "7.4"}, - "applepay": {"7.0", "7.1", "7.4"}, + "applepay": {"7.0", "7.1", "7.3", "7.4"}, "bcmath": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "blackfire": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "bz2": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "calendar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "ctype": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "curl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "datadog": {"8.2", "8.3"}, "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "enchant": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, @@ -47,68 +48,70 @@ var availablePHPExts = map[string][]string{ "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "gmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "gnupg": {"8.2"}, + "gnupg": {"8.2", "8.3"}, "http": {"5.4", "5.5", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "iconv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "imagick": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, + "imagick": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "interbase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "ioncube": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "ioncube": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "json": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, "ldap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "mailparse": {"7.0", "7.1", "7.2", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "mailparse": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mbstring": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mcrypt": {"5.4", "5.5", "5.6", "7.0", "7.1"}, "memcache": {"5.4", "5.5", "5.6"}, - "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mongo": {"5.4", "5.5", "5.6"}, - "mongodb": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "mongodb": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mssql": {"5.4", "5.5", "5.6"}, - "mysql": {"5.4", "5.5", "5.6"}, + "mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "newrelic": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "newrelic": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "oauth": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "openswoole": {"8.2"}, + "openswoole": {"8.2", "8.3"}, "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, - "pdo_mysql": {"5.4", "5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1"}, + "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pecl-http": {"5.6"}, "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "phpdbg": {"5.6"}, "pinba": {"5.4", "5.5", "5.6"}, "posix": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "propro": {"5.6"}, + "protobuf": {"8.1"}, "pspell": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pthreads": {"7.1"}, - "raphf": {"5.6", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "rdkafka": {"8.1", "8.2"}, + "pthreads": {"7.1", "7.2"}, + "raphf": {"5.6", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "rdkafka": {"8.1", "8.2", "8.3"}, "readline": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "recode": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3"}, "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, "simplexml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "snmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "sourceguardian": {"7.0", "7.1", "8.2", "8.3"}, + "sourceguardian": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "spplus": {"5.4", "5.5"}, "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "ssh2": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "swoole": {"8.2"}, - "sybase": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "swoole": {"8.2", "8.3"}, + "sybase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, @@ -119,13 +122,13 @@ var availablePHPExts = map[string][]string{ "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "wddx": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "xcache": {"5.4", "5.5"}, - "xdebug": {"5.5", "5.6", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "xdebug": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xhprof": {"5.4", "5.5", "5.6"}, "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "zbarcode": {"7.0", "7.1", "7.2", "7.3"}, "zendopcache": {"5.4"}, From 254e7592edd1369f403cf3715a241054d720d176 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 21 Mar 2024 09:45:53 +0100 Subject: [PATCH 299/466] Update toolbar injected HTML to prevent CSP violation fixes #446 To prevent CSP violation if inline styling is disabled I converted the SVG styling to pure attributes. Regarding the div style, it looks like it is mostly a remain of the past and has now no effect so I simply removed it. --- local/php/toolbar.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/local/php/toolbar.go b/local/php/toolbar.go index 95ca595e..1ea14f94 100644 --- a/local/php/toolbar.go +++ b/local/php/toolbar.go @@ -161,13 +161,13 @@ func (p *Server) tweakToolbar(body io.ReadCloser, env map[string]string) (io.Rea
- - + + Server
-
+
Symfony CLI` + p.appVersion + ` From bce69b999ade51b7b5de906562e9e1fb6e8cf557 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 16:11:28 +0000 Subject: [PATCH 300/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 7c3301d4..c2d0363c 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -251,8 +251,8 @@ var availableServices = []*service{ { Type: "varnish", Versions: serviceVersions{ - Deprecated: []string{"5.1", "5.2", "6.0", "7.1"}, - Supported: []string{"6.3", "7.2", "7.3"}, + Deprecated: []string{"5.1", "5.2", "6.3", "6.4", "7.1"}, + Supported: []string{"6.0", "7.2", "7.3"}, }, }, { From 26d7521ea3e73afb21d189d6deb3364195fdd1b7 Mon Sep 17 00:00:00 2001 From: Sergii Dolgushev Date: Sat, 23 Mar 2024 06:47:38 +0000 Subject: [PATCH 301/466] fix: Update docker/docker to v24.0.9 (#452) --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 330ca4b6..01bbd3d4 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v24.0.7+incompatible + github.com/docker/docker v24.0.9+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 diff --git a/go.sum b/go.sum index aa6d4675..84a5b865 100644 --- a/go.sum +++ b/go.sum @@ -19,6 +19,8 @@ github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBi github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= +github.com/docker/docker v24.0.9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= From f913653370af520952f32cd2753e188833e3bce5 Mon Sep 17 00:00:00 2001 From: Sergii Dolgushev Date: Sat, 23 Mar 2024 06:47:49 +0000 Subject: [PATCH 302/466] fix: Specify patch version in minimum go version (#453) --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 01bbd3d4..d308849f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/symfony-cli/symfony-cli -go 1.22 +go 1.22.0 require ( github.com/NYTimes/gziphandler v1.1.1 From 7f557d656388d61a1ffa3bdc03c3819571ef3705 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 23 Mar 2024 07:54:55 +0100 Subject: [PATCH 303/466] Bump deps --- envs/docker.go | 3 +- go.mod | 40 +++++++++++------- go.sum | 109 +++++++++++++++++++++++++++++++++---------------- 3 files changed, 100 insertions(+), 52 deletions(-) diff --git a/envs/docker.go b/envs/docker.go index 91166436..ee5eab42 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -34,6 +34,7 @@ import ( "time" "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" docker "github.com/docker/docker/client" "github.com/symfony-cli/terminal" ) @@ -89,7 +90,7 @@ func (l *Local) RelationshipsFromDocker() Relationships { client.NegotiateAPIVersion(context.Background()) - containers, err := client.ContainerList(context.Background(), types.ContainerListOptions{}) + containers, err := client.ContainerList(context.Background(), container.ListOptions{}) if err != nil { if docker.IsErrConnectionFailed(err) { terminal.Logger.Warn().Msg(err.Error()) diff --git a/go.mod b/go.mod index d308849f..b610a361 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v24.0.9+incompatible + github.com/docker/docker v26.0.0+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 @@ -19,8 +19,8 @@ require ( github.com/pkg/errors v0.9.1 github.com/rjeczalik/notify v0.9.3 github.com/rs/xid v1.5.0 - github.com/rs/zerolog v1.31.0 - github.com/schollz/progressbar/v3 v3.14.1 + github.com/rs/zerolog v1.32.0 + github.com/schollz/progressbar/v3 v3.14.2 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 @@ -28,7 +28,7 @@ require ( github.com/symfony-cli/console v1.0.3 github.com/symfony-cli/phpstore v1.0.10 github.com/symfony-cli/terminal v1.0.6 - golang.org/x/sync v0.5.0 + golang.org/x/sync v0.6.0 golang.org/x/text v0.14.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 @@ -36,12 +36,15 @@ require ( require ( github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/containerd/log v0.1.0 // indirect github.com/distribution/reference v0.5.0 // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect @@ -54,25 +57,32 @@ require ( github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/rivo/uniseg v0.4.4 // indirect + github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.16.1 // indirect + golang.org/x/tools v0.19.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.1 // indirect diff --git a/go.sum b/go.sum index 84a5b865..8c04219d 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,12 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/blackfireio/osinfo v1.0.5 h1:6hlaWzfcpb87gRmznVf7wSdhysGqLRz9V/xuSdCEXrA= github.com/blackfireio/osinfo v1.0.5/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/compose-spec/compose-go v1.20.2 h1:u/yfZHn4EaHGdidrZycWpxXgFffjYULlTbRfJ51ykjQ= github.com/compose-spec/compose-go v1.20.2/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -15,14 +19,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= -github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= -github.com/docker/docker v24.0.9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/docker v26.0.0+incompatible h1:Ng2qi+gdKADUa/VM+6b6YaY2nlZhk/lVJiKR/2bMudU= +github.com/docker/docker v26.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 h1:m62nsMU279qRD9PQSWD1l66kmkXzuYcnVJqL4XLeV2M= @@ -31,20 +31,31 @@ github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy0 github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/fabpot/local-php-security-checker/v2 v2.0.6 h1:m1znXkwzIPFkJWOnH8Fgt1mHY9hq8u+GY4AC6CPnDME= github.com/fabpot/local-php-security-checker/v2 v2.0.6/go.mod h1:bDff0jDpxt1pHsDtQ3v++cc/QuCM9K7Nq0dv65P1Ai8= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 h1:R2K7yLHPmwoTdmNuQ5Wfm0/evh/+QFdoI6EbW3OSMKw= github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76/go.mod h1:jr1MMO0KsDD+PQ57K7oJGk97TLYtbhLUOjCS577Ddm4= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru/arc/v2 v2.0.7 h1:QxkVTxwColcduO+LP7eJO56r2hFiG8zEbfAAzRv52KQ= @@ -83,6 +94,8 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= @@ -93,8 +106,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -103,8 +116,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY= github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= @@ -113,10 +126,10 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/schollz/progressbar/v3 v3.14.1 h1:VD+MJPCr4s3wdhTc7OEJ/Z3dAeBzJ7yKH/P4lC5yRTI= -github.com/schollz/progressbar/v3 v3.14.1/go.mod h1:Zc9xXneTzWXF81TGoqL71u0sBPjULtEHYtj/WVgVy8E= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/schollz/progressbar/v3 v3.14.2 h1:EducH6uNLIWsr560zSV1KrTeUb/wZGAHqyMFIEa99ks= +github.com/schollz/progressbar/v3 v3.14.2/go.mod h1:aQAZQnhF4JGFtRJiw/eobaXpsqpVQAftEQ+hLGXaRc4= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -147,29 +160,45 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= 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.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= -golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +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/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/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= @@ -179,12 +208,12 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= 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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -195,12 +224,20 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= +google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= +google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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= From 369acf8eef92882d86213b04782c95bfe4125d57 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 23 Mar 2024 07:57:53 +0100 Subject: [PATCH 304/466] Fix CS --- envs/envs.go | 2 +- envs/local_tunnel.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/envs/envs.go b/envs/envs.go index 7d597b79..b8832353 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -188,7 +188,7 @@ func extractRelationshipsEnvs(env Environment) Envs { if v, ok := endpoint["version"]; ok { values[versionKey] = v.(string) - if matches := regexp.MustCompile("^\\d:(\\d+\\.\\d+\\.\\d+).maria").FindStringSubmatch(values[versionKey]); matches != nil { + if matches := regexp.MustCompile(`^\d:(\d+\.\d+\.\d+).maria`).FindStringSubmatch(values[versionKey]); matches != nil { values[versionKey] = fmt.Sprintf("%s-MariaDB", matches[1]) } } diff --git a/envs/local_tunnel.go b/envs/local_tunnel.go index cb43ad66..3a93ae0e 100644 --- a/envs/local_tunnel.go +++ b/envs/local_tunnel.go @@ -98,7 +98,7 @@ func (l *Local) relationshipsFromTunnel() Relationships { return nil } -var pathCleaningRegex = regexp.MustCompile("[^a-zA-Z0-9-\\.]+") +var pathCleaningRegex = regexp.MustCompile(`[^a-zA-Z0-9-\.]+`) type Tunnel struct { Project *platformsh.Project From b74e7e5d674c8e7092bde08c87e517dfcf1b647f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 23 Mar 2024 07:59:46 +0100 Subject: [PATCH 305/466] Simplify code --- envs/local.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/envs/local.go b/envs/local.go index 2eee8089..c16230ef 100644 --- a/envs/local.go +++ b/envs/local.go @@ -259,15 +259,11 @@ func (l *Local) webServer() Envs { host := fmt.Sprintf("127.0.0.1:%s", port) if proxyConf, err := proxy.Load(util.GetHomeDir()); err == nil { - for _, domain := range proxyConf.GetDomains(l.Dir) { - // we get the first one only - host = domain - if pidFile.Scheme == "http" { - port = "80" - } else { - port = "443" - } - break + host = proxyConf.GetDomains(l.Dir)[0] + if pidFile.Scheme == "http" { + port = "80" + } else { + port = "443" } } From 8a653da78c35b265e9f91204f1d288ce7225b6f8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 23 Mar 2024 08:06:35 +0100 Subject: [PATCH 306/466] Fix CS --- commands/init_templating_php.go | 16 ++++------------ commands/local_new.go | 10 +++++----- commands/local_proxy_url.go | 2 +- commands/openers.go | 10 ---------- commands/testdata/project/.upsun/config.yaml | 4 ---- 5 files changed, 10 insertions(+), 32 deletions(-) diff --git a/commands/init_templating_php.go b/commands/init_templating_php.go index 595449cc..6e43494a 100644 --- a/commands/init_templating_php.go +++ b/commands/init_templating_php.go @@ -60,12 +60,8 @@ func hasComposerPackage(directory, pkg string) bool { return false } - if err != nil { - terminal.Logger.Warn().Msg(err.Error()) - } - if err2 != nil { - terminal.Logger.Warn().Msg(err2.Error()) - } + terminal.Logger.Warn().Msg(err.Error()) + terminal.Logger.Warn().Msg(err2.Error()) return false } @@ -136,12 +132,8 @@ func hasPHPExtension(directory, ext string) bool { return false } - if err != nil { - terminal.Logger.Warn().Msg(err.Error()) - } - if err2 != nil { - terminal.Logger.Warn().Msg(err2.Error()) - } + terminal.Logger.Warn().Msg(err.Error()) + terminal.Logger.Warn().Msg(err2.Error()) return false } diff --git a/commands/local_new.go b/commands/local_new.go index a187a462..200c193f 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -153,7 +153,7 @@ var localNewCmd = &console.Command{ return err } - if "" != c.String("php") && !withCloud { + if c.String("php") != "" && !withCloud { if err := createPhpVersionFile(c.String("php"), dir); err != nil { return err } @@ -161,7 +161,7 @@ var localNewCmd = &console.Command{ if !c.Bool("no-git") { if _, err := exec.LookPath("git"); err == nil { - if err := initProjectGit(c, s, dir); err != nil { + if err := initProjectGit(c, dir); err != nil { return err } } @@ -197,7 +197,7 @@ var localNewCmd = &console.Command{ if c.Bool("upsun") { brand = platformsh.UpsunBrand } - if err := initCloud(c, brand, s, minorPHPVersion, dir); err != nil { + if err := initCloud(c, brand, minorPHPVersion, dir); err != nil { return err } } @@ -226,7 +226,7 @@ func isEmpty(dir string) (bool, error) { return false, err } -func initCloud(c *console.Context, brand platformsh.CloudBrand, s *terminal.Spinner, minorPHPVersion, dir string) error { +func initCloud(c *console.Context, brand platformsh.CloudBrand, minorPHPVersion, dir string) error { terminal.Printfln("* Adding %s configuration", brand) cloudServices, err := parseCloudServices(dir, c.StringSlice("service")) @@ -335,7 +335,7 @@ func parseDockerComposeServices(dir string) []*CloudService { return cloudServices } -func initProjectGit(c *console.Context, s *terminal.Spinner, dir string) error { +func initProjectGit(c *console.Context, dir string) error { terminal.Println("* Setting up the project under Git version control") terminal.Printfln(" (running git init %s)\n", dir) // Only force the branch to be "main" when running a Cloud context to make diff --git a/commands/local_proxy_url.go b/commands/local_proxy_url.go index c89f0233..3da02596 100644 --- a/commands/local_proxy_url.go +++ b/commands/local_proxy_url.go @@ -45,7 +45,7 @@ e.g. with Cypress: Action: func(c *console.Context) error { pidFile := pid.New("__proxy__", nil) if !pidFile.IsRunning() { - return errors.New("The proxy server is not running") + return errors.New("the proxy server is not running") } url := fmt.Sprintf("%s://127.0.0.1:%d", pidFile.Scheme, pidFile.Port) diff --git a/commands/openers.go b/commands/openers.go index 7e51e8a3..3607e5d1 100644 --- a/commands/openers.go +++ b/commands/openers.go @@ -32,16 +32,6 @@ import ( "github.com/symfony-cli/terminal" ) -var openDocCmd = &console.Command{ - Category: "open", - Name: "docs", - Usage: "Open the online Web documentation", - Action: func(c *console.Context) error { - abstractOpenCmd("https://symfony.com/doc/cloud") - return nil - }, -} - var projectLocalOpenCmd = &console.Command{ Category: "open", Name: "local", diff --git a/commands/testdata/project/.upsun/config.yaml b/commands/testdata/project/.upsun/config.yaml index b88a2e09..d29f4321 100644 --- a/commands/testdata/project/.upsun/config.yaml +++ b/commands/testdata/project/.upsun/config.yaml @@ -21,10 +21,6 @@ applications: type: php:8.0 - dependencies: - php: - composer/composer: "^2" - runtime: extensions: - apcu From fc1c4a163ca537c2f2dd16b672c4f4e30fa0fe34 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 23 Mar 2024 08:23:18 +0100 Subject: [PATCH 307/466] Bump Github action versions --- .github/workflows/releaser.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 362a0c2f..922008c1 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -19,13 +19,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # We need QEMU to use buildx and be able to build ARM Docker images - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Login into Github Docker Registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin @@ -33,10 +33,10 @@ jobs: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: '^1.22.0' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/.cache/go-build @@ -71,10 +71,10 @@ jobs: run: go run . - name: Set up cosign - uses: sigstore/cosign-installer@v2.7.0 + uses: sigstore/cosign-installer@v3 - name: Run GoReleaser for snapshot - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v5 # only for PRs and push on branches if: ${{ !startsWith(github.ref, 'refs/tags/v') }} with: @@ -84,7 +84,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v5 # only for tags if: startsWith(github.ref, 'refs/tags/v') with: From 353644a4ad009a5189fff096114e5eeee5632b02 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 23 Mar 2024 08:32:17 +0100 Subject: [PATCH 308/466] Fix cosign --- .goreleaser.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index fa9f7f64..8f4b92b6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -71,14 +71,13 @@ universal_binaries: # https://goreleaser.com/customization/sign signs: - cmd: cosign - env: - - COSIGN_EXPERIMENTAL=1 certificate: '${artifact}.pem' args: - sign-blob - '--output-certificate=${certificate}' - '--output-signature=${signature}' - '${artifact}' + - "--yes" artifacts: all output: true From 0f5a29199c1558731274937d36c19c55d322c684 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 23 Mar 2024 11:18:23 +0100 Subject: [PATCH 309/466] Revert "Simplify code" This reverts commit b74e7e5d674c8e7092bde08c87e517dfcf1b647f. We don't always have domains configured here. fixes #456 --- envs/local.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/envs/local.go b/envs/local.go index c16230ef..2eee8089 100644 --- a/envs/local.go +++ b/envs/local.go @@ -259,11 +259,15 @@ func (l *Local) webServer() Envs { host := fmt.Sprintf("127.0.0.1:%s", port) if proxyConf, err := proxy.Load(util.GetHomeDir()); err == nil { - host = proxyConf.GetDomains(l.Dir)[0] - if pidFile.Scheme == "http" { - port = "80" - } else { - port = "443" + for _, domain := range proxyConf.GetDomains(l.Dir) { + // we get the first one only + host = domain + if pidFile.Scheme == "http" { + port = "80" + } else { + port = "443" + } + break } } From fa0a126d9bad65a176baa9d340f278c3cd588594 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sat, 6 Apr 2024 02:29:11 +0200 Subject: [PATCH 310/466] Add `--no-workers` option --- commands/local_server_start.go | 3 ++- local/project/config.go | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index eee631ec..a3af3fdd 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -80,6 +80,7 @@ var localServerStartCmd = &console.Command{ // from the console argument. EnvVars: []string{"SSLKEYLOGFILE"}, }, + &console.BoolFlag{Name: "no-workers", Usage: "Do not start workers"}, }, Action: func(c *console.Context) error { ui := terminal.SymfonyStyle(terminal.Stdout, terminal.Stdin) @@ -308,7 +309,7 @@ var localServerStartCmd = &console.Command{ go tailer.Tail(terminal.Stderr) } - if fileConfig != nil { + if fileConfig != nil && !config.NoWorkers { reexec.NotifyForeground("workers") _, isDockerComposeWorkerConfigured := fileConfig.Workers[project.DockerComposeWorkerKey] diff --git a/local/project/config.go b/local/project/config.go index 6a003e56..0ea217bf 100644 --- a/local/project/config.go +++ b/local/project/config.go @@ -47,6 +47,7 @@ type Config struct { Daemon bool `yaml:"daemon"` UseGzip bool `yaml:"use_gzip"` TlsKeyLogFile string `yaml:"tls_key_log_file"` + NoWorkers bool `yaml:"no_workers"` } type FileConfig struct { @@ -112,6 +113,9 @@ func NewConfigFromContext(c *console.Context, projectDir string) (*Config, *File if c.IsSet("tls-key-log-file") { config.TlsKeyLogFile = c.String("tls-key-log-file") } + if c.IsSet("no-workers") { + config.NoWorkers = c.Bool("no-workers") + } return config, fileConfig, nil } From c80318bb303a1908d390f8b76eebac8f0bb90aa8 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sat, 6 Apr 2024 02:46:10 +0200 Subject: [PATCH 311/466] Ignore generated binary --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c9b8625e..f485b1cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /dist /vendor +symfony-cli From c0800b301b9d1cc78a5fa39cf8f4ad4fc9481f20 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 08:10:51 +0000 Subject: [PATCH 312/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index c2d0363c..218b3567 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -76,6 +76,7 @@ var availablePHPExts = map[string][]string{ "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "openswoole": {"8.2", "8.3"}, + "opentelemetry": {"8.2", "8.3"}, "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1"}, @@ -128,7 +129,7 @@ var availablePHPExts = map[string][]string{ "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, + "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "zbarcode": {"7.0", "7.1", "7.2", "7.3"}, "zendopcache": {"5.4"}, From 4759fa94b4a755f71cd26114f9e14a80a27b7890 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 14 Apr 2024 09:24:58 +0200 Subject: [PATCH 313/466] Bump deps --- go.mod | 34 ++++++++++---------- go.sum | 98 ++++++++++++++++++++++++++++------------------------------ 2 files changed, 65 insertions(+), 67 deletions(-) diff --git a/go.mod b/go.mod index b610a361..4ef8b454 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v26.0.0+incompatible + github.com/docker/docker v26.0.1+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 @@ -26,9 +26,9 @@ require ( github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.5 github.com/symfony-cli/console v1.0.3 - github.com/symfony-cli/phpstore v1.0.10 + github.com/symfony-cli/phpstore v1.0.11 github.com/symfony-cli/terminal v1.0.6 - golang.org/x/sync v0.6.0 + golang.org/x/sync v0.7.0 golang.org/x/text v0.14.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 @@ -37,7 +37,7 @@ require ( require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/containerd/log v0.1.0 // indirect - github.com/distribution/reference v0.5.0 // indirect + github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -69,20 +69,20 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 // indirect - golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.22.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.19.0 // indirect + golang.org/x/tools v0.20.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.1 // indirect diff --git a/go.sum b/go.sum index 8c04219d..a55cb490 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/blackfireio/osinfo v1.0.5 h1:6hlaWzfcpb87gRmznVf7wSdhysGqLRz9V/xuSdCEXrA= github.com/blackfireio/osinfo v1.0.5/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/compose-spec/compose-go v1.20.2 h1:u/yfZHn4EaHGdidrZycWpxXgFffjYULlTbRfJ51ykjQ= github.com/compose-spec/compose-go v1.20.2/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= @@ -17,10 +17,10 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= -github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v26.0.0+incompatible h1:Ng2qi+gdKADUa/VM+6b6YaY2nlZhk/lVJiKR/2bMudU= -github.com/docker/docker v26.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v26.0.1+incompatible h1:t39Hm6lpXuXtgkF0dm1t9a5HkbUfdGy6XbWexmGr+hA= +github.com/docker/docker v26.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -46,8 +46,6 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -141,14 +139,14 @@ github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081/go.mod h1:mXF6uSY github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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/symfony-cli/cert v1.0.5 h1:U0H97eRf4bMhlD2WWB42fuapQ/wImqZVHP+PW2z5T1c= github.com/symfony-cli/cert v1.0.5/go.mod h1:9axy74P/rAP0Jia6JFfqst26tn2h2U0JCJj288t8iuc= github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= -github.com/symfony-cli/phpstore v1.0.10 h1:KEgMYIhxHMex1zxt9Tzxpfy5zWXZ3207DWhJrIU6VGE= -github.com/symfony-cli/phpstore v1.0.10/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= +github.com/symfony-cli/phpstore v1.0.11 h1:33aTDnFeNtA/xAaGpcvejeYC8AwPSy/6r06GAcU989M= +github.com/symfony-cli/phpstore v1.0.11/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.6 h1:DFjJULx0QZ8ojOahf/NnLkRtt0EaIkdVWRMHstFWtpE= github.com/symfony-cli/terminal v1.0.6/go.mod h1:ehBd2bz31MHHQgy4qPb9vAGFtnxOazUhAO77GEd1vAM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -160,45 +158,45 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 h1:cEPbyTSEHlQR89XVlyo78gqluF8Y3oMeBkXGWzQsfXY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0/go.mod h1:DKdbWcT4GH1D0Y3Sqt/PFXt2naRKDWtU+eE6oLdFNA8= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= 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.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -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/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 h1:ESSUROHIBHg7USnszlcdmjBEwdMj9VUvU+OPk4yl2mc= +golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/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= @@ -209,11 +207,11 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= 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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -224,20 +222,20 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= -google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= -google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= -google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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= From 33258caf9da34deef701ebdc4d8f050fa0279c94 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 15 Apr 2024 08:58:31 +0200 Subject: [PATCH 314/466] ci: cleanup config for less maintenance `actions/setup-go` can directly read go version from `go.mod`. also it already caches go modules and build outputs --- .github/workflows/go_generate_update.yml | 12 ++---------- .github/workflows/releaser.yml | 10 +--------- go.mod | 2 +- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/go_generate_update.yml b/.github/workflows/go_generate_update.yml index 69e18ca9..bdef08a6 100644 --- a/.github/workflows/go_generate_update.yml +++ b/.github/workflows/go_generate_update.yml @@ -15,17 +15,9 @@ jobs: uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: '^1.22.0' - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version-file: 'go.mod' - name: Prepare run: | diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 922008c1..063d82ac 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -35,15 +35,7 @@ jobs: name: Set up Go uses: actions/setup-go@v5 with: - go-version: '^1.22.0' - - uses: actions/cache@v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version-file: 'go.mod' - name: Set AUTOUPDATE_CHANNEL on tags run: echo "AUTOUPDATE_CHANNEL=stable" >> $GITHUB_ENV diff --git a/go.mod b/go.mod index 4ef8b454..d2d8204c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/symfony-cli/symfony-cli -go 1.22.0 +go 1.22.2 require ( github.com/NYTimes/gziphandler v1.1.1 From 78cc7f28daac1dd532b43aebdb65675849ab3336 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 15 Apr 2024 09:05:17 +0200 Subject: [PATCH 315/466] ci: upgrade actions/upload-artifact to fix Node.js 16 deprecation warning --- .github/workflows/releaser.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 922008c1..4a99eb69 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -95,14 +95,14 @@ jobs: TAP_GITHUB_TOKEN: ${{ secrets.GH_PAT }} - name: Archive binaries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: retention-days: 5 name: binaries path: dist - name: Archive Linux binary - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: retention-days: 5 name: linux-binary From 29e90532d3fc29cead3dd49a0a1c008792c1f3e1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 08:10:45 +0000 Subject: [PATCH 316/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 218b3567..77eb0ea0 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -190,7 +190,7 @@ var availableServices = []*service{ Type: "mongodb-enterprise", Versions: serviceVersions{ Deprecated: []string{"4.0"}, - Supported: []string{"4.2", "4.4", "5.0", "6.0"}, + Supported: []string{"4.2", "4.4", "5.0", "6.0", "7.0"}, }, }, { From 0637c3d157d01b795c84595e8246454acb0e3532 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 21 Apr 2024 17:37:33 +0200 Subject: [PATCH 317/466] Add available versions for the book --- book/clone.go | 44 +++++++++++++++++++++++++++++++++++++++++++ commands/local_new.go | 10 +++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/book/clone.go b/book/clone.go index 84f3c116..173be0a2 100644 --- a/book/clone.go +++ b/book/clone.go @@ -20,9 +20,12 @@ package book import ( + "encoding/json" "fmt" + "net/http" "os" "os/exec" + "strings" "github.com/pkg/errors" "github.com/symfony-cli/terminal" @@ -41,6 +44,25 @@ func (b *Book) Clone(version string) error { } ui.Section("Cloning the Repository") + + // check that version exists on Github via the API + resp, err := http.Get(fmt.Sprintf("https://api.github.com/repos/the-fast-track/book-%s", version)) + if err != nil { + return errors.Wrap(err, "unable to get version on Github") + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + versions, err := Versions() + if err != nil { + return errors.Wrap(err, "unable to get book versions") + } + terminal.Println("The version you requested does not exist; available versions:") + for _, v := range versions { + terminal.Println(fmt.Sprintf(" - %s", v)) + } + return errors.New("please choose a valid version") + } + cmd := exec.Command("git", "clone", fmt.Sprintf("https://github.com/the-fast-track/book-%s", version), b.Dir) cmd.Env = os.Environ() cmd.Stdout = os.Stdout @@ -63,3 +85,25 @@ func (b *Book) Clone(version string) error { } return nil } + +func Versions() ([]string, error) { + resp, err := http.Get("https://api.github.com/orgs/the-fast-track/repos") + if err != nil { + return nil, errors.Wrap(err, "unable to get repositories from Github") + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return nil, errors.New("failed to get repositories from Github") + } + var repos []struct { + Name string `json:"name"` + } + if err := json.NewDecoder(resp.Body).Decode(&repos); err != nil { + return nil, errors.Wrap(err, "failed to decode response body") + } + versions := []string{} + for _, repo := range repos { + versions = append(versions, strings.Replace(repo.Name, "book-", "", 1)) + } + return versions, nil +} diff --git a/commands/local_new.go b/commands/local_new.go index 200c193f..28856244 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -113,7 +113,15 @@ var localNewCmd = &console.Command{ if c.Bool("book") { if symfonyVersion == "" { - return console.Exit("The --version flag is required for the Symfony book", 1) + versions, err := book.Versions() + if err != nil { + return errors.Wrap(err, "unable to get book versions") + } + terminal.Println("The --version flag is required for the Symfony book; available versions:") + for _, v := range versions { + terminal.Println(fmt.Sprintf(" - %s", v)) + } + return console.Exit("", 1) } book := &book.Book{ From 3ca0b9dd72d01b1100b3a9343245601fef046338 Mon Sep 17 00:00:00 2001 From: Sergii Dolgushev Date: Tue, 23 Apr 2024 07:18:51 +0100 Subject: [PATCH 318/466] Upgraded github.com/docker/docker to fix CVE-2024-32473 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index d2d8204c..48cc936f 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v26.0.1+incompatible + github.com/docker/docker v26.0.2+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 diff --git a/go.sum b/go.sum index a55cb490..98571ab4 100644 --- a/go.sum +++ b/go.sum @@ -21,6 +21,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/docker v26.0.1+incompatible h1:t39Hm6lpXuXtgkF0dm1t9a5HkbUfdGy6XbWexmGr+hA= github.com/docker/docker v26.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.0.2+incompatible h1:yGVmKUFGgcxA6PXWAokO0sQL22BrQ67cgVjko8tGdXE= +github.com/docker/docker v26.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= From e5a4383f646287ace2802b81bc26eff8cdbe65af Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 23 Apr 2024 10:30:00 +0200 Subject: [PATCH 319/466] Bump deps --- go.mod | 12 +++++------- go.sum | 26 ++++++++++---------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index 48cc936f..f5ad9910 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v26.0.2+incompatible + github.com/docker/docker v26.1.0+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 @@ -25,7 +25,7 @@ require ( github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.5 - github.com/symfony-cli/console v1.0.3 + github.com/symfony-cli/console v1.0.4 github.com/symfony-cli/phpstore v1.0.11 github.com/symfony-cli/terminal v1.0.6 golang.org/x/sync v0.7.0 @@ -35,13 +35,13 @@ require ( ) require ( - github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/agext/levenshtein v1.2.3 // indirect github.com/containerd/log v0.1.0 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -76,13 +76,11 @@ require ( go.opentelemetry.io/otel/sdk v1.25.0 // indirect go.opentelemetry.io/otel/trace v1.25.0 // indirect golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect golang.org/x/net v0.24.0 // indirect golang.org/x/sys v0.19.0 // indirect golang.org/x/term v0.19.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.20.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.1 // indirect diff --git a/go.sum b/go.sum index 98571ab4..280e6e5b 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,11 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= +github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/blackfireio/osinfo v1.0.5 h1:6hlaWzfcpb87gRmznVf7wSdhysGqLRz9V/xuSdCEXrA= github.com/blackfireio/osinfo v1.0.5/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= @@ -19,10 +21,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v26.0.1+incompatible h1:t39Hm6lpXuXtgkF0dm1t9a5HkbUfdGy6XbWexmGr+hA= -github.com/docker/docker v26.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v26.0.2+incompatible h1:yGVmKUFGgcxA6PXWAokO0sQL22BrQ67cgVjko8tGdXE= -github.com/docker/docker v26.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM= +github.com/docker/docker v26.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -35,8 +35,6 @@ github.com/fabpot/local-php-security-checker/v2 v2.0.6 h1:m1znXkwzIPFkJWOnH8Fgt1 github.com/fabpot/local-php-security-checker/v2 v2.0.6/go.mod h1:bDff0jDpxt1pHsDtQ3v++cc/QuCM9K7Nq0dv65P1Ai8= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76 h1:R2K7yLHPmwoTdmNuQ5Wfm0/evh/+QFdoI6EbW3OSMKw= -github.com/ferhatelmas/levenshtein v0.0.0-20160518143259-a12aecc52d76/go.mod h1:jr1MMO0KsDD+PQ57K7oJGk97TLYtbhLUOjCS577Ddm4= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= @@ -145,8 +143,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/symfony-cli/cert v1.0.5 h1:U0H97eRf4bMhlD2WWB42fuapQ/wImqZVHP+PW2z5T1c= github.com/symfony-cli/cert v1.0.5/go.mod h1:9axy74P/rAP0Jia6JFfqst26tn2h2U0JCJj288t8iuc= -github.com/symfony-cli/console v1.0.3 h1:iQli0SgvfW7v5DjH2dc36UpLKVM+OCxoWA5XU/ZGaa0= -github.com/symfony-cli/console v1.0.3/go.mod h1:z2dLSNdPW3rWdSxj8DlZocMtMYN5EF6OeIYjVioXVqE= +github.com/symfony-cli/console v1.0.4 h1:IPgT2R2jn8WrInJ3qJ4LOSoz8Awxz8AFnlBeWWegCcw= +github.com/symfony-cli/console v1.0.4/go.mod h1:Jz4c7ozPC0vjzuP2KVt5W07137r0UU5U8bMwQxljEd0= github.com/symfony-cli/phpstore v1.0.11 h1:33aTDnFeNtA/xAaGpcvejeYC8AwPSy/6r06GAcU989M= github.com/symfony-cli/phpstore v1.0.11/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= github.com/symfony-cli/terminal v1.0.6 h1:DFjJULx0QZ8ojOahf/NnLkRtt0EaIkdVWRMHstFWtpE= @@ -181,12 +179,10 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 h1:ESSUROHIBHg7USnszlcdmjBEwdMj9VUvU+OPk4yl2mc= -golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -224,8 +220,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= 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= From edb9d389d8d89988cd7727f0fa73a2e2daa065da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 14:38:57 +0000 Subject: [PATCH 320/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 77eb0ea0..83452197 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -65,7 +65,7 @@ var availablePHPExts = map[string][]string{ "memcache": {"5.4", "5.5", "5.6"}, "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mongo": {"5.4", "5.5", "5.6"}, - "mongodb": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "mongodb": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mssql": {"5.4", "5.5", "5.6"}, "mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, @@ -78,11 +78,11 @@ var availablePHPExts = map[string][]string{ "openswoole": {"8.2", "8.3"}, "opentelemetry": {"8.2", "8.3"}, "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1"}, "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, - "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pdo_sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pecl-http": {"5.6"}, @@ -100,7 +100,7 @@ var availablePHPExts = map[string][]string{ "readline": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "recode": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3"}, "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, + "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "simplexml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "snmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, @@ -116,7 +116,7 @@ var availablePHPExts = map[string][]string{ "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "tideways": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "tideways": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "tideways_xhprof": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "tidy": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, @@ -127,9 +127,9 @@ var availablePHPExts = map[string][]string{ "xhprof": {"5.4", "5.5", "5.6"}, "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, + "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "zbarcode": {"7.0", "7.1", "7.2", "7.3"}, "zendopcache": {"5.4"}, From 82567e28799bae452afb63a120bb4a9f5e72edc3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:10:17 +0000 Subject: [PATCH 321/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 83452197..667fa0e2 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -231,8 +231,8 @@ var availableServices = []*service{ { Type: "rabbitmq", Versions: serviceVersions{ - Deprecated: []string{"3.5", "3.6", "3.7", "3.8", "3.9", "3.10"}, - Supported: []string{"3.11", "3.12", "3.13"}, + Deprecated: []string{"3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"}, + Supported: []string{"3.12", "3.13"}, }, }, { From 103cca8b6129f1eb2eccd4890326f8105cea1e3e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 5 May 2024 08:20:22 +0200 Subject: [PATCH 322/466] Remove DB volume when switching the book to another step --- book/checkout.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/book/checkout.go b/book/checkout.go index 1bbd1a6f..33c6b507 100644 --- a/book/checkout.go +++ b/book/checkout.go @@ -65,8 +65,6 @@ func (b *Book) Checkout(step string) error { terminal.Println("[ OK ]") } - // FIXME: SQL dump? - if !b.Force && !b.AutoConfirm && !terminal.AskConfirmation("WARNING All current code, data, and containers are going to be REMOVED, do you confirm?", true) { return nil } @@ -111,7 +109,7 @@ func (b *Book) Checkout(step string) error { } } if hasDocker { - if err := executeCommand(append(dockerComposeBin(), "down", "--remove-orphans"), b.Debug, false, nil); err != nil { + if err := executeCommand(append(dockerComposeBin(), "down", "--remove-orphans", "--volume"), b.Debug, false, nil); err != nil { return err } } else { From 1f198e2c6e8275ef574d5f98d712f8a7d3afcee2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 5 May 2024 08:32:36 +0200 Subject: [PATCH 323/466] Add missing iconv dep for the book --- book/reqs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/book/reqs.go b/book/reqs.go index f3f119b8..71347dce 100644 --- a/book/reqs.go +++ b/book/reqs.go @@ -88,6 +88,7 @@ func CheckRequirements() (bool, error) { // PHP extensions if v != nil { exts := map[string]string{ + "iconv": "required", "json": "required", "session": "required", "ctype": "required", From 52409011148165d35c5fa63f7c5e2a28d839f5d8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 5 May 2024 08:35:04 +0200 Subject: [PATCH 324/466] Bump deps --- go.mod | 18 +++++++++--------- go.sum | 52 ++++++++++++++++++++++++++-------------------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/go.mod b/go.mod index f5ad9910..12f0f53f 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v26.1.0+incompatible + github.com/docker/docker v26.1.1+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 github.com/fabpot/local-php-security-checker/v2 v2.0.6 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 @@ -29,7 +29,7 @@ require ( github.com/symfony-cli/phpstore v1.0.11 github.com/symfony-cli/terminal v1.0.6 golang.org/x/sync v0.7.0 - golang.org/x/text v0.14.0 + golang.org/x/text v0.15.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) @@ -69,16 +69,16 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 // indirect - go.opentelemetry.io/otel v1.25.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect - go.opentelemetry.io/otel/metric v1.25.0 // indirect - go.opentelemetry.io/otel/sdk v1.25.0 // indirect - go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect + go.opentelemetry.io/otel v1.26.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect + go.opentelemetry.io/otel/metric v1.26.0 // indirect + go.opentelemetry.io/otel/sdk v1.26.0 // indirect + go.opentelemetry.io/otel/trace v1.26.0 // indirect golang.org/x/crypto v0.22.0 // indirect golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect + golang.org/x/sys v0.20.0 // indirect golang.org/x/term v0.19.0 // indirect golang.org/x/time v0.5.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect diff --git a/go.sum b/go.sum index 280e6e5b..41bc9b78 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM= -github.com/docker/docker v26.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.1+incompatible h1:oI+4kkAgIwwb54b9OC7Xc3hSgu1RlJA/Lln/DF72djQ= +github.com/docker/docker v26.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -52,8 +52,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru/arc/v2 v2.0.7 h1:QxkVTxwColcduO+LP7eJO56r2hFiG8zEbfAAzRv52KQ= @@ -158,22 +158,22 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 h1:cEPbyTSEHlQR89XVlyo78gqluF8Y3oMeBkXGWzQsfXY= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0/go.mod h1:DKdbWcT4GH1D0Y3Sqt/PFXt2naRKDWtU+eE6oLdFNA8= -go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= -go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= -go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= -go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= -go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= -go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= -go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= -go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= -go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= -go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= +go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= +go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= +go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= +go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= +go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= +go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= +go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= 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= @@ -205,15 +205,15 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= 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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -228,8 +228,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1: google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= -google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From a2228df040d895ea8d3dabd9c2abb4dac030287d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 5 May 2024 09:07:40 +0200 Subject: [PATCH 325/466] Bump deps --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 12f0f53f..ccd44180 100644 --- a/go.mod +++ b/go.mod @@ -24,10 +24,10 @@ require ( github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 - github.com/symfony-cli/cert v1.0.5 - github.com/symfony-cli/console v1.0.4 - github.com/symfony-cli/phpstore v1.0.11 - github.com/symfony-cli/terminal v1.0.6 + github.com/symfony-cli/cert v1.0.6 + github.com/symfony-cli/console v1.0.5 + github.com/symfony-cli/phpstore v1.0.12 + github.com/symfony-cli/terminal v1.0.7 golang.org/x/sync v0.7.0 golang.org/x/text v0.15.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c diff --git a/go.sum b/go.sum index 41bc9b78..9aea368b 100644 --- a/go.sum +++ b/go.sum @@ -141,14 +141,14 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/symfony-cli/cert v1.0.5 h1:U0H97eRf4bMhlD2WWB42fuapQ/wImqZVHP+PW2z5T1c= -github.com/symfony-cli/cert v1.0.5/go.mod h1:9axy74P/rAP0Jia6JFfqst26tn2h2U0JCJj288t8iuc= -github.com/symfony-cli/console v1.0.4 h1:IPgT2R2jn8WrInJ3qJ4LOSoz8Awxz8AFnlBeWWegCcw= -github.com/symfony-cli/console v1.0.4/go.mod h1:Jz4c7ozPC0vjzuP2KVt5W07137r0UU5U8bMwQxljEd0= -github.com/symfony-cli/phpstore v1.0.11 h1:33aTDnFeNtA/xAaGpcvejeYC8AwPSy/6r06GAcU989M= -github.com/symfony-cli/phpstore v1.0.11/go.mod h1:Pug4pGst4b5DcGUwYz2DB1LjltohPgvE4OusDe1z2Xg= -github.com/symfony-cli/terminal v1.0.6 h1:DFjJULx0QZ8ojOahf/NnLkRtt0EaIkdVWRMHstFWtpE= -github.com/symfony-cli/terminal v1.0.6/go.mod h1:ehBd2bz31MHHQgy4qPb9vAGFtnxOazUhAO77GEd1vAM= +github.com/symfony-cli/cert v1.0.6 h1:FKdNRhKSxc+IcOkSRYvcOjr4jyZxGHiNS0xCN0uXZQI= +github.com/symfony-cli/cert v1.0.6/go.mod h1:7Lt0uwi9z6DYTwLQeKsdPrsTqvTZRTqdlVSDJJqKUVo= +github.com/symfony-cli/console v1.0.5 h1:qGGHzL9TXPNolkJ9EmuW9oK4jjkjpJ/phrbo6EONqcY= +github.com/symfony-cli/console v1.0.5/go.mod h1:rdalWAL8hb/F8c++01Bx+FSYkhhKQ4l/kxjTZN6f7tU= +github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA= +github.com/symfony-cli/phpstore v1.0.12/go.mod h1:U29bdJBPs9p28PzLIRKfKfKkaiH0kacdyufl3eSB1d4= +github.com/symfony-cli/terminal v1.0.7 h1:57L9PUTE2cHfQtP8Ti8dyiiPEYlQ1NBIDpMJ3RPEGPc= +github.com/symfony-cli/terminal v1.0.7/go.mod h1:Etv22IyeGiMoIQPPj51hX31j7xuYl1njyuAFkrvybqU= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= From e07e94fc8293500f8044dd386c448861ff6ee555 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 8 May 2024 21:40:42 +0200 Subject: [PATCH 326/466] Bump deps --- commands/local_check_security.go | 2 +- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/commands/local_check_security.go b/commands/local_check_security.go index 8c88775b..0622972b 100644 --- a/commands/local_check_security.go +++ b/commands/local_check_security.go @@ -23,7 +23,7 @@ a specific "composer.lock" file.`, &console.StringFlag{ Name: "format", DefaultValue: "ansi", - Usage: "The output format (ansi, markdown, json, junit, or yaml)", + Usage: "The output format (ansi, text, markdown, json, junit, or yaml)", Validator: func(ctx *console.Context, format string) error { if format != "" && format != "markdown" && format != "json" && format != "yaml" && format != "ansi" && format != "junit" { return errors.Errorf(`format "%s" does not exist (supported formats: markdown, ansi, json, junit, and yaml)`, format) diff --git a/go.mod b/go.mod index ccd44180..64fc8a23 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/compose-spec/compose-go v1.20.2 github.com/docker/docker v26.1.1+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 - github.com/fabpot/local-php-security-checker/v2 v2.0.6 + github.com/fabpot/local-php-security-checker/v2 v2.1.1 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru/arc/v2 v2.0.7 @@ -75,11 +75,11 @@ require ( go.opentelemetry.io/otel/metric v1.26.0 // indirect go.opentelemetry.io/otel/sdk v1.26.0 // indirect go.opentelemetry.io/otel/trace v1.26.0 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.19.0 // indirect + golang.org/x/term v0.20.0 // indirect golang.org/x/time v0.5.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 9aea368b..38d0c8b2 100644 --- a/go.sum +++ b/go.sum @@ -31,8 +31,8 @@ github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 h1:m62nsMU279qRD9P github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= -github.com/fabpot/local-php-security-checker/v2 v2.0.6 h1:m1znXkwzIPFkJWOnH8Fgt1mHY9hq8u+GY4AC6CPnDME= -github.com/fabpot/local-php-security-checker/v2 v2.0.6/go.mod h1:bDff0jDpxt1pHsDtQ3v++cc/QuCM9K7Nq0dv65P1Ai8= +github.com/fabpot/local-php-security-checker/v2 v2.1.1 h1:K/Y+NEh0SQNSO/KMEK7vFc+QxdUT4aLT1/w1ZnvW1JY= +github.com/fabpot/local-php-security-checker/v2 v2.1.1/go.mod h1:t4Qk2u9Mj4ZM05X4cnwuwqrHGDKohweR8ox5rFBPBls= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= @@ -177,10 +177,10 @@ go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naR 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.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= -golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -188,8 +188,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -208,8 +208,8 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= 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.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= From a73df185307f555cd29141ea357e456cab303f3d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 8 May 2024 22:04:09 +0200 Subject: [PATCH 327/466] Bump deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 64fc8a23..8168e034 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/compose-spec/compose-go v1.20.2 github.com/docker/docker v26.1.1+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 - github.com/fabpot/local-php-security-checker/v2 v2.1.1 + github.com/fabpot/local-php-security-checker/v2 v2.1.2 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru/arc/v2 v2.0.7 diff --git a/go.sum b/go.sum index 38d0c8b2..665232cf 100644 --- a/go.sum +++ b/go.sum @@ -31,8 +31,8 @@ github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 h1:m62nsMU279qRD9P github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= -github.com/fabpot/local-php-security-checker/v2 v2.1.1 h1:K/Y+NEh0SQNSO/KMEK7vFc+QxdUT4aLT1/w1ZnvW1JY= -github.com/fabpot/local-php-security-checker/v2 v2.1.1/go.mod h1:t4Qk2u9Mj4ZM05X4cnwuwqrHGDKohweR8ox5rFBPBls= +github.com/fabpot/local-php-security-checker/v2 v2.1.2 h1:Yb7IXsYy6uojoh/gJjAhNca3yy67Bbg+6c9M9kB3FJw= +github.com/fabpot/local-php-security-checker/v2 v2.1.2/go.mod h1:t4Qk2u9Mj4ZM05X4cnwuwqrHGDKohweR8ox5rFBPBls= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= From 192427f681b71175ba0c52287300a2cd25b07e8c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 8 May 2024 22:15:29 +0200 Subject: [PATCH 328/466] Remove kill signal as it cannot be trapped --- local/runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/runner.go b/local/runner.go index b67ee30c..f7b6aa44 100644 --- a/local/runner.go +++ b/local/runner.go @@ -108,7 +108,7 @@ func (r *Runner) Run() error { cmdExitChan := make(chan error) // receives command exit status, allow to cmd.Wait() in non-blocking way restartChan := make(chan bool) // receives requests to restart the command sigChan := make(chan os.Signal, 1) - signal.Notify(sigChan, os.Kill, os.Interrupt, syscall.SIGQUIT, syscall.SIGTERM) + signal.Notify(sigChan, os.Interrupt, syscall.SIGQUIT, syscall.SIGTERM) defer signal.Stop(sigChan) if len(r.pidFile.Watched) > 0 { From 2c8f3bc5f81cf06b3cd06ec32fe931a3c7447a21 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 8 May 2024 22:03:10 +0200 Subject: [PATCH 329/466] Add more logs on the local runner --- local/runner.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/local/runner.go b/local/runner.go index b67ee30c..8a4ff83c 100644 --- a/local/runner.go +++ b/local/runner.go @@ -179,8 +179,10 @@ func (r *Runner) Run() error { reexec.NotifyForeground("started") } + terminal.Logger.Debug().Msg("Waiting for channels (first boot)") select { case err := <-cmdExitChan: + terminal.Logger.Debug().Msg("Received exit (first boot)") if err != nil { return errors.Wrapf(err, `command "%s" failed early`, r.pidFile) } @@ -191,6 +193,7 @@ func (r *Runner) Run() error { // finished later one go func() { cmdExitChan <- err }() case <-timer.C: + terminal.Logger.Debug().Msg("Received timer message (first boot)") } } @@ -218,6 +221,7 @@ func (r *Runner) Run() error { } return err case <-restartChan: + terminal.Logger.Debug().Msg("Received restart") // We use SIGTERM here because it's nicer and thus when we use our // wrappers, signal will be nicely forwarded cmd.Process.Signal(syscall.SIGTERM) @@ -225,9 +229,11 @@ func (r *Runner) Run() error { <-cmdExitChan // Command exited case err := <-cmdExitChan: + terminal.Logger.Debug().Msg("Received exit") err = errors.Wrapf(err, `command "%s" failed`, r.pidFile) if err == nil && r.SuccessHook != nil { + terminal.Logger.Debug().Msg("Running success hook") r.SuccessHook(r, cmd) } @@ -235,11 +241,14 @@ func (r *Runner) Run() error { // if the command is successful if !looping { if err != nil { + terminal.Logger.Debug().Msg("Not looping, exiting with error") return err } + terminal.Logger.Debug().Msg("Removing pid file") return r.pidFile.Remove() } + terminal.Logger.Debug().Msg("Looping") // Command is set up to restart on exit (usually PHP builtin // server), so we restart immediately without waiting @@ -258,13 +267,16 @@ func (r *Runner) Run() error { // Wait for a timer to expire or a file to be changed to restart // or a signal to be received to exit + terminal.Logger.Debug().Msg("Waiting for channels") select { case sig := <-sigChan: terminal.Logger.Info().Msgf(`Signal "%s" received, exiting`, sig) return nil case <-restartChan: + terminal.Logger.Debug().Msg("Received restart") timer.Stop() case <-timer.C: + terminal.Logger.Debug().Msg("Received timer message") } } From ba1504f66452fef166add9195f4acea5f95d8893 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 9 May 2024 08:45:05 +0200 Subject: [PATCH 330/466] Add more debug information --- commands/local_server_start.go | 1 + local/runner.go | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index a3af3fdd..138fb66d 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -325,6 +325,7 @@ var localServerStartCmd = &console.Command{ continue } pidFile.Watched = worker.Watch + pidFile.CustomName = name // we run each worker in its own goroutine for several reasons: // * to get things up and running faster diff --git a/local/runner.go b/local/runner.go index c1e52016..c4f19fe0 100644 --- a/local/runner.go +++ b/local/runner.go @@ -126,7 +126,7 @@ func (r *Runner) Run() error { continue } - terminal.Logger.Debug().Msg("Got event: " + event.Event().String()) + terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Got event: " + event.Event().String()) select { case restartChan <- true: @@ -139,10 +139,10 @@ func (r *Runner) Run() error { if fi, err := os.Stat(watched); err != nil { continue } else if fi.IsDir() { - terminal.Logger.Info().Msg("Watching directory " + watched) + terminal.Logger.Info().Str("cmd", r.pidFile.String()).Msg("Watching directory " + watched) watched = filepath.Join(watched, "...") } else { - terminal.Logger.Info().Msg("Watching file " + watched) + terminal.Logger.Info().Str("cmd", r.pidFile.String()).Msg("Watching file " + watched) } if err := inotify.Watch(watched, c, inotify.All); err != nil { return errors.Wrapf(err, `could not watch "%s"`, watched) @@ -179,10 +179,10 @@ func (r *Runner) Run() error { reexec.NotifyForeground("started") } - terminal.Logger.Debug().Msg("Waiting for channels (first boot)") + terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Waiting for channels (first boot)") select { case err := <-cmdExitChan: - terminal.Logger.Debug().Msg("Received exit (first boot)") + terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Received exit (first boot)") if err != nil { return errors.Wrapf(err, `command "%s" failed early`, r.pidFile) } @@ -193,7 +193,7 @@ func (r *Runner) Run() error { // finished later one go func() { cmdExitChan <- err }() case <-timer.C: - terminal.Logger.Debug().Msg("Received timer message (first boot)") + terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Received timer message (first boot)") } } @@ -214,14 +214,14 @@ func (r *Runner) Run() error { select { case sig := <-sigChan: - terminal.Logger.Info().Msgf("Signal \"%s\" received, forwarding to command and exiting\n", sig) + terminal.Logger.Info().Str("cmd", r.pidFile.String()).Msgf("Signal \"%s\" received, forwarding and exiting\n", sig) err := cmd.Process.Signal(sig) if err != nil && runtime.GOOS == "windows" && strings.Contains(err.Error(), "not supported by windows") { return exec.Command("CMD", "/C", "TASKKILL", "/F", "/PID", strconv.Itoa(cmd.Process.Pid)).Run() } return err case <-restartChan: - terminal.Logger.Debug().Msg("Received restart") + terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Received restart") // We use SIGTERM here because it's nicer and thus when we use our // wrappers, signal will be nicely forwarded cmd.Process.Signal(syscall.SIGTERM) @@ -229,11 +229,11 @@ func (r *Runner) Run() error { <-cmdExitChan // Command exited case err := <-cmdExitChan: - terminal.Logger.Debug().Msg("Received exit") + terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Received exit") err = errors.Wrapf(err, `command "%s" failed`, r.pidFile) if err == nil && r.SuccessHook != nil { - terminal.Logger.Debug().Msg("Running success hook") + terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Running success hook") r.SuccessHook(r, cmd) } @@ -241,11 +241,11 @@ func (r *Runner) Run() error { // if the command is successful if !looping { if err != nil { - terminal.Logger.Debug().Msg("Not looping, exiting with error") + terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Not looping, exiting with error") return err } - terminal.Logger.Debug().Msg("Removing pid file") + terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Removing pid file") return r.pidFile.Remove() } terminal.Logger.Debug().Msg("Looping") @@ -253,7 +253,7 @@ func (r *Runner) Run() error { // Command is set up to restart on exit (usually PHP builtin // server), so we restart immediately without waiting if r.AlwaysRestartOnExit { - terminal.Logger.Error().Msgf(`command "%s" exited, restarting it immediately`, r.pidFile) + terminal.Logger.Error().Str("cmd", r.pidFile.String()).Msg("command exited, restarting it immediately") continue } @@ -261,7 +261,7 @@ func (r *Runner) Run() error { // restarting the command, this avoids overloading the system with a // failing command if err != nil { - terminal.Logger.Error().Msgf("%s, waiting 5 seconds before restarting it", err) + terminal.Logger.Error().Str("cmd", r.pidFile.String()).Msgf(`command exited: %s, waiting 5 seconds before restarting it`, err) timer.Reset(5 * time.Second) } @@ -280,7 +280,7 @@ func (r *Runner) Run() error { } } - terminal.Logger.Info().Msgf(`Restarting command "%s"`, r.pidFile) + terminal.Logger.Info().Str("cmd", r.pidFile.String()).Msg("Restarting command") } } From 7478a99c36e9ad3d9b1ca64e4520136f0ba89e97 Mon Sep 17 00:00:00 2001 From: Sergii Dolgushev Date: Thu, 9 May 2024 15:39:39 +0100 Subject: [PATCH 331/466] fix: Upgrade go version 1.22.2 -> 1.22.3 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 8168e034..e9647803 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/symfony-cli/symfony-cli -go 1.22.2 +go 1.22.3 require ( github.com/NYTimes/gziphandler v1.1.1 From 64c603dcd20277816e0ca8cec471c7ff689d9702 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 9 May 2024 22:10:35 +0200 Subject: [PATCH 332/466] Bump deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index e9647803..65537815 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v26.1.1+incompatible + github.com/docker/docker v26.1.2+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 - github.com/fabpot/local-php-security-checker/v2 v2.1.2 + github.com/fabpot/local-php-security-checker/v2 v2.1.3 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru/arc/v2 v2.0.7 diff --git a/go.sum b/go.sum index 665232cf..03df8875 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v26.1.1+incompatible h1:oI+4kkAgIwwb54b9OC7Xc3hSgu1RlJA/Lln/DF72djQ= -github.com/docker/docker v26.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.2+incompatible h1:UVX5ZOrrfTGZZYEP+ZDq3Xn9PdHNXaSYMFPDumMqG2k= +github.com/docker/docker v26.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -31,8 +31,8 @@ github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 h1:m62nsMU279qRD9P github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= -github.com/fabpot/local-php-security-checker/v2 v2.1.2 h1:Yb7IXsYy6uojoh/gJjAhNca3yy67Bbg+6c9M9kB3FJw= -github.com/fabpot/local-php-security-checker/v2 v2.1.2/go.mod h1:t4Qk2u9Mj4ZM05X4cnwuwqrHGDKohweR8ox5rFBPBls= +github.com/fabpot/local-php-security-checker/v2 v2.1.3 h1:sL69IHlEvlmaOnyzfOhIAbrG1Ugp2IibM3f6JVxV+yk= +github.com/fabpot/local-php-security-checker/v2 v2.1.3/go.mod h1:t4Qk2u9Mj4ZM05X4cnwuwqrHGDKohweR8ox5rFBPBls= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= From d66d41b0e32a2dcc20b92b9be90c8a6272c5d6f9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 9 May 2024 22:13:42 +0200 Subject: [PATCH 333/466] Simplify code --- local/runner.go | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/local/runner.go b/local/runner.go index c4f19fe0..30c3b5ac 100644 --- a/local/runner.go +++ b/local/runner.go @@ -80,6 +80,7 @@ func NewRunner(pidFile *pid.PidFile, mode runnerMode) (*Runner, error) { } func (r *Runner) Run() error { + logger := terminal.Logger.With().Str("cmd", r.pidFile.String()).Logger() if r.mode == RunnerModeLoopDetached { if !reexec.IsChild() { varDir := filepath.Join(util.GetHomeDir(), "var") @@ -126,7 +127,7 @@ func (r *Runner) Run() error { continue } - terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Got event: " + event.Event().String()) + logger.Debug().Msg("Got event: " + event.Event().String()) select { case restartChan <- true: @@ -139,10 +140,10 @@ func (r *Runner) Run() error { if fi, err := os.Stat(watched); err != nil { continue } else if fi.IsDir() { - terminal.Logger.Info().Str("cmd", r.pidFile.String()).Msg("Watching directory " + watched) + logger.Info().Msg("Watching directory " + watched) watched = filepath.Join(watched, "...") } else { - terminal.Logger.Info().Str("cmd", r.pidFile.String()).Msg("Watching file " + watched) + logger.Info().Msg("Watching file " + watched) } if err := inotify.Watch(watched, c, inotify.All); err != nil { return errors.Wrapf(err, `could not watch "%s"`, watched) @@ -179,10 +180,10 @@ func (r *Runner) Run() error { reexec.NotifyForeground("started") } - terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Waiting for channels (first boot)") + logger.Debug().Msg("Waiting for channels (first boot)") select { case err := <-cmdExitChan: - terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Received exit (first boot)") + logger.Debug().Msg("Received exit (first boot)") if err != nil { return errors.Wrapf(err, `command "%s" failed early`, r.pidFile) } @@ -193,7 +194,7 @@ func (r *Runner) Run() error { // finished later one go func() { cmdExitChan <- err }() case <-timer.C: - terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Received timer message (first boot)") + logger.Debug().Msg("Received timer message (first boot)") } } @@ -214,14 +215,14 @@ func (r *Runner) Run() error { select { case sig := <-sigChan: - terminal.Logger.Info().Str("cmd", r.pidFile.String()).Msgf("Signal \"%s\" received, forwarding and exiting\n", sig) + logger.Info().Msgf("Signal \"%s\" received, forwarding and exiting\n", sig) err := cmd.Process.Signal(sig) if err != nil && runtime.GOOS == "windows" && strings.Contains(err.Error(), "not supported by windows") { return exec.Command("CMD", "/C", "TASKKILL", "/F", "/PID", strconv.Itoa(cmd.Process.Pid)).Run() } return err case <-restartChan: - terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Received restart") + logger.Debug().Msg("Received restart") // We use SIGTERM here because it's nicer and thus when we use our // wrappers, signal will be nicely forwarded cmd.Process.Signal(syscall.SIGTERM) @@ -229,11 +230,11 @@ func (r *Runner) Run() error { <-cmdExitChan // Command exited case err := <-cmdExitChan: - terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Received exit") + logger.Debug().Msg("Received exit") err = errors.Wrapf(err, `command "%s" failed`, r.pidFile) if err == nil && r.SuccessHook != nil { - terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Running success hook") + logger.Debug().Msg("Running success hook") r.SuccessHook(r, cmd) } @@ -241,19 +242,19 @@ func (r *Runner) Run() error { // if the command is successful if !looping { if err != nil { - terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Not looping, exiting with error") + logger.Debug().Msg("Not looping, exiting with error") return err } - terminal.Logger.Debug().Str("cmd", r.pidFile.String()).Msg("Removing pid file") + logger.Debug().Msg("Removing pid file") return r.pidFile.Remove() } - terminal.Logger.Debug().Msg("Looping") + logger.Debug().Msg("Looping") // Command is set up to restart on exit (usually PHP builtin // server), so we restart immediately without waiting if r.AlwaysRestartOnExit { - terminal.Logger.Error().Str("cmd", r.pidFile.String()).Msg("command exited, restarting it immediately") + logger.Error().Msg("command exited, restarting it immediately") continue } @@ -261,26 +262,26 @@ func (r *Runner) Run() error { // restarting the command, this avoids overloading the system with a // failing command if err != nil { - terminal.Logger.Error().Str("cmd", r.pidFile.String()).Msgf(`command exited: %s, waiting 5 seconds before restarting it`, err) + logger.Error().Msgf(`command exited: %s, waiting 5 seconds before restarting it`, err) timer.Reset(5 * time.Second) } // Wait for a timer to expire or a file to be changed to restart // or a signal to be received to exit - terminal.Logger.Debug().Msg("Waiting for channels") + logger.Debug().Msg("Waiting for channels") select { case sig := <-sigChan: - terminal.Logger.Info().Msgf(`Signal "%s" received, exiting`, sig) + logger.Info().Msgf(`Signal "%s" received, exiting`, sig) return nil case <-restartChan: - terminal.Logger.Debug().Msg("Received restart") + logger.Debug().Msg("Received restart") timer.Stop() case <-timer.C: - terminal.Logger.Debug().Msg("Received timer message") + logger.Debug().Msg("Received timer message") } } - terminal.Logger.Info().Str("cmd", r.pidFile.String()).Msg("Restarting command") + logger.Info().Msg("Restarting command") } } From 45eeb1ffe6a468939482aaded73168c833662566 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 9 May 2024 22:18:22 +0200 Subject: [PATCH 334/466] Fix deprecated feature in goreleaser --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 8f4b92b6..2b903f3e 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -93,7 +93,7 @@ brews: commit_author: name: Fabien Potencier email: fabien@symfony.com - folder: Formula + directory: Formula # Homebrew supports only a single GOARM variant and ARMv6 is upwards # compatible with ARMv7 so let's keep ARMv6 here (default value anyway) goarm: "6" From 4f4683b47da932740e4e5f5ad94c8d5d3b3dd53d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 May 2024 09:10:42 +0200 Subject: [PATCH 335/466] Replace deprecated call --- local/logs/tailer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/logs/tailer.go b/local/logs/tailer.go index 56f226d6..628697b4 100644 --- a/local/logs/tailer.go +++ b/local/logs/tailer.go @@ -253,7 +253,7 @@ func tailFile(filename string, follow bool, nblines int64) (*tail.Tail, error) { return tail.TailFile(filename, tail.Config{ Location: &tail.SeekInfo{ Offset: pos, - Whence: os.SEEK_SET, + Whence: io.SeekStart, }, ReOpen: follow, Follow: follow, From b29665f7afcba0a71a30077d3516aa6076908924 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 May 2024 09:10:16 +0200 Subject: [PATCH 336/466] - --- local/runner.go | 9 +++++++-- reexec/reexec.go | 9 ++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/local/runner.go b/local/runner.go index 30c3b5ac..367a6210 100644 --- a/local/runner.go +++ b/local/runner.go @@ -32,6 +32,7 @@ import ( "time" "github.com/pkg/errors" + "github.com/rs/zerolog" "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/inotify" "github.com/symfony-cli/symfony-cli/local/pid" @@ -80,7 +81,12 @@ func NewRunner(pidFile *pid.PidFile, mode runnerMode) (*Runner, error) { } func (r *Runner) Run() error { - logger := terminal.Logger.With().Str("cmd", r.pidFile.String()).Logger() + lw, err := r.pidFile.LogWriter() + if err != nil { + return err + } + logger := zerolog.New(lw).With().Str("source", "runner").Str("cmd", r.pidFile.String()).Timestamp().Logger() + if r.mode == RunnerModeLoopDetached { if !reexec.IsChild() { varDir := filepath.Join(util.GetHomeDir(), "var") @@ -179,7 +185,6 @@ func (r *Runner) Run() error { if r.mode == RunnerModeLoopDetached { reexec.NotifyForeground("started") } - logger.Debug().Msg("Waiting for channels (first boot)") select { case err := <-cmdExitChan: diff --git a/reexec/reexec.go b/reexec/reexec.go index cabcdfa6..b1649672 100644 --- a/reexec/reexec.go +++ b/reexec/reexec.go @@ -85,6 +85,7 @@ func ExecBinaryWithEnv(binary string, envs []string) bool { } func Background(homeDir string) error { + terminal.Logger.Debug().Str("source", "reexec").Msg("let's go to the background!") if util.IsGoRun() { return errors.New("Not applicable in a Go run context") } @@ -116,7 +117,6 @@ func Background(homeDir string) error { os.Setenv("REEXEC_WATCH_PID", shellPID) } - terminal.Logger.Debug().Msg("Let's go to the background!") p, err := Respawn() if err != nil { return errors.Wrap(err, "Could not respawn") @@ -157,14 +157,13 @@ func Background(homeDir string) error { // end-up receiving a status in statusCh so no particular // processing to do here. case event := <-watcherChan: - terminal.Logger.Info().Msg("FS event received: " + event.Event().String()) + terminal.Logger.Debug().Str("source", "reexec").Msg("FS event received: " + event.Event().String()) if event.Event() == notify.Remove { return nil } if event.Event() == notify.Write { ticker.Stop() - break } case status := <-statusCh: return console.Exit("", status) @@ -176,6 +175,7 @@ func Background(homeDir string) error { } func NotifyForeground(status string) error { + terminal.Logger.Debug().Str("source", "reexec").Msg("notify foreground") if !IsChild() { return nil } @@ -195,6 +195,7 @@ func NotifyForeground(status string) error { } func WatchParent(stopCh chan bool) error { + terminal.Logger.Debug().Str("source", "reexec").Msg("watch parent") spid := os.Getenv("REEXEC_WATCH_PID") if spid == "" { return nil @@ -223,6 +224,7 @@ func WatchParent(stopCh chan bool) error { } func Restart(postRespawn func()) error { + terminal.Logger.Debug().Str("source", "reexec").Msg("restart") if err := os.Setenv("REEXEC_PPID", fmt.Sprint(os.Getpid())); nil != err { return errors.WithStack(err) } @@ -280,6 +282,7 @@ func Restart(postRespawn func()) error { } func Respawn() (*os.Process, error) { + terminal.Logger.Debug().Str("source", "reexec").Msg("respawn") argv0, err := console.CurrentBinaryPath() if err != nil { return nil, err From 690005fc5df07fc4fff4abeebd39339a03e89fee Mon Sep 17 00:00:00 2001 From: Sarim Khan Date: Thu, 4 Jan 2024 08:52:12 +0600 Subject: [PATCH 337/466] Set SysProcAttr Foreground: true when user run cmd Fixes: #404 --- local/runner.go | 2 +- local/runner_posix.go | 5 +++-- local/runner_windows.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/local/runner.go b/local/runner.go index 367a6210..7a70973e 100644 --- a/local/runner.go +++ b/local/runner.go @@ -295,7 +295,7 @@ func (r *Runner) buildCmd() (*exec.Cmd, error) { cmd.Env = os.Environ() cmd.Dir = r.pidFile.Dir - if err := buildCmd(cmd); err != nil { + if err := buildCmd(cmd, r.mode == RunnerModeOnce); err != nil { return nil, err } diff --git a/local/runner_posix.go b/local/runner_posix.go index a19321c2..71cb7abf 100644 --- a/local/runner_posix.go +++ b/local/runner_posix.go @@ -8,11 +8,12 @@ import ( "syscall" ) -func buildCmd(cmd *exec.Cmd) error { +func buildCmd(cmd *exec.Cmd, foreground bool) error { cmd.SysProcAttr = &syscall.SysProcAttr{ // isolate each command in a new process group that we can cleanly send // signal to when we want to stop it - Setpgid: true, + Setpgid: true, + Foreground: foreground, } return nil diff --git a/local/runner_windows.go b/local/runner_windows.go index 46fe4438..4b0ec0b9 100644 --- a/local/runner_windows.go +++ b/local/runner_windows.go @@ -2,6 +2,6 @@ package local import "os/exec" -func buildCmd(*exec.Cmd) error { +func buildCmd(*exec.Cmd, bool) error { return nil } From 2e5781180e9773379aa79b4857c281981e27bffc Mon Sep 17 00:00:00 2001 From: Sarim Khan Date: Tue, 9 Jan 2024 23:06:44 +0600 Subject: [PATCH 338/466] Set SysProcAttr Foreground only when terminal is Interactive --- local/runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/runner.go b/local/runner.go index 7a70973e..63a39bb4 100644 --- a/local/runner.go +++ b/local/runner.go @@ -295,7 +295,7 @@ func (r *Runner) buildCmd() (*exec.Cmd, error) { cmd.Env = os.Environ() cmd.Dir = r.pidFile.Dir - if err := buildCmd(cmd, r.mode == RunnerModeOnce); err != nil { + if err := buildCmd(cmd, r.mode == RunnerModeOnce && terminal.Stdin.IsInteractive()); err != nil { return nil, err } From ca163750eb5fa133a3afb86e0ddd49e82747e02b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 8 May 2024 22:03:10 +0200 Subject: [PATCH 339/466] Fix commands that hang --- local/runner.go | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/local/runner.go b/local/runner.go index 63a39bb4..5f1fae9a 100644 --- a/local/runner.go +++ b/local/runner.go @@ -254,36 +254,23 @@ func (r *Runner) Run() error { logger.Debug().Msg("Removing pid file") return r.pidFile.Remove() } - logger.Debug().Msg("Looping") - // Command is set up to restart on exit (usually PHP builtin - // server), so we restart immediately without waiting + // Command is set up to restart on exit (usually PHP builtin server) if r.AlwaysRestartOnExit { - logger.Error().Msg("command exited, restarting it immediately") + logger.Debug().Msg("Looping") + // In case of error we want to wait up-to 5 seconds before + // restarting the command, this avoids overloading the system with a + // failing command + if err != nil { + logger.Error().Msgf(`command exited: %s, waiting 5 seconds before restarting it`, err) + timer.Reset(5 * time.Second) + } else { + logger.Error().Msg("command exited, restarting it immediately") + } continue } - // In case of error we want to wait up-to 5 seconds before - // restarting the command, this avoids overloading the system with a - // failing command - if err != nil { - logger.Error().Msgf(`command exited: %s, waiting 5 seconds before restarting it`, err) - timer.Reset(5 * time.Second) - } - - // Wait for a timer to expire or a file to be changed to restart - // or a signal to be received to exit - logger.Debug().Msg("Waiting for channels") - select { - case sig := <-sigChan: - logger.Info().Msgf(`Signal "%s" received, exiting`, sig) - return nil - case <-restartChan: - logger.Debug().Msg("Received restart") - timer.Stop() - case <-timer.C: - logger.Debug().Msg("Received timer message") - } + return nil } logger.Info().Msg("Restarting command") From b84bb4fc50efa907a57e27eb53f4835e3b8db04e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 May 2024 09:18:54 +0200 Subject: [PATCH 340/466] Remove unneeded code --- local/runner.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/local/runner.go b/local/runner.go index 5f1fae9a..aa24bdc2 100644 --- a/local/runner.go +++ b/local/runner.go @@ -236,8 +236,6 @@ func (r *Runner) Run() error { // Command exited case err := <-cmdExitChan: logger.Debug().Msg("Received exit") - err = errors.Wrapf(err, `command "%s" failed`, r.pidFile) - if err == nil && r.SuccessHook != nil { logger.Debug().Msg("Running success hook") r.SuccessHook(r, cmd) From ece2df437dfa18ba34d5be7be77770cf84119745 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 16:10:54 +0000 Subject: [PATCH 341/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 48d50d2e..fb71258a 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -458,9 +458,9 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "branch-from",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, + &console.BoolFlag{Name: "no-code",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "restore-code",}, &console.StringFlag{Name: "target",}, &console.BoolFlag{Name: "wait",}, }, @@ -1348,6 +1348,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "format", DefaultValue: "table",}, &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "type", Aliases: []string{"t"},}, }, }, { From 75763380b0866e6e79422caef708240179aabc91 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 08:12:51 +0000 Subject: [PATCH 342/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index fb71258a..7ee553e6 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -319,6 +319,8 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "browser",}, &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, + &console.StringFlag{Name: "max-age",}, + &console.StringFlag{Name: "method",}, &console.BoolFlag{Name: "pipe",}, }, }, @@ -841,13 +843,16 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "delete-branch",}, &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, &console.StringFlag{Name: "exclude",}, + &console.StringFlag{Name: "exclude-status",}, &console.StringFlag{Name: "exclude-type",}, &console.BoolFlag{Name: "inactive",}, &console.BoolFlag{Name: "merged",}, &console.BoolFlag{Name: "no-delete-branch",}, &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, + &console.StringFlag{Name: "only-status",}, &console.StringFlag{Name: "only-type", Aliases: []string{"t"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.StringFlag{Name: "status",}, &console.StringFlag{Name: "type",}, &console.BoolFlag{Name: "wait",}, }, @@ -933,6 +938,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "refresh",}, &console.BoolFlag{Name: "reverse",}, &console.StringFlag{Name: "sort", DefaultValue: "title",}, + &console.StringFlag{Name: "status",}, &console.StringFlag{Name: "type",}, }, }, @@ -2106,6 +2112,45 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "project", Aliases: []string{"p"},}, }, }, + { + Category: "cloud:resources", + Name: "build:get", + Aliases: []*console.Alias{ + {Name: "resources:build:get", Hidden: true}, + {Name: "upsun:resources:build:get", Hidden: true}, + {Name: "cloud:build-resources:get"}, + {Name: "upsun:build-resources:get", Hidden: true}, + {Name: "build-resources:get", Hidden: true}, + {Name: "cloud:build-resources"}, + {Name: "upsun:build-resources", Hidden: true}, + {Name: "build-resources", Hidden: true}, + }, + Usage: "View the build resources of a project", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, + &console.StringFlag{Name: "format", DefaultValue: "table",}, + &console.BoolFlag{Name: "no-header",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + }, + }, + { + Category: "cloud:resources", + Name: "build:set", + Aliases: []*console.Alias{ + {Name: "resources:build:set", Hidden: true}, + {Name: "upsun:resources:build:set", Hidden: true}, + {Name: "cloud:build-resources:set"}, + {Name: "upsun:build-resources:set", Hidden: true}, + {Name: "build-resources:set", Hidden: true}, + }, + Usage: "Set the build resources of a project", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "cpu",}, + &console.StringFlag{Name: "memory",}, + &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + }, + }, { Category: "cloud:resources", Name: "get", From 0b6c51aa4e00ca7a9d31a762493d34da566ea956 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 4 Jun 2024 11:08:06 +0200 Subject: [PATCH 343/466] Change composer binary name --- local/php/composer.go | 2 +- local/php/composer_windows.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/local/php/composer.go b/local/php/composer.go index 04d20983..6684e055 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -71,7 +71,7 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, } composerBin := "composer1" if composerVersion() == 2 { - composerBin = "composer2" + composerBin = "composer" } path, err := e.findComposer(composerBin) if err != nil || !isPHPScript(path) { diff --git a/local/php/composer_windows.go b/local/php/composer_windows.go index 56e6a67c..a1646662 100644 --- a/local/php/composer_windows.go +++ b/local/php/composer_windows.go @@ -20,10 +20,11 @@ package php import ( - "github.com/mitchellh/go-homedir" "os" "os/exec" "path/filepath" + + "github.com/mitchellh/go-homedir" ) func findComposerSystemSpecific(extraBin string) string { From 18ef848ce79ed5cc1b1ecc2e3c3745236d15fae9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 4 Jun 2024 11:09:37 +0200 Subject: [PATCH 344/466] Remove unused arg --- local/php/composer.go | 2 +- local/php/composer_unix.go | 2 +- local/php/composer_windows.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/local/php/composer.go b/local/php/composer.go index 6684e055..d7f70a37 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -139,7 +139,7 @@ func findComposer(extraBin string) (string, error) { // Special support for OS specific things. They need to run before the // PATH detection because most of them adds shell wrappers that we // can't run via PHP. - if pharPath := findComposerSystemSpecific(extraBin); pharPath != "" { + if pharPath := findComposerSystemSpecific(); pharPath != "" { return pharPath, nil } for _, file := range []string{extraBin, "composer", "composer.phar"} { diff --git a/local/php/composer_unix.go b/local/php/composer_unix.go index ab14f6d5..54d0fc1a 100644 --- a/local/php/composer_unix.go +++ b/local/php/composer_unix.go @@ -28,7 +28,7 @@ import ( "strings" ) -func findComposerSystemSpecific(extraBin string) string { +func findComposerSystemSpecific() string { // Special Support for NixOS for _, path := range strings.Split(os.Getenv("buildInputs"), " ") { nixPharPath := filepath.Join(path, "libexec/composer/composer.phar") diff --git a/local/php/composer_windows.go b/local/php/composer_windows.go index a1646662..2b496d87 100644 --- a/local/php/composer_windows.go +++ b/local/php/composer_windows.go @@ -27,7 +27,7 @@ import ( "github.com/mitchellh/go-homedir" ) -func findComposerSystemSpecific(extraBin string) string { +func findComposerSystemSpecific() string { // Special Support for Scoop scoopPaths := []string{} From 1f89c03cb4de6e0efc0dd850cfa3eefe40fe5aaf Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 4 Jun 2024 11:36:08 +0200 Subject: [PATCH 345/466] Add a command that checks Doctrine server version setting --- .../doctrine_check_server_version_setting.go | 22 +++++ commands/doctrine_server_version_check.go | 82 +++++++++++++++++++ commands/platformsh_hooks.go | 56 +------------ commands/root.go | 1 + 4 files changed, 106 insertions(+), 55 deletions(-) create mode 100644 commands/doctrine_check_server_version_setting.go create mode 100644 commands/doctrine_server_version_check.go diff --git a/commands/doctrine_check_server_version_setting.go b/commands/doctrine_check_server_version_setting.go new file mode 100644 index 00000000..55626a70 --- /dev/null +++ b/commands/doctrine_check_server_version_setting.go @@ -0,0 +1,22 @@ +package commands + +import ( + "github.com/symfony-cli/console" +) + +var doctrineCheckServerVersionSettingCmd = &console.Command{ + Name: "doctrine:check-server-version-setting", + Usage: "Check if Doctrine server version is configured explicitly", + Hidden: console.Hide, + Flags: []console.Flag{ + dirFlag, + }, + Action: func(c *console.Context) error { + projectDir, err := getProjectDir(c.String("dir")) + if err != nil { + return err + } + + return checkDoctrineServerVersionSetting(projectDir) + }, +} diff --git a/commands/doctrine_server_version_check.go b/commands/doctrine_server_version_check.go new file mode 100644 index 00000000..527da5af --- /dev/null +++ b/commands/doctrine_server_version_check.go @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +import ( + "fmt" + + "github.com/symfony-cli/symfony-cli/local/platformsh" +) + +// checkDoctrineServerVersionSetting checks that project has a DB and that server version is set properly +func checkDoctrineServerVersionSetting(projectDir string) error { + if len(platformsh.FindLocalApplications(projectDir)) > 1 { + // not implemented yet as more complex + return nil + } + + dbName, dbVersion, err := platformsh.ReadDBVersionFromPlatformServiceYAML(projectDir) + if err != nil { + return nil + } + if dbName == "" { + // no DB + return nil + } + + errorTpl := fmt.Sprintf(` + The ".platform/services.yaml" file defines + a "%s" version %s database service + but %%s. + + Before deploying, fix the version mismatch. + `, dbName, dbVersion) + + dotEnvVersion, err := platformsh.ReadDBVersionFromDotEnv(projectDir) + if err != nil { + return nil + } + if platformsh.DatabaseVersiondUnsynced(dotEnvVersion, dbVersion) { + return fmt.Errorf(errorTpl, fmt.Sprintf("the \".env\" file requires version %s", dotEnvVersion)) + } + + doctrineConfigVersion, err := platformsh.ReadDBVersionFromDoctrineConfigYAML(projectDir) + if err != nil { + return nil + } + if platformsh.DatabaseVersiondUnsynced(doctrineConfigVersion, dbVersion) { + return fmt.Errorf(errorTpl, fmt.Sprintf("the \"config/packages/doctrine.yaml\" file requires version %s", doctrineConfigVersion)) + } + + if dotEnvVersion == "" && doctrineConfigVersion == "" { + return fmt.Errorf(` + The ".platform/services.yaml" file defines a "%s" database service. + + When deploying, Doctrine needs to know the database version to determine the supported SQL syntax. + + As the database is not available when Doctrine is warming up its cache on Platform.sh, + you need to explicitly set the database version in the ".env" or "config/packages/doctrine.yaml" file. + + Set the "server_version" parameter to "%s" in "config/packages/doctrine.yaml". + `, dbName, dbVersion) + } + + return nil +} diff --git a/commands/platformsh_hooks.go b/commands/platformsh_hooks.go index b8e77cd6..2fd8526a 100644 --- a/commands/platformsh_hooks.go +++ b/commands/platformsh_hooks.go @@ -20,8 +20,6 @@ package commands import ( - "fmt" - "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/envs" "github.com/symfony-cli/symfony-cli/local/platformsh" @@ -35,59 +33,7 @@ var platformshBeforeHooks = map[string]console.BeforeFunc{ if err != nil { return err } - - if len(platformsh.FindLocalApplications(projectDir)) > 1 { - // not implemented yet as more complex - return nil - } - - dbName, dbVersion, err := platformsh.ReadDBVersionFromPlatformServiceYAML(projectDir) - if err != nil { - return nil - } - if dbName == "" { - // no DB - return nil - } - - errorTpl := fmt.Sprintf(` -The ".platform/services.yaml" file defines -a "%s" version %s database service -but %%s. - -Before deploying, fix the version mismatch. -`, dbName, dbVersion) - - dotEnvVersion, err := platformsh.ReadDBVersionFromDotEnv(projectDir) - if err != nil { - return nil - } - if platformsh.DatabaseVersiondUnsynced(dotEnvVersion, dbVersion) { - return fmt.Errorf(errorTpl, fmt.Sprintf("the \".env\" file requires version %s", dotEnvVersion)) - } - - doctrineConfigVersion, err := platformsh.ReadDBVersionFromDoctrineConfigYAML(projectDir) - if err != nil { - return nil - } - if platformsh.DatabaseVersiondUnsynced(doctrineConfigVersion, dbVersion) { - return fmt.Errorf(errorTpl, fmt.Sprintf("the \"config/packages/doctrine.yaml\" file requires version %s", doctrineConfigVersion)) - } - - if dotEnvVersion == "" && doctrineConfigVersion == "" { - return fmt.Errorf(` -The ".platform/services.yaml" file defines a "%s" database service. - -When deploying, Doctrine needs to know the database version to determine the supported SQL syntax. - -As the database is not available when Doctrine is warming up its cache on Platform.sh, -you need to explicitly set the database version in the ".env" or "config/packages/doctrine.yaml" file. - -Set the "server_version" parameter to "%s" in "config/packages/doctrine.yaml". -`, dbName, dbVersion) - } - - return nil + return checkDoctrineServerVersionSetting(projectDir) }, "tunnel:close": func(c *console.Context) error { terminal.Eprintln("Stop exposing tunnel service environment variables") diff --git a/commands/root.go b/commands/root.go index bc05012b..495e7014 100644 --- a/commands/root.go +++ b/commands/root.go @@ -55,6 +55,7 @@ func CommonCommands() []*console.Command { bookCheckReqsCmd, bookCheckoutCmd, cloudEnvDebugCmd, + doctrineCheckServerVersionSettingCmd, localNewCmd, localPhpListCmd, localPhpRefreshCmd, From d84a13f1e034b58ad01e8c8bc19525b5f4b233d9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 4 Jun 2024 11:50:35 +0200 Subject: [PATCH 346/466] Prepare for Upsun support --- commands/doctrine_server_version_check.go | 10 +++++----- local/platformsh/db_versions.go | 13 +++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/commands/doctrine_server_version_check.go b/commands/doctrine_server_version_check.go index 527da5af..45c7fdee 100644 --- a/commands/doctrine_server_version_check.go +++ b/commands/doctrine_server_version_check.go @@ -32,7 +32,7 @@ func checkDoctrineServerVersionSetting(projectDir string) error { return nil } - dbName, dbVersion, err := platformsh.ReadDBVersionFromPlatformServiceYAML(projectDir) + configFile, dbName, dbVersion, err := platformsh.ReadDBVersionFromPlatformServiceYAML(projectDir) if err != nil { return nil } @@ -42,12 +42,12 @@ func checkDoctrineServerVersionSetting(projectDir string) error { } errorTpl := fmt.Sprintf(` - The ".platform/services.yaml" file defines + The "%s" file defines a "%s" version %s database service but %%s. Before deploying, fix the version mismatch. - `, dbName, dbVersion) + `, configFile, dbName, dbVersion) dotEnvVersion, err := platformsh.ReadDBVersionFromDotEnv(projectDir) if err != nil { @@ -67,7 +67,7 @@ func checkDoctrineServerVersionSetting(projectDir string) error { if dotEnvVersion == "" && doctrineConfigVersion == "" { return fmt.Errorf(` - The ".platform/services.yaml" file defines a "%s" database service. + The "%s" file defines a "%s" database service. When deploying, Doctrine needs to know the database version to determine the supported SQL syntax. @@ -75,7 +75,7 @@ func checkDoctrineServerVersionSetting(projectDir string) error { you need to explicitly set the database version in the ".env" or "config/packages/doctrine.yaml" file. Set the "server_version" parameter to "%s" in "config/packages/doctrine.yaml". - `, dbName, dbVersion) + `, configFile, dbName, dbVersion) } return nil diff --git a/local/platformsh/db_versions.go b/local/platformsh/db_versions.go index 36d7a038..b6fd9ba5 100644 --- a/local/platformsh/db_versions.go +++ b/local/platformsh/db_versions.go @@ -11,18 +11,19 @@ import ( "gopkg.in/yaml.v2" ) -func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, error) { - servicesYAML, err := os.ReadFile(filepath.Join(projectDir, ".platform", "services.yaml")) +func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, string, error) { + configFile := filepath.Join(projectDir, ".platform", "services.yaml") + servicesYAML, err := os.ReadFile(configFile) if err != nil { // no services.yaml or unreadable - return "", "", err + return "", "", "", err } var services map[string]struct { Type string `yaml:"type"` } if err := yaml.Unmarshal(servicesYAML, &services); err != nil { // services.yaml format is wrong - return "", "", err + return "", "", "", err } dbName := "" @@ -31,7 +32,7 @@ func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, er if strings.HasPrefix(service.Type, "mysql") || strings.HasPrefix(service.Type, "mariadb") || strings.HasPrefix(service.Type, "postgresql") { if dbName != "" { // give up as there are multiple DBs - return "", "", nil + return "", "", "", nil } parts := strings.Split(service.Type, ":") @@ -39,7 +40,7 @@ func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, er dbVersion = parts[1] } } - return dbName, dbVersion, nil + return configFile, dbName, dbVersion, nil } func ReadDBVersionFromDotEnv(projectDir string) (string, error) { From 7f4b9317c73ddf5e07485f964e7d5d6331b7669f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 4 Jun 2024 12:27:32 +0200 Subject: [PATCH 347/466] Add Upsun support --- commands/doctrine_server_version_check.go | 7 ++-- local/platformsh/db_versions.go | 50 +++++++++++++++++------ 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/commands/doctrine_server_version_check.go b/commands/doctrine_server_version_check.go index 45c7fdee..e7084d0e 100644 --- a/commands/doctrine_server_version_check.go +++ b/commands/doctrine_server_version_check.go @@ -32,10 +32,7 @@ func checkDoctrineServerVersionSetting(projectDir string) error { return nil } - configFile, dbName, dbVersion, err := platformsh.ReadDBVersionFromPlatformServiceYAML(projectDir) - if err != nil { - return nil - } + configFile, dbName, dbVersion := platformsh.ReadDBVersionFromPlatformServiceYAML(projectDir) if dbName == "" { // no DB return nil @@ -78,5 +75,7 @@ func checkDoctrineServerVersionSetting(projectDir string) error { `, configFile, dbName, dbVersion) } + fmt.Println("✅ Doctrine server version is set properly.") + return nil } diff --git a/local/platformsh/db_versions.go b/local/platformsh/db_versions.go index b6fd9ba5..56a77c30 100644 --- a/local/platformsh/db_versions.go +++ b/local/platformsh/db_versions.go @@ -11,28 +11,52 @@ import ( "gopkg.in/yaml.v2" ) -func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, string, error) { +type serviceConfigs map[string]struct { + Type string `yaml:"type"` +} + +func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, string) { + // Platform.sh configFile := filepath.Join(projectDir, ".platform", "services.yaml") - servicesYAML, err := os.ReadFile(configFile) - if err != nil { - // no services.yaml or unreadable - return "", "", "", err - } - var services map[string]struct { - Type string `yaml:"type"` + if servicesYAML, err := os.ReadFile(configFile); err == nil { + var services serviceConfigs + if err := yaml.Unmarshal(servicesYAML, &services); err == nil { + if dbName, dbVersion, err := extractCloudDatabaseType(services); err == nil { + return configFile, dbName, dbVersion + } + } } - if err := yaml.Unmarshal(servicesYAML, &services); err != nil { - // services.yaml format is wrong - return "", "", "", err + + // Upsun + upsunDir := filepath.Join(projectDir, ".upsun") + if _, err := os.Stat(upsunDir); err == nil { + if files, err := os.ReadDir(upsunDir); err == nil { + for _, file := range files { + configFile := filepath.Join(upsunDir, file.Name()) + if servicesYAML, err := os.ReadFile(configFile); err == nil { + var config struct { + Services serviceConfigs `yaml:"services"` + } + if err := yaml.Unmarshal(servicesYAML, &config); err == nil { + if dbName, dbVersion, err := extractCloudDatabaseType(config.Services); err == nil { + return configFile, dbName, dbVersion + } + } + } + } + } } + return "", "", "" +} +func extractCloudDatabaseType(services serviceConfigs) (string, string, error) { dbName := "" dbVersion := "" for _, service := range services { if strings.HasPrefix(service.Type, "mysql") || strings.HasPrefix(service.Type, "mariadb") || strings.HasPrefix(service.Type, "postgresql") { if dbName != "" { // give up as there are multiple DBs - return "", "", "", nil + return "", "", nil } parts := strings.Split(service.Type, ":") @@ -40,7 +64,7 @@ func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, st dbVersion = parts[1] } } - return configFile, dbName, dbVersion, nil + return dbName, dbVersion, nil } func ReadDBVersionFromDotEnv(projectDir string) (string, error) { From 8ee5e3e09030a267d9482cf12f87faf575c437ba Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 4 Jun 2024 13:00:14 +0200 Subject: [PATCH 348/466] Tweak messages --- .../doctrine_check_server_version_setting.go | 9 +++++- commands/doctrine_server_version_check.go | 28 +++++++++---------- local/platformsh/db_versions.go | 8 +++--- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/commands/doctrine_check_server_version_setting.go b/commands/doctrine_check_server_version_setting.go index 55626a70..53319818 100644 --- a/commands/doctrine_check_server_version_setting.go +++ b/commands/doctrine_check_server_version_setting.go @@ -1,6 +1,8 @@ package commands import ( + "fmt" + "github.com/symfony-cli/console" ) @@ -17,6 +19,11 @@ var doctrineCheckServerVersionSettingCmd = &console.Command{ return err } - return checkDoctrineServerVersionSetting(projectDir) + if err := checkDoctrineServerVersionSetting(projectDir); err != nil { + return err + } + + fmt.Println("✅ Doctrine server version is set properly.") + return nil }, } diff --git a/commands/doctrine_server_version_check.go b/commands/doctrine_server_version_check.go index e7084d0e..27cefbf9 100644 --- a/commands/doctrine_server_version_check.go +++ b/commands/doctrine_server_version_check.go @@ -39,11 +39,11 @@ func checkDoctrineServerVersionSetting(projectDir string) error { } errorTpl := fmt.Sprintf(` - The "%s" file defines - a "%s" version %s database service - but %%s. - - Before deploying, fix the version mismatch. +The "%s" file defines +a "%s" version %s database service +but %%s. + +Before deploying, fix the version mismatch. `, configFile, dbName, dbVersion) dotEnvVersion, err := platformsh.ReadDBVersionFromDotEnv(projectDir) @@ -64,18 +64,16 @@ func checkDoctrineServerVersionSetting(projectDir string) error { if dotEnvVersion == "" && doctrineConfigVersion == "" { return fmt.Errorf(` - The "%s" file defines a "%s" database service. - - When deploying, Doctrine needs to know the database version to determine the supported SQL syntax. - - As the database is not available when Doctrine is warming up its cache on Platform.sh, - you need to explicitly set the database version in the ".env" or "config/packages/doctrine.yaml" file. - - Set the "server_version" parameter to "%s" in "config/packages/doctrine.yaml". +The "%s" file defines a "%s" database service. + +When deploying, Doctrine needs to know the database version to determine the supported SQL syntax. + +As the database is not available when Doctrine is warming up its cache on Platform.sh, +you need to explicitly set the database version in the ".env" or "config/packages/doctrine.yaml" file. + +Set the "server_version" parameter to "%s" in "config/packages/doctrine.yaml". `, configFile, dbName, dbVersion) } - fmt.Println("✅ Doctrine server version is set properly.") - return nil } diff --git a/local/platformsh/db_versions.go b/local/platformsh/db_versions.go index 56a77c30..d0ebd751 100644 --- a/local/platformsh/db_versions.go +++ b/local/platformsh/db_versions.go @@ -17,8 +17,8 @@ type serviceConfigs map[string]struct { func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, string) { // Platform.sh - configFile := filepath.Join(projectDir, ".platform", "services.yaml") - if servicesYAML, err := os.ReadFile(configFile); err == nil { + configFile := filepath.Join(".platform", "services.yaml") + if servicesYAML, err := os.ReadFile(filepath.Join(projectDir, configFile)); err == nil { var services serviceConfigs if err := yaml.Unmarshal(servicesYAML, &services); err == nil { if dbName, dbVersion, err := extractCloudDatabaseType(services); err == nil { @@ -32,8 +32,8 @@ func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, st if _, err := os.Stat(upsunDir); err == nil { if files, err := os.ReadDir(upsunDir); err == nil { for _, file := range files { - configFile := filepath.Join(upsunDir, file.Name()) - if servicesYAML, err := os.ReadFile(configFile); err == nil { + configFile := filepath.Join(".upsun", file.Name()) + if servicesYAML, err := os.ReadFile(filepath.Join(projectDir, configFile)); err == nil { var config struct { Services serviceConfigs `yaml:"services"` } From 4b9ff06afd6263fb026631e10beaf6dce3714445 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 4 Jun 2024 14:17:24 +0200 Subject: [PATCH 349/466] Re-add composer2 as a valid binary name for composer --- local/php/composer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/php/composer.go b/local/php/composer.go index d7f70a37..cea1934a 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -71,7 +71,7 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, } composerBin := "composer1" if composerVersion() == 2 { - composerBin = "composer" + composerBin = "composer2" } path, err := e.findComposer(composerBin) if err != nil || !isPHPScript(path) { From f65ef9d5b2eaccfe139345904e9fae873cbe21aa Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 4 Jun 2024 15:58:46 +0200 Subject: [PATCH 350/466] Add logs to checkDoctrineServerVersionSetting() --- .../doctrine_check_server_version_setting.go | 5 +++- commands/doctrine_server_version_check.go | 9 ++++-- commands/platformsh_hooks.go | 2 +- local/platformsh/db_versions.go | 28 ++++++++++++++++++- 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/commands/doctrine_check_server_version_setting.go b/commands/doctrine_check_server_version_setting.go index 53319818..93a998d2 100644 --- a/commands/doctrine_check_server_version_setting.go +++ b/commands/doctrine_check_server_version_setting.go @@ -3,7 +3,9 @@ package commands import ( "fmt" + "github.com/rs/zerolog" "github.com/symfony-cli/console" + "github.com/symfony-cli/terminal" ) var doctrineCheckServerVersionSettingCmd = &console.Command{ @@ -19,7 +21,8 @@ var doctrineCheckServerVersionSettingCmd = &console.Command{ return err } - if err := checkDoctrineServerVersionSetting(projectDir); err != nil { + logger := terminal.Logger.Output(zerolog.ConsoleWriter{Out: terminal.Stderr}).With().Timestamp().Logger() + if err := checkDoctrineServerVersionSetting(projectDir, &logger); err != nil { return err } diff --git a/commands/doctrine_server_version_check.go b/commands/doctrine_server_version_check.go index 27cefbf9..bac98dbe 100644 --- a/commands/doctrine_server_version_check.go +++ b/commands/doctrine_server_version_check.go @@ -22,17 +22,20 @@ package commands import ( "fmt" + "github.com/rs/zerolog" "github.com/symfony-cli/symfony-cli/local/platformsh" ) // checkDoctrineServerVersionSetting checks that project has a DB and that server version is set properly -func checkDoctrineServerVersionSetting(projectDir string) error { +func checkDoctrineServerVersionSetting(projectDir string, logger *zerolog.Logger) error { if len(platformsh.FindLocalApplications(projectDir)) > 1 { - // not implemented yet as more complex + if logger != nil { + logger.Debug().Msg("Doctrine server version check disabled on a multiple applications project") + } return nil } - configFile, dbName, dbVersion := platformsh.ReadDBVersionFromPlatformServiceYAML(projectDir) + configFile, dbName, dbVersion := platformsh.ReadDBVersionFromPlatformServiceYAML(projectDir, logger) if dbName == "" { // no DB return nil diff --git a/commands/platformsh_hooks.go b/commands/platformsh_hooks.go index 2fd8526a..a8a5fb2f 100644 --- a/commands/platformsh_hooks.go +++ b/commands/platformsh_hooks.go @@ -33,7 +33,7 @@ var platformshBeforeHooks = map[string]console.BeforeFunc{ if err != nil { return err } - return checkDoctrineServerVersionSetting(projectDir) + return checkDoctrineServerVersionSetting(projectDir, nil) }, "tunnel:close": func(c *console.Context) error { terminal.Eprintln("Stop exposing tunnel service environment variables") diff --git a/local/platformsh/db_versions.go b/local/platformsh/db_versions.go index d0ebd751..9093f2d7 100644 --- a/local/platformsh/db_versions.go +++ b/local/platformsh/db_versions.go @@ -8,6 +8,7 @@ import ( "strings" "github.com/joho/godotenv" + "github.com/rs/zerolog" "gopkg.in/yaml.v2" ) @@ -15,16 +16,25 @@ type serviceConfigs map[string]struct { Type string `yaml:"type"` } -func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, string) { +func ReadDBVersionFromPlatformServiceYAML(projectDir string, logger *zerolog.Logger) (string, string, string) { // Platform.sh configFile := filepath.Join(".platform", "services.yaml") if servicesYAML, err := os.ReadFile(filepath.Join(projectDir, configFile)); err == nil { var services serviceConfigs if err := yaml.Unmarshal(servicesYAML, &services); err == nil { if dbName, dbVersion, err := extractCloudDatabaseType(services); err == nil { + if logger != nil { + logger.Debug().Msg("DB configured in .platform/services.yaml") + } return configFile, dbName, dbVersion + } else if logger != nil { + logger.Debug().Msg("No DB configured in .platform/services.yaml") } + } else if logger != nil { + logger.Debug().Msg("Unable to parse .platform/services.yaml file") } + } else if logger != nil { + logger.Debug().Msg("No .platform/services.yaml file found or not readable") } // Upsun @@ -39,12 +49,28 @@ func ReadDBVersionFromPlatformServiceYAML(projectDir string) (string, string, st } if err := yaml.Unmarshal(servicesYAML, &config); err == nil { if dbName, dbVersion, err := extractCloudDatabaseType(config.Services); err == nil { + if logger != nil { + logger.Debug().Msgf("DB configured in %s", configFile) + } return configFile, dbName, dbVersion + } else if logger != nil { + logger.Debug().Msgf("No DB configured in %s", configFile) } + } else { + logger.Debug().Msgf("Unable to parse the %s file", configFile) } + } else if logger != nil { + logger.Debug().Msgf("Unable to read the %s file", configFile) } } + } else if logger != nil { + logger.Debug().Msg("Unable to list files under the .upsun directory") } + } else if logger != nil { + logger.Debug().Msg("No .upsun directory found") + } + if logger != nil { + logger.Debug().Msg("No DB configured") } return "", "", "" } From 73c6d778a342908413c654e205426bbb235274b8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 5 Jun 2024 12:36:27 +0200 Subject: [PATCH 351/466] Use a noop logger --- .../doctrine_check_server_version_setting.go | 2 +- commands/doctrine_server_version_check.go | 6 ++-- commands/platformsh_hooks.go | 3 +- local/platformsh/db_versions.go | 28 ++++++++----------- 4 files changed, 16 insertions(+), 23 deletions(-) diff --git a/commands/doctrine_check_server_version_setting.go b/commands/doctrine_check_server_version_setting.go index 93a998d2..b8532e64 100644 --- a/commands/doctrine_check_server_version_setting.go +++ b/commands/doctrine_check_server_version_setting.go @@ -22,7 +22,7 @@ var doctrineCheckServerVersionSettingCmd = &console.Command{ } logger := terminal.Logger.Output(zerolog.ConsoleWriter{Out: terminal.Stderr}).With().Timestamp().Logger() - if err := checkDoctrineServerVersionSetting(projectDir, &logger); err != nil { + if err := checkDoctrineServerVersionSetting(projectDir, logger); err != nil { return err } diff --git a/commands/doctrine_server_version_check.go b/commands/doctrine_server_version_check.go index bac98dbe..1643b1b3 100644 --- a/commands/doctrine_server_version_check.go +++ b/commands/doctrine_server_version_check.go @@ -27,11 +27,9 @@ import ( ) // checkDoctrineServerVersionSetting checks that project has a DB and that server version is set properly -func checkDoctrineServerVersionSetting(projectDir string, logger *zerolog.Logger) error { +func checkDoctrineServerVersionSetting(projectDir string, logger zerolog.Logger) error { if len(platformsh.FindLocalApplications(projectDir)) > 1 { - if logger != nil { - logger.Debug().Msg("Doctrine server version check disabled on a multiple applications project") - } + logger.Debug().Msg("Doctrine server version check disabled on a multiple applications project") return nil } diff --git a/commands/platformsh_hooks.go b/commands/platformsh_hooks.go index a8a5fb2f..b29641a3 100644 --- a/commands/platformsh_hooks.go +++ b/commands/platformsh_hooks.go @@ -20,6 +20,7 @@ package commands import ( + "github.com/rs/zerolog" "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/envs" "github.com/symfony-cli/symfony-cli/local/platformsh" @@ -33,7 +34,7 @@ var platformshBeforeHooks = map[string]console.BeforeFunc{ if err != nil { return err } - return checkDoctrineServerVersionSetting(projectDir, nil) + return checkDoctrineServerVersionSetting(projectDir, zerolog.Nop()) }, "tunnel:close": func(c *console.Context) error { terminal.Eprintln("Stop exposing tunnel service environment variables") diff --git a/local/platformsh/db_versions.go b/local/platformsh/db_versions.go index 9093f2d7..9c349942 100644 --- a/local/platformsh/db_versions.go +++ b/local/platformsh/db_versions.go @@ -16,24 +16,22 @@ type serviceConfigs map[string]struct { Type string `yaml:"type"` } -func ReadDBVersionFromPlatformServiceYAML(projectDir string, logger *zerolog.Logger) (string, string, string) { +func ReadDBVersionFromPlatformServiceYAML(projectDir string, logger zerolog.Logger) (string, string, string) { // Platform.sh configFile := filepath.Join(".platform", "services.yaml") if servicesYAML, err := os.ReadFile(filepath.Join(projectDir, configFile)); err == nil { var services serviceConfigs if err := yaml.Unmarshal(servicesYAML, &services); err == nil { if dbName, dbVersion, err := extractCloudDatabaseType(services); err == nil { - if logger != nil { - logger.Debug().Msg("DB configured in .platform/services.yaml") - } + logger.Debug().Msg("DB configured in .platform/services.yaml") return configFile, dbName, dbVersion - } else if logger != nil { + } else { logger.Debug().Msg("No DB configured in .platform/services.yaml") } - } else if logger != nil { + } else { logger.Debug().Msg("Unable to parse .platform/services.yaml file") } - } else if logger != nil { + } else { logger.Debug().Msg("No .platform/services.yaml file found or not readable") } @@ -49,29 +47,25 @@ func ReadDBVersionFromPlatformServiceYAML(projectDir string, logger *zerolog.Log } if err := yaml.Unmarshal(servicesYAML, &config); err == nil { if dbName, dbVersion, err := extractCloudDatabaseType(config.Services); err == nil { - if logger != nil { - logger.Debug().Msgf("DB configured in %s", configFile) - } + logger.Debug().Msgf("DB configured in %s", configFile) return configFile, dbName, dbVersion - } else if logger != nil { + } else { logger.Debug().Msgf("No DB configured in %s", configFile) } } else { logger.Debug().Msgf("Unable to parse the %s file", configFile) } - } else if logger != nil { + } else { logger.Debug().Msgf("Unable to read the %s file", configFile) } } - } else if logger != nil { + } else { logger.Debug().Msg("Unable to list files under the .upsun directory") } - } else if logger != nil { + } else { logger.Debug().Msg("No .upsun directory found") } - if logger != nil { - logger.Debug().Msg("No DB configured") - } + logger.Debug().Msg("No DB configured") return "", "", "" } From bf27b789828378cc9237af34907c907ae510d199 Mon Sep 17 00:00:00 2001 From: Sergii Dolgushev Date: Wed, 5 Jun 2024 11:36:34 +0100 Subject: [PATCH 352/466] fix: Upgrade go version 1.22.3 -> 1.22.4 to fix CVE-2024-24789 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 65537815..2d1daa1f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/symfony-cli/symfony-cli -go 1.22.3 +go 1.22.4 require ( github.com/NYTimes/gziphandler v1.1.1 From bd0da75cd890b32b69cf5efe294451f38667ca9b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 6 Jun 2024 18:02:25 +0200 Subject: [PATCH 353/466] Add more debug logs --- local/php/composer.go | 6 ++++-- local/php/executor.go | 4 +++- main.go | 8 +++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/local/php/composer.go b/local/php/composer.go index cea1934a..65fd9ef8 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -84,10 +84,10 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, error: errors.Wrap(err, "unable to find composer, get it at https://getcomposer.org/download/"), } } + fmt.Fprintf(logger, " (running %s %s)\n\n", path, strings.TrimSpace(strings.Join(args, " "))) } e.Args = append([]string{"php", path}, args...) - fmt.Fprintf(logger, " (running %s %s)\n\n", path, strings.TrimSpace(strings.Join(args, " "))) ret := e.Execute(false) if ret != 0 { return ComposerResult{ @@ -135,7 +135,7 @@ func composerVersion() int { return DefaultComposerVersion } -func findComposer(extraBin string) (string, error) { +func findComposer(extraBin string, logger zerolog.Logger) (string, error) { // Special support for OS specific things. They need to run before the // PATH detection because most of them adds shell wrappers that we // can't run via PHP. @@ -143,11 +143,13 @@ func findComposer(extraBin string) (string, error) { return pharPath, nil } for _, file := range []string{extraBin, "composer", "composer.phar"} { + logger.Debug().Str("source", "Composer").Msgf(`Looking for Composer in the PATH as "%s"`, file) if pharPath, _ := LookPath(file); pharPath != "" { // On Windows, we don't want the .bat, but the real composer phar/PHP file if strings.HasSuffix(pharPath, ".bat") { pharPath = pharPath[:len(pharPath)-4] + ".phar" } + logger.Debug().Str("source", "Composer").Msgf(`Found Composer as "%s"`, pharPath) return pharPath, nil } } diff --git a/local/php/executor.go b/local/php/executor.go index 28fc58f6..e259449d 100644 --- a/local/php/executor.go +++ b/local/php/executor.go @@ -289,19 +289,21 @@ func (e *Executor) findComposer(extraBin string) (string, error) { if scriptDir, err := e.DetectScriptDir(); err == nil { for _, file := range []string{extraBin, "composer.phar", "composer"} { path := filepath.Join(scriptDir, file) + e.Logger.Debug().Str("source", "Composer").Msgf(`Looking for Composer under "%s"`, path) d, err := os.Stat(path) if err != nil { continue } if m := d.Mode(); !m.IsDir() { // Yep! + e.Logger.Debug().Str("source", "Composer").Msgf(`Found Composer as "%s"`, path) return path, nil } } } // fallback to default composer detection - return findComposer(extraBin) + return findComposer(extraBin, e.Logger) } // Execute executes the right version of PHP depending on the configuration diff --git a/main.go b/main.go index 9f6ba7f3..17004d6f 100644 --- a/main.go +++ b/main.go @@ -23,11 +23,9 @@ package main import ( "fmt" - "io" "os" "time" - "github.com/rs/zerolog" "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/commands" "github.com/symfony-cli/symfony-cli/local/php" @@ -52,6 +50,10 @@ func getCliExtraEnv() []string { } func main() { + if os.Getenv("SC_DEBUG") == "1" { + terminal.SetLogLevel(5) + } + args := os.Args name := console.CurrentBinaryName() // called via "php"? @@ -84,7 +86,7 @@ func main() { } // called via "symfony composer"? if len(args) >= 2 && args[1] == "composer" { - res := php.Composer("", args[2:], getCliExtraEnv(), os.Stdout, os.Stderr, io.Discard, zerolog.Nop()) + res := php.Composer("", args[2:], getCliExtraEnv(), os.Stdout, os.Stderr, os.Stderr, terminal.Logger) terminal.Eprintln(res.Error()) os.Exit(res.ExitCode()) } From 96c5b96d94048a7320f3fd95cdc6737d40226ccb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 12 Jun 2024 07:58:14 +0200 Subject: [PATCH 354/466] Bump deps --- go.mod | 38 +++++++++++----------- go.sum | 100 ++++++++++++++++++++++++++++++--------------------------- 2 files changed, 72 insertions(+), 66 deletions(-) diff --git a/go.mod b/go.mod index 2d1daa1f..006e9522 100644 --- a/go.mod +++ b/go.mod @@ -6,11 +6,11 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v26.1.2+incompatible + github.com/docker/docker v26.1.4+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 github.com/fabpot/local-php-security-checker/v2 v2.1.3 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 - github.com/hashicorp/go-version v1.6.0 + github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/golang-lru/arc/v2 v2.0.7 github.com/joho/godotenv v1.5.1 github.com/mitchellh/go-homedir v1.1.0 @@ -19,17 +19,17 @@ require ( github.com/pkg/errors v0.9.1 github.com/rjeczalik/notify v0.9.3 github.com/rs/xid v1.5.0 - github.com/rs/zerolog v1.32.0 - github.com/schollz/progressbar/v3 v3.14.2 + github.com/rs/zerolog v1.33.0 + github.com/schollz/progressbar/v3 v3.14.4 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.6 - github.com/symfony-cli/console v1.0.5 + github.com/symfony-cli/console v1.1.0 github.com/symfony-cli/phpstore v1.0.12 github.com/symfony-cli/terminal v1.0.7 golang.org/x/sync v0.7.0 - golang.org/x/text v0.15.0 + golang.org/x/text v0.16.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) @@ -43,7 +43,7 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect @@ -63,23 +63,25 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect + github.com/posener/complete/v2 v2.1.0 // indirect + github.com/posener/script v1.2.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect golang.org/x/time v0.5.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 03df8875..c8cd2054 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v26.1.2+incompatible h1:UVX5ZOrrfTGZZYEP+ZDq3Xn9PdHNXaSYMFPDumMqG2k= -github.com/docker/docker v26.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.4+incompatible h1:vuTpXDuoga+Z38m1OZHzl7NKisKWaWlhjQk7IDPSLsU= +github.com/docker/docker v26.1.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -39,8 +39,8 @@ github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbS github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -52,10 +52,10 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru/arc/v2 v2.0.7 h1:QxkVTxwColcduO+LP7eJO56r2hFiG8zEbfAAzRv52KQ= github.com/hashicorp/golang-lru/arc/v2 v2.0.7/go.mod h1:Pe7gBlGdc8clY5LJ0LpJXMt5AmgmWNH1g+oFFVUHOEc= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= @@ -113,6 +113,10 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete/v2 v2.1.0 h1:IpAWxMyiJ6zDSoq+QmEBF0thpOramC0kYuEFBTcQeTI= +github.com/posener/complete/v2 v2.1.0/go.mod h1:AkzsSVGx4ysH/4OhZf57dr4yszGXgFmXsP/VNwlaW7U= +github.com/posener/script v1.2.0 h1:DrZz0qFT8lCLkYNi1PleLDANFnKxJ2VmlNPJbAkVLsE= +github.com/posener/script v1.2.0/go.mod h1:s4sVvRXtdc/1aK6otTSeW2BVXndO8MsoOVUwK74zcg4= 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= @@ -124,10 +128,10 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= -github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/schollz/progressbar/v3 v3.14.2 h1:EducH6uNLIWsr560zSV1KrTeUb/wZGAHqyMFIEa99ks= -github.com/schollz/progressbar/v3 v3.14.2/go.mod h1:aQAZQnhF4JGFtRJiw/eobaXpsqpVQAftEQ+hLGXaRc4= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/schollz/progressbar/v3 v3.14.4 h1:W9ZrDSJk7eqmQhd3uxFNNcTr0QL+xuGNI9dEMrw0r74= +github.com/schollz/progressbar/v3 v3.14.4/go.mod h1:aT3UQ7yGm+2ZjeXPqsjTenwL3ddUiuZ0kfQ/2tHlyNI= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -143,8 +147,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/symfony-cli/cert v1.0.6 h1:FKdNRhKSxc+IcOkSRYvcOjr4jyZxGHiNS0xCN0uXZQI= github.com/symfony-cli/cert v1.0.6/go.mod h1:7Lt0uwi9z6DYTwLQeKsdPrsTqvTZRTqdlVSDJJqKUVo= -github.com/symfony-cli/console v1.0.5 h1:qGGHzL9TXPNolkJ9EmuW9oK4jjkjpJ/phrbo6EONqcY= -github.com/symfony-cli/console v1.0.5/go.mod h1:rdalWAL8hb/F8c++01Bx+FSYkhhKQ4l/kxjTZN6f7tU= +github.com/symfony-cli/console v1.1.0 h1:QgnkWOeri3/PCkh/BkK3ja2le++P4npr5ox1MFMp/ZE= +github.com/symfony-cli/console v1.1.0/go.mod h1:SBAVGKozkzJJGO8UFInz5QZA3JphXpUfUTRoVyCEvck= github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA= github.com/symfony-cli/phpstore v1.0.12/go.mod h1:U29bdJBPs9p28PzLIRKfKfKkaiH0kacdyufl3eSB1d4= github.com/symfony-cli/terminal v1.0.7 h1:57L9PUTE2cHfQtP8Ti8dyiiPEYlQ1NBIDpMJ3RPEGPc= @@ -158,29 +162,29 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= 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.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -188,8 +192,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -204,16 +208,16 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= 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.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -224,14 +228,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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= From 56d584c431fe167c467050c562af8cf8bff2269b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 14 Jun 2024 09:27:55 +0200 Subject: [PATCH 355/466] Bump deps --- go.mod | 11 ++++++----- go.sum | 24 ++++++++++++++---------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 006e9522..2e545705 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v26.1.4+incompatible + github.com/docker/docker v27.0.0+incompatible github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 github.com/fabpot/local-php-security-checker/v2 v2.1.3 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 @@ -25,7 +25,7 @@ require ( github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.6 - github.com/symfony-cli/console v1.1.0 + github.com/symfony-cli/console v1.1.1 github.com/symfony-cli/phpstore v1.0.12 github.com/symfony-cli/terminal v1.0.7 golang.org/x/sync v0.7.0 @@ -47,6 +47,8 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-multierror v1.0.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/kr/pretty v0.3.1 // indirect @@ -63,8 +65,7 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/posener/complete/v2 v2.1.0 // indirect - github.com/posener/script v1.2.0 // indirect + github.com/posener/complete v1.2.3 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect @@ -78,7 +79,7 @@ require ( go.opentelemetry.io/otel/sdk v1.27.0 // indirect go.opentelemetry.io/otel/trace v1.27.0 // indirect golang.org/x/crypto v0.24.0 // indirect - golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect + golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/term v0.21.0 // indirect diff --git a/go.sum b/go.sum index c8cd2054..1009c24d 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v26.1.4+incompatible h1:vuTpXDuoga+Z38m1OZHzl7NKisKWaWlhjQk7IDPSLsU= -github.com/docker/docker v26.1.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.0.0+incompatible h1:JRugTYuelmWlW0M3jakcIadDx2HUoUO6+Tf2C5jVfwA= +github.com/docker/docker v27.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -54,6 +54,10 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru/arc/v2 v2.0.7 h1:QxkVTxwColcduO+LP7eJO56r2hFiG8zEbfAAzRv52KQ= @@ -113,10 +117,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete/v2 v2.1.0 h1:IpAWxMyiJ6zDSoq+QmEBF0thpOramC0kYuEFBTcQeTI= -github.com/posener/complete/v2 v2.1.0/go.mod h1:AkzsSVGx4ysH/4OhZf57dr4yszGXgFmXsP/VNwlaW7U= -github.com/posener/script v1.2.0 h1:DrZz0qFT8lCLkYNi1PleLDANFnKxJ2VmlNPJbAkVLsE= -github.com/posener/script v1.2.0/go.mod h1:s4sVvRXtdc/1aK6otTSeW2BVXndO8MsoOVUwK74zcg4= +github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= 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= @@ -142,13 +144,14 @@ github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 h1:vEf6LukDDCcMnR github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081/go.mod h1:mXF6uSYLo1a2BZPcVHpP8RstMYoQnCaFF+dmIY726NY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/symfony-cli/cert v1.0.6 h1:FKdNRhKSxc+IcOkSRYvcOjr4jyZxGHiNS0xCN0uXZQI= github.com/symfony-cli/cert v1.0.6/go.mod h1:7Lt0uwi9z6DYTwLQeKsdPrsTqvTZRTqdlVSDJJqKUVo= -github.com/symfony-cli/console v1.1.0 h1:QgnkWOeri3/PCkh/BkK3ja2le++P4npr5ox1MFMp/ZE= -github.com/symfony-cli/console v1.1.0/go.mod h1:SBAVGKozkzJJGO8UFInz5QZA3JphXpUfUTRoVyCEvck= +github.com/symfony-cli/console v1.1.1 h1:BkUlpSY4SBKU0Yco51sHJZfyV9FEqxFRGzMe6TL+5RE= +github.com/symfony-cli/console v1.1.1/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA= github.com/symfony-cli/phpstore v1.0.12/go.mod h1:U29bdJBPs9p28PzLIRKfKfKkaiH0kacdyufl3eSB1d4= github.com/symfony-cli/terminal v1.0.7 h1:57L9PUTE2cHfQtP8Ti8dyiiPEYlQ1NBIDpMJ3RPEGPc= @@ -183,8 +186,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -242,6 +245,7 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV 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.2/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-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 1246ef0563f1afd8db165212eddd90ad8175b87a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 14 Jun 2024 18:03:41 +0200 Subject: [PATCH 356/466] Bump deps --- go.mod | 6 +++--- go.sum | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 2e545705..c33fc743 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.6 - github.com/symfony-cli/console v1.1.1 + github.com/symfony-cli/console v1.1.2 github.com/symfony-cli/phpstore v1.0.12 github.com/symfony-cli/terminal v1.0.7 golang.org/x/sync v0.7.0 @@ -47,8 +47,8 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.2 // indirect - github.com/hashicorp/errwrap v1.0.0 // indirect - github.com/hashicorp/go-multierror v1.0.0 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/kr/pretty v0.3.1 // indirect diff --git a/go.sum b/go.sum index 1009c24d..bc2d3d38 100644 --- a/go.sum +++ b/go.sum @@ -54,10 +54,12 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru/arc/v2 v2.0.7 h1:QxkVTxwColcduO+LP7eJO56r2hFiG8zEbfAAzRv52KQ= @@ -150,8 +152,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/symfony-cli/cert v1.0.6 h1:FKdNRhKSxc+IcOkSRYvcOjr4jyZxGHiNS0xCN0uXZQI= github.com/symfony-cli/cert v1.0.6/go.mod h1:7Lt0uwi9z6DYTwLQeKsdPrsTqvTZRTqdlVSDJJqKUVo= -github.com/symfony-cli/console v1.1.1 h1:BkUlpSY4SBKU0Yco51sHJZfyV9FEqxFRGzMe6TL+5RE= -github.com/symfony-cli/console v1.1.1/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= +github.com/symfony-cli/console v1.1.2 h1:YVQbl4i03cE0r3QJ/RJs7LWaC3pEy2JI4qhFfL6vpLU= +github.com/symfony-cli/console v1.1.2/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA= github.com/symfony-cli/phpstore v1.0.12/go.mod h1:U29bdJBPs9p28PzLIRKfKfKkaiH0kacdyufl3eSB1d4= github.com/symfony-cli/terminal v1.0.7 h1:57L9PUTE2cHfQtP8Ti8dyiiPEYlQ1NBIDpMJ3RPEGPc= From 1525141710127d88776da591f95d7b01ce7223e7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 14 Jun 2024 18:25:54 +0200 Subject: [PATCH 357/466] Bump deps --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index c33fc743..64095c78 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.6 - github.com/symfony-cli/console v1.1.2 + github.com/symfony-cli/console v1.1.3 github.com/symfony-cli/phpstore v1.0.12 github.com/symfony-cli/terminal v1.0.7 golang.org/x/sync v0.7.0 diff --git a/go.sum b/go.sum index bc2d3d38..6388be5b 100644 --- a/go.sum +++ b/go.sum @@ -154,6 +154,8 @@ github.com/symfony-cli/cert v1.0.6 h1:FKdNRhKSxc+IcOkSRYvcOjr4jyZxGHiNS0xCN0uXZQ github.com/symfony-cli/cert v1.0.6/go.mod h1:7Lt0uwi9z6DYTwLQeKsdPrsTqvTZRTqdlVSDJJqKUVo= github.com/symfony-cli/console v1.1.2 h1:YVQbl4i03cE0r3QJ/RJs7LWaC3pEy2JI4qhFfL6vpLU= github.com/symfony-cli/console v1.1.2/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= +github.com/symfony-cli/console v1.1.3 h1:ejzr9LdNe7d7FLIpeTyZm89nSgnlPhaqK7IPeyglV9o= +github.com/symfony-cli/console v1.1.3/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA= github.com/symfony-cli/phpstore v1.0.12/go.mod h1:U29bdJBPs9p28PzLIRKfKfKkaiH0kacdyufl3eSB1d4= github.com/symfony-cli/terminal v1.0.7 h1:57L9PUTE2cHfQtP8Ti8dyiiPEYlQ1NBIDpMJ3RPEGPc= From 61d44e038abccd9735ffc7ab3a765b4cf3a738e9 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 14 Jun 2024 13:15:16 +0200 Subject: [PATCH 358/466] Add autocompletion forwarding for wrappers --- commands/completion.go | 17 ++++++ commands/resources/completion.bash | 63 ++++++++++++++++++++ commands/resources/completion.fish | 45 ++++++++++++++ commands/resources/completion.zsh | 95 ++++++++++++++++++++++++++++++ commands/wrappers.go | 16 +++-- 5 files changed, 230 insertions(+), 6 deletions(-) create mode 100644 commands/completion.go create mode 100644 commands/resources/completion.bash create mode 100644 commands/resources/completion.fish create mode 100644 commands/resources/completion.zsh diff --git a/commands/completion.go b/commands/completion.go new file mode 100644 index 00000000..73907d0d --- /dev/null +++ b/commands/completion.go @@ -0,0 +1,17 @@ +package commands + +import ( + "embed" + + "github.com/symfony-cli/console" +) + +// completionTemplates holds our custom shell completions templates. +// +//go:embed resources/completion.* +var completionTemplates embed.FS + +func init() { + // override console completion templates with our custom ones + console.CompletionTemplates = completionTemplates +} diff --git a/commands/resources/completion.bash b/commands/resources/completion.bash new file mode 100644 index 00000000..61a71d57 --- /dev/null +++ b/commands/resources/completion.bash @@ -0,0 +1,63 @@ +# Copyright (c) 2021-present Fabien Potencier +# +# This file is part of Symfony CLI project +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +# Bash completions for the CLI binary +# +# References: +# - https://github.com/symfony/symfony/blob/6.4/src/Symfony/Component/Console/Resources/completion.bash +# - https://github.com/posener/complete/blob/master/install/bash.go +# - https://github.com/scop/bash-completion/blob/master/completions/sudo +# + +# this wrapper function allows us to let Symfony knows how to call the +# `bin/console` using the Symfony CLI binary (to ensure the right env and PHP +# versions are used) +_{{ .App.HelpName }}_console() { + # shellcheck disable=SC2068 + {{ .CurrentBinaryInvocation }} console $@ +} + +_complete_{{ .App.HelpName }}() { + + # Use the default completion for shell redirect operators. + for w in '>' '>>' '&>' '<'; do + if [[ $w = "${COMP_WORDS[COMP_CWORD-1]}" ]]; then + compopt -o filenames + COMPREPLY=($(compgen -f -- "${COMP_WORDS[COMP_CWORD]}")) + return 0 + fi + done + + for (( i=1; i <= COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" != -* ]]; then + case "${COMP_WORDS[i]}" in + console) + _SF_CMD="_{{ .App.HelpName }}_console" _command_offset $i + return + ;; + composer{{range $name := (.App.Command "php").Names }}|{{$name}}{{end}}{{range $name := (.App.Command "run").Names }}|{{$name}}{{end}}) + _command_offset $i + return + ;; + esac; + fi + done + + IFS=$'\n' COMPREPLY=( $(COMP_LINE="${COMP_LINE}" COMP_POINT="${COMP_POINT}" COMP_DEBUG="$COMP_DEBUG" {{ .CurrentBinaryPath }} self:autocomplete) ) +} + +complete -F _complete_{{ .App.HelpName }} {{ .App.HelpName }} diff --git a/commands/resources/completion.fish b/commands/resources/completion.fish new file mode 100644 index 00000000..dfe8a110 --- /dev/null +++ b/commands/resources/completion.fish @@ -0,0 +1,45 @@ +# Copyright (c) 2021-present Fabien Potencier +# +# This file is part of Symfony CLI project +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +# Fish completions for the CLI binary +# +# References: +# - https://github.com/symfony/symfony/blob/6.4/src/Symfony/Component/Console/Resources/completion.fish +# - https://github.com/posener/complete/blob/master/install/fish.go +# - https://github.com/fish-shell/fish-shell/blob/master/share/completions/sudo.fish +# + +function __complete_{{ .App.HelpName }} + set -lx COMP_LINE (commandline -cp) + test -z (commandline -ct) + and set COMP_LINE "$COMP_LINE " + {{ .CurrentBinaryInvocation }} self:autocomplete +end + +# this wrapper function allows us to call Symfony autocompletion letting it +# knows how to call the `bin/console` using the Symfony CLI binary (to ensure +# the right env and PHP versions are used) +function __complete_{{ .App.HelpName }}_console + set -x _SF_CMD "{{ .CurrentBinaryInvocation }}" "console" + __fish_complete_subcommand +end + +complete -f -c '{{ .App.HelpName }}' -n "__fish_seen_subcommand_from console" -a '(__complete_{{ .App.HelpName }}_console)' -f +complete -f -c '{{ .App.HelpName }}' -n "__fish_seen_subcommand_from composer" -a '(__fish_complete_subcommand)' +complete -f -c '{{ .App.HelpName }}' -n "__fish_seen_subcommand_from {{range $i, $name := (.App.Command "php").Names }}{{if $i}} {{end}}{{$name}}{{end}}" -a '(__fish_complete_subcommand)' +complete -f -c '{{ .App.HelpName }}' -n "__fish_seen_subcommand_from {{range $i, $name := (.App.Command "run").Names }}{{if $i}} {{end}}{{$name}}{{end}}" -a '(__fish_complete_subcommand --fcs-skip=2)' +complete -f -c '{{ .App.HelpName }}' -n "not __fish_seen_subcommand_from console composer {{range $i, $name := (.App.Command "php").Names }}{{if $i}} {{end}}{{$name}}{{end}} {{range $i, $name := (.App.Command "run").Names }}{{if $i}} {{end}}{{$name}}{{end}}" -a '(__complete_{{ .App.HelpName }})' diff --git a/commands/resources/completion.zsh b/commands/resources/completion.zsh new file mode 100644 index 00000000..3b001f54 --- /dev/null +++ b/commands/resources/completion.zsh @@ -0,0 +1,95 @@ +#compdef {{ .App.HelpName }} + +# Copyright (c) 2021-present Fabien Potencier +# +# This file is part of Symfony CLI project +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# +# zsh completions for {{ .App.HelpName }} +# +# References: +# - https://github.com/symfony/symfony/blob/6.4/src/Symfony/Component/Console/Resources/completion.zsh +# - https://github.com/posener/complete/blob/master/install/zsh.go +# - https://stackoverflow.com/a/13547531 +# + +# this wrapper function allows us to let Symfony knows how to call the +# `bin/console` using the Symfony CLI binary (to ensure the right env and PHP +# versions are used) +_{{ .App.HelpName }}_console() { + # shellcheck disable=SC2068 + {{ .CurrentBinaryInvocation }} console $@ +} + +_complete_{{ .App.HelpName }}() { + local lastParam flagPrefix requestComp out comp + local -a completions + + # The user could have moved the cursor backwards on the command-line. + # We need to trigger completion from the $CURRENT location, so we need + # to truncate the command-line ($words) up to the $CURRENT location. + # (We cannot use $CURSOR as its value does not work when a command is an alias.) + words=("${=words[1,CURRENT]}") lastParam=${words[-1]} + + # For zsh, when completing a flag with an = (e.g., {{ .App.HelpName }} -n=) + # completions must be prefixed with the flag + setopt local_options BASH_REMATCH + if [[ "${lastParam}" =~ '-.*=' ]]; then + # We are dealing with a flag with an = + flagPrefix="-P ${BASH_REMATCH}" + fi + + # detect if we are in a wrapper command and need to "forward" completion to it + for ((i = 1; i <= $#words; i++)); do + if [[ "${words[i]}" != -* ]]; then + case "${words[i]}" in + console) + shift words + (( CURRENT-- )) + _SF_CMD="_{{ .App.HelpName }}_console" _normal + return + ;; + composer{{range $name := (.App.Command "php").Names }}|{{$name}}{{end}}) + shift words + (( CURRENT-- )) + _normal + return + ;; + {{range $i, $name := (.App.Command "local:run").Names }}{{if $i}}|{{end}}{{$name}}{{end}}) + shift words + (( CURRENT-- )) + shift words + (( CURRENT-- )) + _normal + return + ;; + esac; + fi + done + + while IFS='\n' read -r comp; do + if [ -n "$comp" ]; then + # We first need to escape any : as part of the completion itself. + comp=${comp//:/\\:} + completions+=${comp} + fi + done < <(COMP_LINE="$words" ${words[0]} ${_SF_CMD:-${words[1]}} self:autocomplete) + + # Let inbuilt _describe handle completions + eval _describe "completions" completions $flagPrefix +} + +compdef _complete_{{ .App.HelpName }} {{ .App.HelpName }} diff --git a/commands/wrappers.go b/commands/wrappers.go index ae6a4fd1..2382539e 100644 --- a/commands/wrappers.go +++ b/commands/wrappers.go @@ -45,14 +45,18 @@ var ( phpWrapper = &console.Command{ Usage: "Runs the named binary using the configured PHP version", Hidden: console.Hide, + Aliases: func() []*console.Alias { + binNames := php.GetBinaryNames() + aliases := make([]*console.Alias, 0, len(binNames)) + + for _, name := range php.GetBinaryNames() { + aliases = append(aliases, &console.Alias{Name: name}) + } + + return aliases + }(), Action: func(c *console.Context) error { return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony php*"`)} }, } ) - -func init() { - for _, name := range php.GetBinaryNames() { - phpWrapper.Aliases = append(phpWrapper.Aliases, &console.Alias{Name: name, Hidden: console.Hide()}) - } -} From 69dc21298c8d959b43a8e8b9a42c4b4430798316 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 14 Jun 2024 18:02:03 +0200 Subject: [PATCH 359/466] Register the wrappers aliases differently to let them be autocompleted right away --- commands/wrappers.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/commands/wrappers.go b/commands/wrappers.go index 2382539e..24f1e7fe 100644 --- a/commands/wrappers.go +++ b/commands/wrappers.go @@ -27,17 +27,21 @@ import ( var ( composerWrapper = &console.Command{ - Name: "composer", Usage: "Runs Composer without memory limit", Hidden: console.Hide, + // we use an alias to avoid the command being shown in the help but + // still be available for completion + Aliases: []*console.Alias{{Name: "composer"}}, Action: func(c *console.Context) error { return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony composer"`)} }, } binConsoleWrapper = &console.Command{ - Name: "console", Usage: "Runs the Symfony Console (bin/console) for current project", Hidden: console.Hide, + // we use an alias to avoid the command being shown in the help but + // still be available for completion + Aliases: []*console.Alias{{Name: "console"}}, Action: func(c *console.Context) error { return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony console"`)} }, @@ -45,6 +49,8 @@ var ( phpWrapper = &console.Command{ Usage: "Runs the named binary using the configured PHP version", Hidden: console.Hide, + // we use aliases to avoid the command being shown in the help but + // still be available for completion Aliases: func() []*console.Alias { binNames := php.GetBinaryNames() aliases := make([]*console.Alias, 0, len(binNames)) From 89b3310d20e62c8edf1ff98073c945af93af873b Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 14 Jun 2024 18:43:20 +0200 Subject: [PATCH 360/466] Don't try to use a wildcard domain in Fix https://github.com/symfony-cli/symfony-cli/issues/487 --- commands/openers.go | 2 +- local/proxy/config.go | 17 +++++++++++++++++ local/proxy/config_test.go | 13 +++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/commands/openers.go b/commands/openers.go index 3607e5d1..f8afbdeb 100644 --- a/commands/openers.go +++ b/commands/openers.go @@ -54,7 +54,7 @@ var projectLocalOpenCmd = &console.Command{ } host := fmt.Sprintf("127.0.0.1:%d", pidFile.Port) if proxyConf, err := proxy.Load(util.GetHomeDir()); err == nil { - domains := proxyConf.GetDomains(projectDir) + domains := proxyConf.GetReachableDomains(projectDir) if len(domains) > 0 { host = domains[0] } diff --git a/local/proxy/config.go b/local/proxy/config.go index 60b53179..d5db1627 100644 --- a/local/proxy/config.go +++ b/local/proxy/config.go @@ -158,6 +158,23 @@ func (c *Config) GetDomains(dir string) []string { return domains } +func (c *Config) GetReachableDomains(dir string) []string { + c.mu.Lock() + defer c.mu.Unlock() + domains := []string{} + for domain, d := range c.domains { + // domain is defined using a wildcard: we don't know the exact domain, + // so we can't use it directly as-is to reach the project + if strings.Contains(domain, "*") { + continue + } + if d == dir { + domains = append(domains, domain+"."+c.TLD) + } + } + return domains +} + func (c *Config) SetDomains(domains map[string]string) { c.mu.Lock() c.domains = domains diff --git a/local/proxy/config_test.go b/local/proxy/config_test.go index 73df9628..ebad7bf3 100644 --- a/local/proxy/config_test.go +++ b/local/proxy/config_test.go @@ -43,3 +43,16 @@ func (s *ProxySuite) TestGetDir(c *C) { c.Assert(p.GetDir("foo.symfony.com"), Equals, "any_symfony_com") c.Assert(p.GetDir("foo.live.symfony.com"), Equals, "any_live_symfony_com") } + +func (s *ProxySuite) TestGetReachableDomains(c *C) { + p := &Config{ + TLD: "wip", + domains: map[string]string{ + "*.symfony": "symfony_com", + "symfony": "symfony_com", + "custom.*.symfony": "symfony_com", + "*.live.symfony": "symfony_com", + }, + } + c.Assert(p.GetReachableDomains("symfony_com"), DeepEquals, []string{"symfony.wip"}) +} From 684d3488c3fd6e07645c88f95bc5871daf86250b Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 14 Jun 2024 18:46:59 +0200 Subject: [PATCH 361/466] Fix Windows builds are failing due to autocompletion --- commands/completion.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/completion.go b/commands/completion.go index 73907d0d..8ece9a9e 100644 --- a/commands/completion.go +++ b/commands/completion.go @@ -1,3 +1,5 @@ +//go:build darwin || linux || freebsd || openbsd + package commands import ( From e9aa237eab782d9dcd267716356e898c1f1185b5 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 15 Jun 2024 13:23:49 +0200 Subject: [PATCH 362/466] Show autocomplete instructions when installing via Homebrew --- .goreleaser.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 2b903f3e..72434a58 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -99,6 +99,11 @@ brews: goarm: "6" homepage: https://symfony.com description: Symfony CLI helps Symfony developers manage projects, from local code to remote infrastructure + caveats: |- + To install shell completions, add this to your profile: + if command -v symfony &>/dev/null; then + eval "$(symfony completion)" + fi license: AGPL-3.0 test: | system "#{bin}/symfony version" From 3b43c8415a1fa79b1a5f0928b4418068839d263a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 17 Jun 2024 13:15:06 +0200 Subject: [PATCH 363/466] Use latest goreleaser --- .github/workflows/releaser.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 18e36350..0d844833 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -66,11 +66,11 @@ jobs: uses: sigstore/cosign-installer@v3 - name: Run GoReleaser for snapshot - uses: goreleaser/goreleaser-action@v5 + uses: goreleaser/goreleaser-action@v6 # only for PRs and push on branches if: ${{ !startsWith(github.ref, 'refs/tags/v') }} with: - version: latest + version: '~> v2' args: release --clean --snapshot --skip-publish --skip-sign env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 60c02ca09ff8c6ee9e09fd70658d52253b891bd3 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 17 Jun 2024 17:49:00 +0200 Subject: [PATCH 364/466] Fix build --- .github/workflows/releaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 0d844833..87973150 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -71,7 +71,7 @@ jobs: if: ${{ !startsWith(github.ref, 'refs/tags/v') }} with: version: '~> v2' - args: release --clean --snapshot --skip-publish --skip-sign + args: release --clean --snapshot --skip=publish,sign env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From 9ad7d616f77a3158f8289c23f7387aa7f590bf53 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 17 Jun 2024 17:52:52 +0200 Subject: [PATCH 365/466] Fix build --- .goreleaser.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 72434a58..54e73ff3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,5 @@ +version: 2 + before: hooks: - go mod download From 6b017e44abd015f1d5718a56fbb7078817a61c5f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 08:11:38 +0000 Subject: [PATCH 366/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 667fa0e2..58a6e238 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -106,7 +106,7 @@ var availablePHPExts = map[string][]string{ "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "sourceguardian": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "sourceguardian": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "spplus": {"5.4", "5.5"}, "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, From bf40c8851079042c486d60814e0facf7211f8ad4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:10:53 +0000 Subject: [PATCH 367/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 7ee553e6..0159ae9e 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1214,9 +1214,9 @@ var Commands = []*console.Command{ Aliases: []*console.Alias{ {Name: "integration:activity:list", Hidden: true}, {Name: "upsun:integration:activity:list", Hidden: true}, - {Name: "cloud:int:act"}, - {Name: "upsun:int:act", Hidden: true}, - {Name: "int:act", Hidden: true}, + {Name: "cloud:integration:activities"}, + {Name: "upsun:integration:activities", Hidden: true}, + {Name: "integration:activities", Hidden: true}, }, Usage: "Get a list of activities for an integration", Flags: []console.Flag{ From db7d6131f4737bc26e88fb6de236ecdb22ae5c96 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 15 Jun 2024 14:30:39 +0200 Subject: [PATCH 368/466] Natively autocomplete `composer` and `console` --- commands/completion.go | 19 ------- commands/completion_others.go | 17 +++++++ commands/completion_posix.go | 82 ++++++++++++++++++++++++++++++ commands/resources/completion.bash | 57 ++++++++++++++++----- commands/resources/completion.fish | 13 +---- commands/resources/completion.zsh | 22 +++----- commands/wrappers.go | 4 +- go.mod | 4 +- go.sum | 2 + local/php/symfony.go | 16 ++++++ main.go | 11 +--- 11 files changed, 177 insertions(+), 70 deletions(-) delete mode 100644 commands/completion.go create mode 100644 commands/completion_others.go create mode 100644 commands/completion_posix.go create mode 100644 local/php/symfony.go diff --git a/commands/completion.go b/commands/completion.go deleted file mode 100644 index 8ece9a9e..00000000 --- a/commands/completion.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build darwin || linux || freebsd || openbsd - -package commands - -import ( - "embed" - - "github.com/symfony-cli/console" -) - -// completionTemplates holds our custom shell completions templates. -// -//go:embed resources/completion.* -var completionTemplates embed.FS - -func init() { - // override console completion templates with our custom ones - console.CompletionTemplates = completionTemplates -} diff --git a/commands/completion_others.go b/commands/completion_others.go new file mode 100644 index 00000000..3224f2e2 --- /dev/null +++ b/commands/completion_others.go @@ -0,0 +1,17 @@ +//go:build !darwin && !linux && !freebsd && !openbsd +// +build !darwin,!linux,!freebsd,!openbsd + +package commands + +import ( + "github.com/posener/complete" + "github.com/symfony-cli/console" +) + +func autocompleteComposerWrapper(context *console.Context, args complete.Args) []string { + return []string{} +} + +func autocompleteSymfonyConsoleWrapper(context *console.Context, args complete.Args) []string { + return []string{} +} diff --git a/commands/completion_posix.go b/commands/completion_posix.go new file mode 100644 index 00000000..a4579730 --- /dev/null +++ b/commands/completion_posix.go @@ -0,0 +1,82 @@ +//go:build darwin || linux || freebsd || openbsd + +package commands + +import ( + "embed" + "fmt" + "io" + "os" + "strconv" + "strings" + + "github.com/posener/complete" + "github.com/symfony-cli/console" + "github.com/symfony-cli/symfony-cli/local/php" + "github.com/symfony-cli/terminal" +) + +// completionTemplates holds our custom shell completions templates. +// +//go:embed resources/completion.* +var completionTemplates embed.FS + +func init() { + // override console completion templates with our custom ones + console.CompletionTemplates = completionTemplates +} + +func autocompleteSymfonyConsoleWrapper(context *console.Context, words complete.Args) []string { + args := buildSymfonyAutocompleteArgs("console", words) + // Composer does not support those options yet, so we only use them for Symfony Console + args = append(args, "-a1", fmt.Sprintf("-s%s", console.GuessShell())) + + os.Exit(php.SymonyConsoleExecutor(args).Execute(false)) + + // unreachable + return []string{} +} + +func autocompleteComposerWrapper(context *console.Context, words complete.Args) []string { + args := buildSymfonyAutocompleteArgs("composer", words) + // Composer does not support multiple shell yet, so we only use the default one + args = append(args, "-sbash") + + res := php.Composer("", args, []string{}, context.App.Writer, context.App.ErrWriter, io.Discard, terminal.Logger) + os.Exit(res.ExitCode()) + + // unreachable + return []string{} +} + +func buildSymfonyAutocompleteArgs(wrappedCommand string, words complete.Args) []string { + current, err := strconv.Atoi(os.Getenv("CURRENT")) + if err != nil { + current = 1 + } else { + // we decrease one position corresponding to `symfony` command + current -= 1 + } + + args := make([]string, 0, len(words.All)) + // build the inputs command line that Symfony expects + for _, input := range words.All { + if input = strings.TrimSpace(input); input != "" { + + // remove quotes from typed values + quote := input[0] + if quote == '\'' || quote == '"' { + input = strings.TrimPrefix(input, string(quote)) + input = strings.TrimSuffix(input, string(quote)) + } + + args = append(args, fmt.Sprintf("-i%s", input)) + } + } + + return append([]string{ + "_complete", "--no-interaction", + fmt.Sprintf("-c%d", current), + fmt.Sprintf("-i%s", wrappedCommand), + }, args...) +} diff --git a/commands/resources/completion.bash b/commands/resources/completion.bash index 61a71d57..52a45e96 100644 --- a/commands/resources/completion.bash +++ b/commands/resources/completion.bash @@ -23,14 +23,6 @@ # - https://github.com/scop/bash-completion/blob/master/completions/sudo # -# this wrapper function allows us to let Symfony knows how to call the -# `bin/console` using the Symfony CLI binary (to ensure the right env and PHP -# versions are used) -_{{ .App.HelpName }}_console() { - # shellcheck disable=SC2068 - {{ .CurrentBinaryInvocation }} console $@ -} - _complete_{{ .App.HelpName }}() { # Use the default completion for shell redirect operators. @@ -45,11 +37,7 @@ _complete_{{ .App.HelpName }}() { for (( i=1; i <= COMP_CWORD; i++ )); do if [[ "${COMP_WORDS[i]}" != -* ]]; then case "${COMP_WORDS[i]}" in - console) - _SF_CMD="_{{ .App.HelpName }}_console" _command_offset $i - return - ;; - composer{{range $name := (.App.Command "php").Names }}|{{$name}}{{end}}{{range $name := (.App.Command "run").Names }}|{{$name}}{{end}}) + {{range $i, $name := (.App.Command "php").Names }}{{if $i}}|{{end}}{{$name}}{{end}}{{range $name := (.App.Command "run").Names }}|{{$name}}{{end}}) _command_offset $i return ;; @@ -57,7 +45,48 @@ _complete_{{ .App.HelpName }}() { fi done - IFS=$'\n' COMPREPLY=( $(COMP_LINE="${COMP_LINE}" COMP_POINT="${COMP_POINT}" COMP_DEBUG="$COMP_DEBUG" {{ .CurrentBinaryPath }} self:autocomplete) ) + # Use newline as only separator to allow space in completion values + IFS=$'\n' + + local cur prev words cword + _get_comp_words_by_ref -n := cur prev words cword + + local sfcomplete + if sfcomplete=$(COMP_LINE="${COMP_LINE}" COMP_POINT="${COMP_POINT}" COMP_DEBUG="$COMP_DEBUG" CURRENT="$cword" {{ .CurrentBinaryPath }} self:autocomplete 2>&1); then + local quote suggestions + quote=${cur:0:1} + + # Use single quotes by default if suggestions contains backslash (FQCN) + if [ "$quote" == '' ] && [[ "$sfcomplete" =~ \\ ]]; then + quote=\' + fi + + if [ "$quote" == \' ]; then + # single quotes: no additional escaping (does not accept ' in values) + suggestions=$(for s in $sfcomplete; do printf $'%q%q%q\n' "$quote" "$s" "$quote"; done) + elif [ "$quote" == \" ]; then + # double quotes: double escaping for \ $ ` " + suggestions=$(for s in $sfcomplete; do + s=${s//\\/\\\\} + s=${s//\$/\\\$} + s=${s//\`/\\\`} + s=${s//\"/\\\"} + printf $'%q%q%q\n' "$quote" "$s" "$quote"; + done) + else + # no quotes: double escaping + suggestions=$(for s in $sfcomplete; do printf $'%q\n' $(printf '%q' "$s"); done) + fi + COMPREPLY=($(IFS=$'\n' compgen -W "$suggestions" -- $(printf -- "%q" "$cur"))) + __ltrim_colon_completions "$cur" + else + if [[ "$sfcomplete" != *"Command \"_complete\" is not defined."* ]]; then + >&2 echo + >&2 echo $sfcomplete + fi + + return 1 + fi } complete -F _complete_{{ .App.HelpName }} {{ .App.HelpName }} diff --git a/commands/resources/completion.fish b/commands/resources/completion.fish index dfe8a110..81991327 100644 --- a/commands/resources/completion.fish +++ b/commands/resources/completion.fish @@ -27,19 +27,10 @@ function __complete_{{ .App.HelpName }} set -lx COMP_LINE (commandline -cp) test -z (commandline -ct) and set COMP_LINE "$COMP_LINE " + set -x CURRENT (count (commandline -oc)) {{ .CurrentBinaryInvocation }} self:autocomplete end -# this wrapper function allows us to call Symfony autocompletion letting it -# knows how to call the `bin/console` using the Symfony CLI binary (to ensure -# the right env and PHP versions are used) -function __complete_{{ .App.HelpName }}_console - set -x _SF_CMD "{{ .CurrentBinaryInvocation }}" "console" - __fish_complete_subcommand -end - -complete -f -c '{{ .App.HelpName }}' -n "__fish_seen_subcommand_from console" -a '(__complete_{{ .App.HelpName }}_console)' -f -complete -f -c '{{ .App.HelpName }}' -n "__fish_seen_subcommand_from composer" -a '(__fish_complete_subcommand)' complete -f -c '{{ .App.HelpName }}' -n "__fish_seen_subcommand_from {{range $i, $name := (.App.Command "php").Names }}{{if $i}} {{end}}{{$name}}{{end}}" -a '(__fish_complete_subcommand)' complete -f -c '{{ .App.HelpName }}' -n "__fish_seen_subcommand_from {{range $i, $name := (.App.Command "run").Names }}{{if $i}} {{end}}{{$name}}{{end}}" -a '(__fish_complete_subcommand --fcs-skip=2)' -complete -f -c '{{ .App.HelpName }}' -n "not __fish_seen_subcommand_from console composer {{range $i, $name := (.App.Command "php").Names }}{{if $i}} {{end}}{{$name}}{{end}} {{range $i, $name := (.App.Command "run").Names }}{{if $i}} {{end}}{{$name}}{{end}}" -a '(__complete_{{ .App.HelpName }})' +complete -f -c '{{ .App.HelpName }}' -n "not __fish_seen_subcommand_from {{range $i, $name := (.App.Command "php").Names }}{{if $i}} {{end}}{{$name}}{{end}} {{range $i, $name := (.App.Command "run").Names }}{{if $i}} {{end}}{{$name}}{{end}}" -a '(__complete_{{ .App.HelpName }})' diff --git a/commands/resources/completion.zsh b/commands/resources/completion.zsh index 3b001f54..77c731db 100644 --- a/commands/resources/completion.zsh +++ b/commands/resources/completion.zsh @@ -26,14 +26,6 @@ # - https://stackoverflow.com/a/13547531 # -# this wrapper function allows us to let Symfony knows how to call the -# `bin/console` using the Symfony CLI binary (to ensure the right env and PHP -# versions are used) -_{{ .App.HelpName }}_console() { - # shellcheck disable=SC2068 - {{ .CurrentBinaryInvocation }} console $@ -} - _complete_{{ .App.HelpName }}() { local lastParam flagPrefix requestComp out comp local -a completions @@ -56,13 +48,10 @@ _complete_{{ .App.HelpName }}() { for ((i = 1; i <= $#words; i++)); do if [[ "${words[i]}" != -* ]]; then case "${words[i]}" in - console) - shift words + console|composer) (( CURRENT-- )) - _SF_CMD="_{{ .App.HelpName }}_console" _normal - return ;; - composer{{range $name := (.App.Command "php").Names }}|{{$name}}{{end}}) + {{range $i, $name := (.App.Command "php").Names }}{{if $i}}|{{end}}{{$name}}{{end}}) shift words (( CURRENT-- )) _normal @@ -82,11 +71,16 @@ _complete_{{ .App.HelpName }}() { while IFS='\n' read -r comp; do if [ -n "$comp" ]; then + # If requested, completions are returned with a description. + # The description is preceded by a TAB character. + # For zsh's _describe, we need to use a : instead of a TAB. # We first need to escape any : as part of the completion itself. comp=${comp//:/\\:} + local tab=$(printf '\t') + comp=${comp//$tab/:} completions+=${comp} fi - done < <(COMP_LINE="$words" ${words[0]} ${_SF_CMD:-${words[1]}} self:autocomplete) + done < <(COMP_LINE="$words" CURRENT="$CURRENT" ${words[0]} ${_SF_CMD:-${words[1]}} self:autocomplete) # Let inbuilt _describe handle completions eval _describe "completions" completions $flagPrefix diff --git a/commands/wrappers.go b/commands/wrappers.go index 24f1e7fe..a106db4c 100644 --- a/commands/wrappers.go +++ b/commands/wrappers.go @@ -31,7 +31,8 @@ var ( Hidden: console.Hide, // we use an alias to avoid the command being shown in the help but // still be available for completion - Aliases: []*console.Alias{{Name: "composer"}}, + Aliases: []*console.Alias{{Name: "composer"}}, + ShellComplete: autocompleteComposerWrapper, Action: func(c *console.Context) error { return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony composer"`)} }, @@ -45,6 +46,7 @@ var ( Action: func(c *console.Context) error { return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony console"`)} }, + ShellComplete: autocompleteSymfonyConsoleWrapper, } phpWrapper = &console.Command{ Usage: "Runs the named binary using the configured PHP version", diff --git a/go.mod b/go.mod index 64095c78..a1391474 100644 --- a/go.mod +++ b/go.mod @@ -17,6 +17,7 @@ require ( github.com/nxadm/tail v1.4.11 github.com/olekukonko/tablewriter v0.0.5 github.com/pkg/errors v0.9.1 + github.com/posener/complete v1.2.3 github.com/rjeczalik/notify v0.9.3 github.com/rs/xid v1.5.0 github.com/rs/zerolog v1.33.0 @@ -25,7 +26,7 @@ require ( github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.6 - github.com/symfony-cli/console v1.1.3 + github.com/symfony-cli/console v1.1.4 github.com/symfony-cli/phpstore v1.0.12 github.com/symfony-cli/terminal v1.0.7 golang.org/x/sync v0.7.0 @@ -65,7 +66,6 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/posener/complete v1.2.3 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect diff --git a/go.sum b/go.sum index 6388be5b..fa7feeca 100644 --- a/go.sum +++ b/go.sum @@ -156,6 +156,8 @@ github.com/symfony-cli/console v1.1.2 h1:YVQbl4i03cE0r3QJ/RJs7LWaC3pEy2JI4qhFfL6 github.com/symfony-cli/console v1.1.2/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= github.com/symfony-cli/console v1.1.3 h1:ejzr9LdNe7d7FLIpeTyZm89nSgnlPhaqK7IPeyglV9o= github.com/symfony-cli/console v1.1.3/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= +github.com/symfony-cli/console v1.1.4 h1:A/rzNY8HiZd4r6ip2H2HCtnxwYFdC87eYnPL9H/RucM= +github.com/symfony-cli/console v1.1.4/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA= github.com/symfony-cli/phpstore v1.0.12/go.mod h1:U29bdJBPs9p28PzLIRKfKfKkaiH0kacdyufl3eSB1d4= github.com/symfony-cli/terminal v1.0.7 h1:57L9PUTE2cHfQtP8Ti8dyiiPEYlQ1NBIDpMJ3RPEGPc= diff --git a/local/php/symfony.go b/local/php/symfony.go new file mode 100644 index 00000000..3a1fa596 --- /dev/null +++ b/local/php/symfony.go @@ -0,0 +1,16 @@ +package php + +import "os" + +// ComposerExecutor returns an Executor prepared to run Symfony Console +func SymonyConsoleExecutor(args []string) *Executor { + consolePath := "bin/console" + if _, err := os.Stat("app/console"); err == nil { + consolePath = "app/console" + } + + return &Executor{ + BinName: "php", + Args: append([]string{"php", consolePath}, args...), + } +} diff --git a/main.go b/main.go index 17004d6f..29818857 100644 --- a/main.go +++ b/main.go @@ -73,15 +73,8 @@ func main() { } // called via "symfony console"? if len(args) >= 2 && args[1] == "console" { - args[1] = "bin/console" - if _, err := os.Stat("app/console"); err == nil { - args[1] = "app/console" - } - e := &php.Executor{ - BinName: "php", - Args: args, - ExtraEnv: getCliExtraEnv(), - } + e := php.SymonyConsoleExecutor(args[2:]) + e.ExtraEnv = getCliExtraEnv() os.Exit(e.Execute(false)) } // called via "symfony composer"? From e697eb86cee9289997d405945071d07e356160c8 Mon Sep 17 00:00:00 2001 From: Daniel Pasch-Sannapiu Date: Sat, 6 Jul 2024 14:07:38 +0200 Subject: [PATCH 369/466] Only listen on 127.0.0.1 not all interfaces This is a security risk, because you are exposing your application to other devices on your network if your device has no firewall configured. More importantly though it allows root free running of symfony and on macOS you will no longer get an annoying popup to allow incoming connections. --- local/process/listener.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/local/process/listener.go b/local/process/listener.go index 531b2856..02ec7b81 100644 --- a/local/process/listener.go +++ b/local/process/listener.go @@ -39,15 +39,9 @@ func CreateListener(port, preferredPort int) (net.Listener, int, error) { max = 1 } for { - // we really want to test availability on 127.0.0.1 ln, err = net.Listen("tcp", "127.0.0.1:"+strconv.Itoa(tryPort)) if err == nil { - ln.Close() - // but then, we want to listen to as many local IP's as possible - ln, err = net.Listen("tcp", ":"+strconv.Itoa(tryPort)) - if err == nil { - break - } + break } if port > 0 { return nil, 0, errors.Wrapf(err, "unable to listen on port %d", port) From 6b29ebc96fd41ba91ca7cd262ac5b69e7a726aa2 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 12 Jul 2024 12:07:03 +0200 Subject: [PATCH 370/466] Allow `new projet --webapp --no-git` Fix #498 --- commands/local_new.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/commands/local_new.go b/commands/local_new.go index 28856244..114c600b 100644 --- a/commands/local_new.go +++ b/commands/local_new.go @@ -137,9 +137,6 @@ var localNewCmd = &console.Command{ if symfonyVersion != "" && c.Bool("demo") { return console.Exit("The --version flag is not supported for the Symfony Demo", 1) } - if c.Bool("webapp") && c.Bool("no-git") { - return console.Exit("The --webapp flag cannot be used with --no-git", 1) - } if c.Bool("webapp") && c.Bool("api") { return console.Exit("The --api flag cannot be used with --webapp", 1) } @@ -147,6 +144,9 @@ var localNewCmd = &console.Command{ if len(c.StringSlice("service")) > 0 && !withCloud { return console.Exit("The --service flag cannot be used without --cloud or --upsun", 1) } + if withCloud && c.Bool("no-git") { + return console.Exit("The --no-git flag cannot be used with --cloud or --upsun", 1) + } s := terminal.NewSpinner(terminal.Stderr) s.Start() @@ -178,11 +178,12 @@ var localNewCmd = &console.Command{ if c.Bool("webapp") { if err := runComposer(c, dir, []string{"require", "webapp"}, c.Bool("debug")); err != nil { return err - } - buf, err := git.AddAndCommit(dir, []string{"."}, "Add webapp packages", c.Bool("debug")) - if err != nil { - fmt.Print(buf.String()) - return err + } else if !c.Bool("no-git") { + buf, err := git.AddAndCommit(dir, []string{"."}, "Add webapp packages", c.Bool("debug")) + if err != nil { + fmt.Print(buf.String()) + return err + } } } From 533cd83395daf6ed20fa78cb1901ae06d05dbc4d Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 12 Jul 2024 13:13:23 +0200 Subject: [PATCH 371/466] Rework the SymfonyExecutor to prevent non-friendly user errors when the console binary is not found --- commands/completion_posix.go | 5 +++-- commands/wrappers.go | 2 +- local/php/symfony.go | 21 ++++++++++++++++----- main.go | 7 ++++--- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/commands/completion_posix.go b/commands/completion_posix.go index a4579730..97557993 100644 --- a/commands/completion_posix.go +++ b/commands/completion_posix.go @@ -31,9 +31,10 @@ func autocompleteSymfonyConsoleWrapper(context *console.Context, words complete. // Composer does not support those options yet, so we only use them for Symfony Console args = append(args, "-a1", fmt.Sprintf("-s%s", console.GuessShell())) - os.Exit(php.SymonyConsoleExecutor(args).Execute(false)) + if executor, err := php.SymonyConsoleExecutor(args); err == nil { + os.Exit(executor.Execute(false)) + } - // unreachable return []string{} } diff --git a/commands/wrappers.go b/commands/wrappers.go index a106db4c..896e50ba 100644 --- a/commands/wrappers.go +++ b/commands/wrappers.go @@ -44,7 +44,7 @@ var ( // still be available for completion Aliases: []*console.Alias{{Name: "console"}}, Action: func(c *console.Context) error { - return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony console"`)} + return errors.New(`No Symfony console detected to run "symfony console"`) }, ShellComplete: autocompleteSymfonyConsoleWrapper, } diff --git a/local/php/symfony.go b/local/php/symfony.go index 3a1fa596..14e83c22 100644 --- a/local/php/symfony.go +++ b/local/php/symfony.go @@ -1,16 +1,27 @@ package php -import "os" +import ( + "os" -// ComposerExecutor returns an Executor prepared to run Symfony Console -func SymonyConsoleExecutor(args []string) *Executor { + "github.com/pkg/errors" +) + +// ComposerExecutor returns an Executor prepared to run Symfony Console. +// It returns an error if no console binary is found. +func SymonyConsoleExecutor(args []string) (*Executor, error) { consolePath := "bin/console" - if _, err := os.Stat("app/console"); err == nil { + + if _, err := os.Stat(consolePath); err != nil { + // Fallback to app/console for projects created with older versions of Symfony consolePath = "app/console" + + if _, err2 := os.Stat(consolePath); err2 != nil { + return nil, errors.WithStack(err) + } } return &Executor{ BinName: "php", Args: append([]string{"php", consolePath}, args...), - } + }, nil } diff --git a/main.go b/main.go index 29818857..2d89d1e9 100644 --- a/main.go +++ b/main.go @@ -73,9 +73,10 @@ func main() { } // called via "symfony console"? if len(args) >= 2 && args[1] == "console" { - e := php.SymonyConsoleExecutor(args[2:]) - e.ExtraEnv = getCliExtraEnv() - os.Exit(e.Execute(false)) + if executor, err := php.SymonyConsoleExecutor(args[2:]); err == nil { + executor.ExtraEnv = getCliExtraEnv() + os.Exit(executor.Execute(false)) + } } // called via "symfony composer"? if len(args) >= 2 && args[1] == "composer" { From 6e75a5029fbb5240104ce436347fc288841f230e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 17 Jul 2024 16:53:35 +0200 Subject: [PATCH 372/466] Add support for MySQL/MariaDB/PostgreSQL HA --- envs/envs.go | 15 +++++--- envs/envs_test.go | 93 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 6 deletions(-) diff --git a/envs/envs.go b/envs/envs.go index b8832353..c36a2d1d 100644 --- a/envs/envs.go +++ b/envs/envs.go @@ -123,8 +123,11 @@ func extractRelationshipsEnvs(env Environment) Envs { } prefix = strings.Replace(prefix, "-", "_", -1) - if scheme == "pgsql" || scheme == "mysql" { - if scheme == "pgsql" { + // HA support via scheme-replica + isPostgreSQL := strings.HasPrefix(scheme.(string), "pgsql") + isMySQL := strings.HasPrefix(scheme.(string), "mysql") + if isPostgreSQL || isMySQL { + if isPostgreSQL { // works for both Doctrine and Go endpoint["scheme"] = "postgres" } @@ -152,7 +155,7 @@ func extractRelationshipsEnvs(env Environment) Envs { charset := "utf8" if envCharset := os.Getenv(fmt.Sprintf("%sCHARSET", prefix)); envCharset != "" { charset = envCharset - } else if scheme == "mysql" { + } else if isMySQL { charset = "utf8mb4" } values[fmt.Sprintf("%sURL", prefix)] = values[fmt.Sprintf("%sURL", prefix)] + "&charset=" + charset @@ -172,7 +175,7 @@ func extractRelationshipsEnvs(env Environment) Envs { version := strings.SplitN(v.(string), ":", 2)[1] // we actually provide mariadb not mysql - if endpoint["scheme"].(string) == "mysql" { + if isMySQL { minor := 0 if version == "10.2" { minor = 7 @@ -205,13 +208,13 @@ func extractRelationshipsEnvs(env Environment) Envs { values[fmt.Sprintf("%sDATABASE", prefix)] = path if env.Local() { - if scheme == "pgsql" { + if isPostgreSQL { values["PGHOST"] = endpoint["host"].(string) values["PGPORT"] = formatInt(endpoint["port"]) values["PGDATABASE"] = path values["PGUSER"] = endpoint["username"].(string) values["PGPASSWORD"] = endpoint["password"].(string) - } else if scheme == "mysql" { + } else if isMySQL { values["MYSQL_HOST"] = endpoint["host"].(string) values["MYSQL_TCP_PORT"] = formatInt(endpoint["port"]) } diff --git a/envs/envs_test.go b/envs/envs_test.go index 09431a1e..d02a62c5 100644 --- a/envs/envs_test.go +++ b/envs/envs_test.go @@ -193,6 +193,99 @@ func (s *ScenvSuite) TestCloudTunnelDatabaseURLs(c *C) { c.Assert(rels["POSTGRESQL_URL"], Equals, "postgres://main:main@127.0.0.1:30000/main?sslmode=disable&charset=utf8&serverVersion=13") } +func (s *ScenvSuite) TestCloudHADatabaseURLs(c *C) { + env := fakeEnv{ + Rels: map[string][]map[string]interface{}{ + "database-replica": { + { + "username": "user", + "scheme": "mysql", + "service": "db", + "fragment": interface{}(nil), + "ip": "169.254.150.110", + "hostname": "e3n2frcxjqipslsc6sq7rfmwzm.db.service.._.platform.sh", + "port": 3306, + "cluster": "gqiujktuqrcxm-main-bvxea6i", + "host": "database-replica.internal", + "rel": "mysql-replica", + "path": "main", + "query": map[string]interface{}{"is_master": false}, + "password": "", + "type": "mysql:10.6", + "public": false, + "host_mapped": false, + }, + }, + "database": { + { + "username": "user", + "scheme": "mysql", + "service": "db", + "fragment": interface{}(nil), + "ip": "169.254.193.18", + "hostname": "jvlu7c7jx3nzt3cowwkcrslhcq.db.service.._.platform.sh", + "port": 3306, + "cluster": "gqiujktuqrcxm-main-bvxea6i", + "host": "database.internal", + "rel": "mysql", + "path": "main", + "query": map[string]interface{}{"is_master": true}, + "password": "", + "type": "mysql:10.6", + "public": false, + "host_mapped": false, + }, + }, + "psql-replica": { + { + "username": "user", + "scheme": "pgsql", + "service": "db", + "fragment": interface{}(nil), + "ip": "169.254.150.110", + "hostname": "e3n2frcxjqipslsc6sq7rfmwzm.db.service.._.platform.sh", + "port": 5432, + "cluster": "gqiujktuqrcxm-main-bvxea6i", + "host": "psql-replica.internal", + "rel": "pgsql-replica", + "path": "main", + "query": map[string]interface{}{"is_master": false}, + "password": "", + "type": "postgresql:15", + "public": false, + "host_mapped": false, + }, + }, + "psql": { + { + "username": "user", + "scheme": "pgsql", + "service": "db", + "fragment": interface{}(nil), + "ip": "169.254.193.18", + "hostname": "jvlu7c7jx3nzt3cowwkcrslhcq.db.service.._.platform.sh", + "port": 5432, + "cluster": "gqiujktuqrcxm-main-bvxea6i", + "host": "psql.internal", + "rel": "pgsql", + "path": "main", + "query": map[string]interface{}{"is_master": true}, + "password": "", + "type": "postgresql:15", + "public": false, + "host_mapped": false, + }, + }, + }, + } + + rels := extractRelationshipsEnvs(env) + c.Assert(rels["DATABASE_URL"], Equals, "mysql://user@database.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=10.6.0-MariaDB") + c.Assert(rels["DATABASE_REPLICA_URL"], Equals, "mysql://user@database-replica.internal:3306/main?sslmode=disable&charset=utf8mb4&serverVersion=10.6.0-MariaDB") + c.Assert(rels["PSQL_URL"], Equals, "postgres://user@psql.internal:5432/main?sslmode=disable&charset=utf8&serverVersion=15") + c.Assert(rels["PSQL_REPLICA_URL"], Equals, "postgres://user@psql-replica.internal:5432/main?sslmode=disable&charset=utf8&serverVersion=15") +} + func (s *ScenvSuite) TestDoctrineConfigTakesPrecedenceDatabaseURLs(c *C) { env := fakeEnv{ Rels: map[string][]map[string]interface{}{ From 72333d498bb327f0a1d07e98fe5131854e65fce7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 18 Jul 2024 14:54:46 +0200 Subject: [PATCH 373/466] Bump deps --- go.mod | 26 ++++++++++---------- go.sum | 78 ++++++++++++++++++++++++++++------------------------------ 2 files changed, 51 insertions(+), 53 deletions(-) diff --git a/go.mod b/go.mod index a1391474..e5bcab1a 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v27.0.0+incompatible - github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 + github.com/docker/docker v27.0.3+incompatible + github.com/elazarl/goproxy v0.0.0-20240618083138-03be62527ccb github.com/fabpot/local-php-security-checker/v2 v2.1.3 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.7.0 @@ -72,17 +72,17 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/sdk v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/term v0.22.0 // indirect golang.org/x/time v0.5.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index fa7feeca..c539f3f6 100644 --- a/go.sum +++ b/go.sum @@ -21,14 +21,14 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.0.0+incompatible h1:JRugTYuelmWlW0M3jakcIadDx2HUoUO6+Tf2C5jVfwA= -github.com/docker/docker v27.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwXNUAYz9aXyEBE= +github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 h1:m62nsMU279qRD9PQSWD1l66kmkXzuYcnVJqL4XLeV2M= -github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20240618083138-03be62527ccb h1:2SoxRauy2IqekRMggrQk3yNI5X6omSnk6ugVbFywwXs= +github.com/elazarl/goproxy v0.0.0-20240618083138-03be62527ccb/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/fabpot/local-php-security-checker/v2 v2.1.3 h1:sL69IHlEvlmaOnyzfOhIAbrG1Ugp2IibM3f6JVxV+yk= @@ -50,6 +50,8 @@ github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= @@ -152,10 +154,6 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/symfony-cli/cert v1.0.6 h1:FKdNRhKSxc+IcOkSRYvcOjr4jyZxGHiNS0xCN0uXZQI= github.com/symfony-cli/cert v1.0.6/go.mod h1:7Lt0uwi9z6DYTwLQeKsdPrsTqvTZRTqdlVSDJJqKUVo= -github.com/symfony-cli/console v1.1.2 h1:YVQbl4i03cE0r3QJ/RJs7LWaC3pEy2JI4qhFfL6vpLU= -github.com/symfony-cli/console v1.1.2/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= -github.com/symfony-cli/console v1.1.3 h1:ejzr9LdNe7d7FLIpeTyZm89nSgnlPhaqK7IPeyglV9o= -github.com/symfony-cli/console v1.1.3/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= github.com/symfony-cli/console v1.1.4 h1:A/rzNY8HiZd4r6ip2H2HCtnxwYFdC87eYnPL9H/RucM= github.com/symfony-cli/console v1.1.4/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA= @@ -171,29 +169,29 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= 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.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7 h1:wDLEX9a7YQoKdKNQt88rtydkqDxeGaBUTnIYc3iG/mA= +golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -201,8 +199,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -218,11 +216,11 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= 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.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= @@ -237,14 +235,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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= From fcb097cf0324b8d9b22a3b343ee77812cb0088a5 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 18 Jul 2024 14:59:13 +0200 Subject: [PATCH 374/466] Fix releaser --- .github/workflows/releaser.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 87973150..5f116172 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -76,11 +76,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 + uses: goreleaser/goreleaser-action@v6 # only for tags if: startsWith(github.ref, 'refs/tags/v') with: - version: latest + version: '~> v2' args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4afc16a688cc281c632db5bd72f7cdc5810dc9e1 Mon Sep 17 00:00:00 2001 From: Kevin Studer Date: Fri, 19 Jul 2024 09:35:57 +0200 Subject: [PATCH 375/466] Allow installer to install specific version --- installer/bash-installer | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/installer/bash-installer b/installer/bash-installer index fa69881e..ee696217 100755 --- a/installer/bash-installer +++ b/installer/bash-installer @@ -22,7 +22,8 @@ CLI_CONFIG_DIR=".symfony5" CLI_EXECUTABLE="symfony" CLI_TMP_NAME="$CLI_EXECUTABLE-"$(date +"%s") CLI_NAME="Symfony CLI" -CLI_DOWNLOAD_URL_PATTERN="https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_~platform~.tar.gz" +CLI_VERSION="${CLI_VERSION:-latest}" +CLI_DOWNLOAD_URL_PATTERN="https://github.com/symfony-cli/symfony-cli/releases/${CLI_VERSION}/download/symfony-cli_~platform~.tar.gz" CLI_TMPDIR="${TMPDIR:-/tmp}" function output { @@ -53,7 +54,6 @@ function output { } output "${CLI_NAME} installer" "heading" - binary_dest="${HOME}/${CLI_CONFIG_DIR}/bin" custom_dir="false" @@ -79,6 +79,15 @@ case $1 in esac done +output "\nSanity check" "heading" + +# Check that the version is valid +if [[ $CLI_VERSION =~ '^[0-9]+(\.[0-9]+)*$' || $CLI_VERSION == 'latest' ]]; then + output " [*] Version has valid format" "success" +else + output " [ ] ERROR: Version has invalid format." "error" +fi + # Run environment checks. output "\nEnvironment check" "heading" @@ -163,14 +172,14 @@ platform="${kernel}_${machine}" # The necessary checks have passed. Start downloading the right version. output "\nDownload" "heading" -latest_url=${CLI_DOWNLOAD_URL_PATTERN/~platform~/${platform}} -output " Downloading ${latest_url}..."; +version_url=${CLI_DOWNLOAD_URL_PATTERN/~platform~/${platform}} +output " Downloading ${version_url}..."; case $downloader in "curl") - curl --fail --location "${latest_url}" > "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" + curl --fail --location "${version_url}" > "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" ;; "wget") - wget -q --show-progress "${latest_url}" -O "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" + wget -q --show-progress "${version_url}" -O "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" ;; esac From 82a9432af8783c12df8ed1ff54001336efb1dae2 Mon Sep 17 00:00:00 2001 From: Kevin Studer Date: Fri, 19 Jul 2024 09:55:32 +0200 Subject: [PATCH 376/466] Use correct url for not latest release --- installer/bash-installer | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/installer/bash-installer b/installer/bash-installer index ee696217..18940615 100755 --- a/installer/bash-installer +++ b/installer/bash-installer @@ -23,7 +23,9 @@ CLI_EXECUTABLE="symfony" CLI_TMP_NAME="$CLI_EXECUTABLE-"$(date +"%s") CLI_NAME="Symfony CLI" CLI_VERSION="${CLI_VERSION:-latest}" -CLI_DOWNLOAD_URL_PATTERN="https://github.com/symfony-cli/symfony-cli/releases/${CLI_VERSION}/download/symfony-cli_~platform~.tar.gz" +CLI_DOWNLOAD_URL_LATEST_PATTERN="https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_~platform~.tar.gz" +CLI_DOWNLOAD_URL_VERSION_PATTERN="https://github.com/symfony-cli/symfony-cli/releases/download/v~version~/symfony-cli_~platform~.tar.gz" + CLI_TMPDIR="${TMPDIR:-/tmp}" function output { @@ -82,10 +84,11 @@ done output "\nSanity check" "heading" # Check that the version is valid -if [[ $CLI_VERSION =~ '^[0-9]+(\.[0-9]+)*$' || $CLI_VERSION == 'latest' ]]; then +if [[ "$CLI_VERSION" =~ ^[0-9]+(\.[0-9]+)*$ || "$CLI_VERSION" == 'latest' ]]; then output " [*] Version has valid format" "success" else output " [ ] ERROR: Version has invalid format." "error" + exit 1 fi # Run environment checks. @@ -172,14 +175,19 @@ platform="${kernel}_${machine}" # The necessary checks have passed. Start downloading the right version. output "\nDownload" "heading" -version_url=${CLI_DOWNLOAD_URL_PATTERN/~platform~/${platform}} -output " Downloading ${version_url}..."; +download_url="${CLI_DOWNLOAD_URL_LATEST_PATTERN}" +if [[ "$CLI_VERSION" != 'latest' ]]; then + download_url=${CLI_DOWNLOAD_URL_VERSION_PATTERN/~version~/${CLI_VERSION}} +fi + +download_url=${download_url/~platform~/${platform}} +output " Downloading ${download_url}..."; case $downloader in "curl") - curl --fail --location "${version_url}" > "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" + curl --fail --location "${download_url}" > "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" ;; "wget") - wget -q --show-progress "${version_url}" -O "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" + wget -q --show-progress "${download_url}" -O "${CLI_TMPDIR}/${CLI_TMP_NAME}.tar.gz" ;; esac From 958ba2ea07c6829f65405c8ba9b606ad16ba1535 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 19 Jul 2024 09:59:30 +0200 Subject: [PATCH 377/466] Ensure we always have a scheme in Docker mapping --- envs/docker.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/envs/docker.go b/envs/docker.go index ee5eab42..e674c96e 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -460,6 +460,8 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ rels[""]["scheme"] = "http" } else if p.PrivatePort == 443 || p.PrivatePort == 8443 { rels[""]["scheme"] = "https" + } else { + return nil } return rels } From 669731ff6346f338cbebe9e29df80e094e3c27de Mon Sep 17 00:00:00 2001 From: Kevin Studer Date: Fri, 19 Jul 2024 11:02:24 +0200 Subject: [PATCH 378/466] Return scheme for undefined docker container --- envs/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envs/docker.go b/envs/docker.go index e674c96e..aa218943 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -461,7 +461,7 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ } else if p.PrivatePort == 443 || p.PrivatePort == 8443 { rels[""]["scheme"] = "https" } else { - return nil + rels[""]["scheme"] = "undefined" } return rels } From b04f734b121a7e16c8eb3389e4b47e053ba65b57 Mon Sep 17 00:00:00 2001 From: Kevin Studer Date: Fri, 19 Jul 2024 11:10:56 +0200 Subject: [PATCH 379/466] Added test for generic container parsing --- envs/envs_test.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/envs/envs_test.go b/envs/envs_test.go index d02a62c5..c4d83199 100644 --- a/envs/envs_test.go +++ b/envs/envs_test.go @@ -70,6 +70,27 @@ func (f fakeEnv) Local() bool { return true } +func (s *ScenvSuite) TestGenericContainerExposesHostAndPort(c *C) { + env := fakeEnv{ + Rels: map[string][]map[string]interface{}{ + "container": { + map[string]interface{}{ + "host": "localhost", + "ip": "127.0.0.1", + "port": 9200, + "rel": "simple", + "scheme": "undefined", + }, + }, + }, + } + + rels := extractRelationshipsEnvs(env) + c.Assert(rels["CONTAINER_HOST"], Equals, "localhost") + c.Assert(rels["CONTAINER_PORT"], Equals, "9200") + c.Assert(rels["CONTAINER_IP"], Equals, "127.0.0.1") +} + func (s *ScenvSuite) TestElasticsearchURLEndsWithTrailingSlash(c *C) { env := fakeEnv{ Rels: map[string][]map[string]interface{}{ From 3fbf44885671d05bca5920c87cec16c47151371b Mon Sep 17 00:00:00 2001 From: Kevin Studer Date: Fri, 19 Jul 2024 13:02:32 +0200 Subject: [PATCH 380/466] Renamed scheme to tcp --- envs/docker.go | 2 +- envs/envs_test.go | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/envs/docker.go b/envs/docker.go index aa218943..2c3fc649 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -461,7 +461,7 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ } else if p.PrivatePort == 443 || p.PrivatePort == 8443 { rels[""]["scheme"] = "https" } else { - rels[""]["scheme"] = "undefined" + rels[""]["scheme"] = "tcp" } return rels } diff --git a/envs/envs_test.go b/envs/envs_test.go index c4d83199..d02a62c5 100644 --- a/envs/envs_test.go +++ b/envs/envs_test.go @@ -70,27 +70,6 @@ func (f fakeEnv) Local() bool { return true } -func (s *ScenvSuite) TestGenericContainerExposesHostAndPort(c *C) { - env := fakeEnv{ - Rels: map[string][]map[string]interface{}{ - "container": { - map[string]interface{}{ - "host": "localhost", - "ip": "127.0.0.1", - "port": 9200, - "rel": "simple", - "scheme": "undefined", - }, - }, - }, - } - - rels := extractRelationshipsEnvs(env) - c.Assert(rels["CONTAINER_HOST"], Equals, "localhost") - c.Assert(rels["CONTAINER_PORT"], Equals, "9200") - c.Assert(rels["CONTAINER_IP"], Equals, "127.0.0.1") -} - func (s *ScenvSuite) TestElasticsearchURLEndsWithTrailingSlash(c *C) { env := fakeEnv{ Rels: map[string][]map[string]interface{}{ From 3c2a1929f459fb954b0e1e2c854d9978801d2f6f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Jul 2024 10:07:25 +0200 Subject: [PATCH 381/466] Remove unused code --- local/platformsh/generator/config.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/local/platformsh/generator/config.go b/local/platformsh/generator/config.go index eaa770be..e1361726 100644 --- a/local/platformsh/generator/config.go +++ b/local/platformsh/generator/config.go @@ -195,25 +195,6 @@ func parsePHPExtensions() (string, error) { return extsAsString, nil } -func parseLine(line string) (string, []string) { - next := strings.Index(line[1:], "|") + 1 - name := strings.TrimSpace(line[1:next]) - var versions []string - for { - current := next + 1 - nextIndex := strings.Index(line[current:], "|") - if nextIndex == -1 { - break - } - next = nextIndex + current - versions = append(versions, strings.TrimSpace(line[current:next])) - if next >= len(line) { - break - } - } - return name, versions -} - func sortVersions(versions []string) ([]string, error) { parsedVersions := make([]*version.Version, len(versions)) for i, raw := range versions { From c88ac55594555bf588641af3dd918f0ab2dffca9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 08:12:58 +0000 Subject: [PATCH 382/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 58a6e238..1693cfe8 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -169,7 +169,7 @@ var availableServices = []*service{ Type: "mariadb", Versions: serviceVersions{ Deprecated: []string{"5.5", "10.0", "10.1", "10.2", "10.3"}, - Supported: []string{"10.4", "10.5", "10.6", "10.11", "11.0", "11.2"}, + Supported: []string{"10.4", "10.5", "10.6", "10.11", "11.0", "11.2", "11.4"}, }, }, { From e067dfd3fe06cf1c3dea83c40205df312f580b67 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:13:50 +0000 Subject: [PATCH 383/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 1693cfe8..1580b9a7 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -189,8 +189,8 @@ var availableServices = []*service{ { Type: "mongodb-enterprise", Versions: serviceVersions{ - Deprecated: []string{"4.0"}, - Supported: []string{"4.2", "4.4", "5.0", "6.0", "7.0"}, + Deprecated: []string{"4.0", "4.2"}, + Supported: []string{"4.4", "5.0", "6.0", "7.0"}, }, }, { From 00511a2f26ebe7b1040660a8fb0ce58c34c90949 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:13:05 +0000 Subject: [PATCH 384/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 1580b9a7..feb2a9bf 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -38,7 +38,7 @@ var availablePHPExts = map[string][]string{ "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "enchant": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "event": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, + "event": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "exif": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "ffi": {"7.4", "8.0", "8.1", "8.2", "8.3"}, "fileinfo": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, @@ -116,7 +116,7 @@ var availablePHPExts = map[string][]string{ "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "tideways": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "tideways": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "tideways_xhprof": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "tidy": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, From 367ab89bd03a1404fe92c59194d33e3e6f1cd5f8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 27 Aug 2024 13:02:19 +0200 Subject: [PATCH 385/466] Bump deps --- go.mod | 42 +++++++++++------------ go.sum | 104 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 73 insertions(+), 73 deletions(-) diff --git a/go.mod b/go.mod index e5bcab1a..3a010527 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v27.0.3+incompatible - github.com/elazarl/goproxy v0.0.0-20240618083138-03be62527ccb + github.com/docker/docker v27.1.2+incompatible + github.com/elazarl/goproxy v0.0.0-20240726154733-8b0c20506380 github.com/fabpot/local-php-security-checker/v2 v2.1.3 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.7.0 @@ -19,18 +19,18 @@ require ( github.com/pkg/errors v0.9.1 github.com/posener/complete v1.2.3 github.com/rjeczalik/notify v0.9.3 - github.com/rs/xid v1.5.0 + github.com/rs/xid v1.6.0 github.com/rs/zerolog v1.33.0 - github.com/schollz/progressbar/v3 v3.14.4 + github.com/schollz/progressbar/v3 v3.14.6 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.6 - github.com/symfony-cli/console v1.1.4 + github.com/symfony-cli/console v1.1.5 github.com/symfony-cli/phpstore v1.0.12 github.com/symfony-cli/terminal v1.0.7 - golang.org/x/sync v0.7.0 - golang.org/x/text v0.16.0 + golang.org/x/sync v0.8.0 + golang.org/x/text v0.17.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) @@ -47,7 +47,7 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect @@ -56,7 +56,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -72,18 +72,18 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect - golang.org/x/crypto v0.25.0 // indirect - golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7 // indirect - golang.org/x/net v0.27.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/time v0.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/otel v1.29.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 // indirect + go.opentelemetry.io/otel/metric v1.29.0 // indirect + go.opentelemetry.io/otel/sdk v1.29.0 // indirect + go.opentelemetry.io/otel/trace v1.29.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/time v0.6.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.1 // indirect diff --git a/go.sum b/go.sum index c539f3f6..0fa7d954 100644 --- a/go.sum +++ b/go.sum @@ -21,14 +21,14 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwXNUAYz9aXyEBE= -github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.1.2+incompatible h1:AhGzR1xaQIy53qCkxARaFluI00WPGtXn0AJuoQsVYTY= +github.com/docker/docker v27.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20240618083138-03be62527ccb h1:2SoxRauy2IqekRMggrQk3yNI5X6omSnk6ugVbFywwXs= -github.com/elazarl/goproxy v0.0.0-20240618083138-03be62527ccb/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20240726154733-8b0c20506380 h1:1NyRx2f4W4WBRyg0Kys0ZbaNmDDzZ2R/C7DTi+bbsJ0= +github.com/elazarl/goproxy v0.0.0-20240726154733-8b0c20506380/go.mod h1:thX175TtLTzLj3p7N/Q9IiKZ7NF+p72cvL91emV0hzo= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/fabpot/local-php-security-checker/v2 v2.1.3 h1:sL69IHlEvlmaOnyzfOhIAbrG1Ugp2IibM3f6JVxV+yk= @@ -46,16 +46,16 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -90,8 +90,8 @@ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -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/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= @@ -128,16 +128,16 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY= github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc= -github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= 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/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= +github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/schollz/progressbar/v3 v3.14.4 h1:W9ZrDSJk7eqmQhd3uxFNNcTr0QL+xuGNI9dEMrw0r74= -github.com/schollz/progressbar/v3 v3.14.4/go.mod h1:aT3UQ7yGm+2ZjeXPqsjTenwL3ddUiuZ0kfQ/2tHlyNI= +github.com/schollz/progressbar/v3 v3.14.6 h1:GyjwcWBAf+GFDMLziwerKvpuS7ZF+mNTAXIB2aspiZs= +github.com/schollz/progressbar/v3 v3.14.6/go.mod h1:Nrzpuw3Nl0srLY0VlTvC4V6RL50pcEymjy6qyJAaLa0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -154,8 +154,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/symfony-cli/cert v1.0.6 h1:FKdNRhKSxc+IcOkSRYvcOjr4jyZxGHiNS0xCN0uXZQI= github.com/symfony-cli/cert v1.0.6/go.mod h1:7Lt0uwi9z6DYTwLQeKsdPrsTqvTZRTqdlVSDJJqKUVo= -github.com/symfony-cli/console v1.1.4 h1:A/rzNY8HiZd4r6ip2H2HCtnxwYFdC87eYnPL9H/RucM= -github.com/symfony-cli/console v1.1.4/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= +github.com/symfony-cli/console v1.1.5 h1:zN1n0cN5jTYx+wf+AxEtNprPGsoyYtgsQHia1tLFgME= +github.com/symfony-cli/console v1.1.5/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA= github.com/symfony-cli/phpstore v1.0.12/go.mod h1:U29bdJBPs9p28PzLIRKfKfKkaiH0kacdyufl3eSB1d4= github.com/symfony-cli/terminal v1.0.7 h1:57L9PUTE2cHfQtP8Ti8dyiiPEYlQ1NBIDpMJ3RPEGPc= @@ -169,29 +169,29 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= +go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 h1:dIIDULZJpgdiHz5tXrTgKIMLkus6jEFa7x5SOKcyR7E= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0/go.mod h1:jlRVBe7+Z1wyxFSUs48L6OBQZ5JwH2Hg/Vbl+t9rAgI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 h1:JAv0Jwtl01UFiyWZEMiJZBiTlv5A50zNs8lsthXqIio= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0/go.mod h1:QNKLmUEAq2QUbPQUfvw4fmv0bgbK7UlOSFCnXyfvSNc= +go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= +go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= +go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= +go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= +go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= 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.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= -golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7 h1:wDLEX9a7YQoKdKNQt88rtydkqDxeGaBUTnIYc3iG/mA= -golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA= +golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -199,13 +199,13 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +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-20180926160741-c2ed4eda69e7/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= @@ -215,18 +215,18 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= 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.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -235,12 +235,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/genproto/googleapis/api v0.0.0-20240822170219-fc7c04adadcd h1:BBOTEWLuuEGQy9n1y9MhVJ9Qt0BDu21X8qZs71/uPZo= +google.golang.org/genproto/googleapis/api v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:fO8wJzT2zbQbAjbIoos1285VfEIYKDDY+Dt+WpTkh6g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd h1:6TEm2ZxXoQmFWFlt1vNxvVOa1Q0dXFQD1m/rYjXmS0E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 6355163aac5ac75ccb286da37396f1a28238d0a3 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sun, 8 Sep 2024 17:28:44 +0200 Subject: [PATCH 386/466] fix: bash side-effects from bash completions --- commands/resources/completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/resources/completion.bash b/commands/resources/completion.bash index 52a45e96..f6a3c601 100644 --- a/commands/resources/completion.bash +++ b/commands/resources/completion.bash @@ -46,7 +46,7 @@ _complete_{{ .App.HelpName }}() { done # Use newline as only separator to allow space in completion values - IFS=$'\n' + local IFS=$'\n' local cur prev words cword _get_comp_words_by_ref -n := cur prev words cword From ad64103c60406ac69ddea5bb1b754892ab19c7f0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 16:12:40 +0000 Subject: [PATCH 387/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 1 + 1 file changed, 1 insertion(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 0159ae9e..7123ad78 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -2580,6 +2580,7 @@ var Commands = []*console.Command{ }, Usage: "List teams", Flags: []console.Flag{ + &console.BoolFlag{Name: "all", Aliases: []string{"A"},}, &console.StringFlag{Name: "columns",}, &console.StringFlag{Name: "count", Aliases: []string{"c"},}, &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, From 43fbcd071eacb67eb8e179ee4c51af2a7e4d04b4 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 5 Oct 2024 12:20:37 +0200 Subject: [PATCH 388/466] Always log Docker connection error if `--debug` flag is set --- envs/docker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/envs/docker.go b/envs/docker.go index 2c3fc649..ac8e0661 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -94,7 +94,8 @@ func (l *Local) RelationshipsFromDocker() Relationships { if err != nil { if docker.IsErrConnectionFailed(err) { terminal.Logger.Warn().Msg(err.Error()) - } else if l.Debug { + } + if l.Debug { fmt.Fprintf(os.Stderr, "ERROR: %s\n", err) } return nil From b5f3d1f5ed4b9fedb65f72d536f6180752cb5b10 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 5 Oct 2024 15:03:39 +0200 Subject: [PATCH 389/466] remove custom timeout for docker builtin --- envs/docker.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/envs/docker.go b/envs/docker.go index 2c3fc649..fb99494d 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -23,7 +23,6 @@ import ( "bytes" "context" "fmt" - "net" "net/url" "os" "path/filepath" @@ -69,17 +68,7 @@ func (l *Local) RelationshipsFromDocker() Relationships { return nil } - opts := [](docker.Opt){docker.FromEnv} - if host := os.Getenv(docker.EnvOverrideHost); host != "" && !strings.HasPrefix(host, "unix://") { - // Setting a dialer on top of a unix socket breaks the connection - // as the client then tries to connect to http:///path/to/socket and - // thus tries to resolve the /path/to/socket host - dialer := &net.Dialer{ - Timeout: 2 * time.Second, - } - opts = append(opts, docker.WithDialContext(dialer.DialContext)) - } - client, err := docker.NewClientWithOpts(opts...) + client, err := docker.NewClientWithOpts(docker.WithTimeout(2*time.Second), docker.FromEnv) if err != nil { if l.Debug { fmt.Fprintf(os.Stderr, "ERROR: %s\n", err) From 646dabed6f536a6273ab7fec9421f4d468732a4a Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 5 Oct 2024 15:06:54 +0200 Subject: [PATCH 390/466] Make Docker connection use Docker Desktop socket if available --- envs/docker.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/envs/docker.go b/envs/docker.go index fb99494d..dcb8df2d 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -68,7 +68,7 @@ func (l *Local) RelationshipsFromDocker() Relationships { return nil } - client, err := docker.NewClientWithOpts(docker.WithTimeout(2*time.Second), docker.FromEnv) + client, err := docker.NewClientWithOpts(docker.WithTimeout(2*time.Second), docker.FromEnv, dockerUseDesktopSocketIfAvailable) if err != nil { if l.Debug { fmt.Fprintf(os.Stderr, "ERROR: %s\n", err) @@ -462,6 +462,24 @@ func formatDockerPort(port uint16) string { return strconv.FormatInt(int64(port), 10) } +func dockerUseDesktopSocketIfAvailable(c *docker.Client) error { + if c.DaemonHost() != docker.DefaultDockerHost { + return nil + } + + homeDir, err := os.UserHomeDir() + if err != nil { + return err + } + + socketPath := filepath.Join(homeDir, ".docker/run/docker.sock") + if _, err := os.Stat(socketPath); err != nil { + return nil + } + + return docker.WithHost(`unix://` + socketPath)(c) +} + func getEnvValue(env string, key string) string { if len(key) == len(env) { return "" From 8b8583da5e919358820d0069c507ea1386871c93 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 8 Oct 2024 08:46:30 +0200 Subject: [PATCH 391/466] Bump deps --- go.mod | 34 +++++++++++----------- go.sum | 89 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 61 insertions(+), 62 deletions(-) diff --git a/go.mod b/go.mod index 3a010527..3f8f89fd 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v27.1.2+incompatible - github.com/elazarl/goproxy v0.0.0-20240726154733-8b0c20506380 + github.com/docker/docker v27.3.1+incompatible + github.com/elazarl/goproxy v0.0.0-20240909085733-6741dbfc16a1 github.com/fabpot/local-php-security-checker/v2 v2.1.3 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.7.0 @@ -21,7 +21,7 @@ require ( github.com/rjeczalik/notify v0.9.3 github.com/rs/xid v1.6.0 github.com/rs/zerolog v1.33.0 - github.com/schollz/progressbar/v3 v3.14.6 + github.com/schollz/progressbar/v3 v3.16.1 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 @@ -30,7 +30,7 @@ require ( github.com/symfony-cli/phpstore v1.0.12 github.com/symfony-cli/terminal v1.0.7 golang.org/x/sync v0.8.0 - golang.org/x/text v0.17.0 + golang.org/x/text v0.19.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) @@ -67,23 +67,23 @@ require ( github.com/opencontainers/image-spec v1.1.0 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/rivo/uniseg v0.4.7 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect - go.opentelemetry.io/otel v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 // indirect - go.opentelemetry.io/otel/metric v1.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.29.0 // indirect - go.opentelemetry.io/otel/trace v1.29.0 // indirect - golang.org/x/crypto v0.26.0 // indirect - golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/time v0.6.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/sdk v1.30.0 // indirect + go.opentelemetry.io/otel/trace v1.30.0 // indirect + golang.org/x/crypto v0.28.0 // indirect + golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/time v0.7.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.1 // indirect diff --git a/go.sum b/go.sum index 0fa7d954..73c4fee1 100644 --- a/go.sum +++ b/go.sum @@ -10,6 +10,8 @@ github.com/blackfireio/osinfo v1.0.5 h1:6hlaWzfcpb87gRmznVf7wSdhysGqLRz9V/xuSdCE github.com/blackfireio/osinfo v1.0.5/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/chengxilo/virtualterm v1.0.4 h1:Z6IpERbRVlfB8WkOmtbHiDbBANU7cimRIof7mk9/PwM= +github.com/chengxilo/virtualterm v1.0.4/go.mod h1:DyxxBZz/x1iqJjFxTFcr6/x+jSpqN0iwWCOK1q10rlY= github.com/compose-spec/compose-go v1.20.2 h1:u/yfZHn4EaHGdidrZycWpxXgFffjYULlTbRfJ51ykjQ= github.com/compose-spec/compose-go v1.20.2/go.mod h1:+MdqXV4RA7wdFsahh/Kb8U0pAJqkg7mr4PM9tFKU8RM= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= @@ -21,14 +23,14 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.1.2+incompatible h1:AhGzR1xaQIy53qCkxARaFluI00WPGtXn0AJuoQsVYTY= -github.com/docker/docker v27.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= +github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20240726154733-8b0c20506380 h1:1NyRx2f4W4WBRyg0Kys0ZbaNmDDzZ2R/C7DTi+bbsJ0= -github.com/elazarl/goproxy v0.0.0-20240726154733-8b0c20506380/go.mod h1:thX175TtLTzLj3p7N/Q9IiKZ7NF+p72cvL91emV0hzo= +github.com/elazarl/goproxy v0.0.0-20240909085733-6741dbfc16a1 h1:g7YUigN4dW2+zpdusdTTghZ+5Py3BaUMAStvL8Nk+FY= +github.com/elazarl/goproxy v0.0.0-20240909085733-6741dbfc16a1/go.mod h1:thX175TtLTzLj3p7N/Q9IiKZ7NF+p72cvL91emV0hzo= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/fabpot/local-php-security-checker/v2 v2.1.3 h1:sL69IHlEvlmaOnyzfOhIAbrG1Ugp2IibM3f6JVxV+yk= @@ -73,7 +75,6 @@ github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+h github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -129,15 +130,15 @@ github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY= github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -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/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/schollz/progressbar/v3 v3.14.6 h1:GyjwcWBAf+GFDMLziwerKvpuS7ZF+mNTAXIB2aspiZs= -github.com/schollz/progressbar/v3 v3.14.6/go.mod h1:Nrzpuw3Nl0srLY0VlTvC4V6RL50pcEymjy6qyJAaLa0= +github.com/schollz/progressbar/v3 v3.16.1 h1:RnF1neWZFzLCoGx8yp1yF7SDl4AzNDI5y4I0aUJRrZQ= +github.com/schollz/progressbar/v3 v3.16.1/go.mod h1:I2ILR76gz5VXqYMIY/LdLecvMHDPVcQm3W/MSKi1TME= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -169,29 +170,29 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= -go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 h1:dIIDULZJpgdiHz5tXrTgKIMLkus6jEFa7x5SOKcyR7E= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0/go.mod h1:jlRVBe7+Z1wyxFSUs48L6OBQZ5JwH2Hg/Vbl+t9rAgI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 h1:JAv0Jwtl01UFiyWZEMiJZBiTlv5A50zNs8lsthXqIio= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0/go.mod h1:QNKLmUEAq2QUbPQUfvw4fmv0bgbK7UlOSFCnXyfvSNc= -go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= -go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= -go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 h1:umZgi92IyxfXd/l4kaDhnKgY8rnN/cZcF1LKc6I8OQ8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0/go.mod h1:4lVs6obhSVRb1EW5FhOuBTyiQhtRtAnnva9vD3yRfq8= +go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= +go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= +go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= +go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= 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.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= -golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA= -golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +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-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw= +golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -199,8 +200,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +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/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -215,18 +216,16 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= 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.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -235,12 +234,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240822170219-fc7c04adadcd h1:BBOTEWLuuEGQy9n1y9MhVJ9Qt0BDu21X8qZs71/uPZo= -google.golang.org/genproto/googleapis/api v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:fO8wJzT2zbQbAjbIoos1285VfEIYKDDY+Dt+WpTkh6g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd h1:6TEm2ZxXoQmFWFlt1vNxvVOa1Q0dXFQD1m/rYjXmS0E= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM= +google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 799c80ff918fd727ff7091ef4beaca19b3d81b1d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 8 Oct 2024 09:00:09 +0200 Subject: [PATCH 392/466] Fix test data --- commands/testdata/project/.platform.app.yaml | 3 +-- commands/testdata/project/.upsun/config.yaml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/commands/testdata/project/.platform.app.yaml b/commands/testdata/project/.platform.app.yaml index 67698ab3..9a749e96 100644 --- a/commands/testdata/project/.platform.app.yaml +++ b/commands/testdata/project/.platform.app.yaml @@ -58,8 +58,7 @@ hooks: crons: security-check: # Check that no security issues have been found for PHP packages deployed in production - # See https://github.com/fabpot/local-php-security-checker spec: '50 23 * * *' - cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape php-security-checker; fi + cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape COMPOSER_ROOT_VERSION=1.0.0 COMPOSER_AUDIT_ABANDONED=ignore composer audit --no-cache; fi diff --git a/commands/testdata/project/.upsun/config.yaml b/commands/testdata/project/.upsun/config.yaml index d29f4321..3f16bbd8 100644 --- a/commands/testdata/project/.upsun/config.yaml +++ b/commands/testdata/project/.upsun/config.yaml @@ -71,8 +71,7 @@ applications: crons: security-check: # Check that no security issues have been found for PHP packages deployed in production - # See https://github.com/fabpot/local-php-security-checker spec: '50 23 * * *' - cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape php-security-checker; fi + cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape COMPOSER_ROOT_VERSION=1.0.0 COMPOSER_AUDIT_ABANDONED=ignore composer audit --no-cache; fi From 298dbb285801c18a496c46eb622525c09d93ca3a Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 11 Oct 2024 10:44:40 +0200 Subject: [PATCH 393/466] Allow to define the IP on which `server:start` should listen to In addition to the flags, one can also uses the SYMFONY_LISTEN_IP and SYMFONY_ALL_IP environment variables --- Dockerfile | 2 ++ commands/local_server_start.go | 2 ++ local/http/http.go | 3 ++- local/process/listener.go | 14 ++++++++++---- local/project/config.go | 6 ++++++ local/project/project.go | 1 + 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 156db0cd..1ae27216 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,8 @@ COPY symfony /usr/local/bin/ FROM scratch +ENV SYMFONY_ALLOW_ALL_IP=true + ENTRYPOINT ["/usr/local/bin/symfony"] COPY --from=build . . diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 138fb66d..9df40292 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -65,6 +65,8 @@ var localServerStartCmd = &console.Command{ &console.StringFlag{Name: "document-root", Usage: "Project document root (auto-configured by default)"}, &console.StringFlag{Name: "passthru", Usage: "Project passthru index (auto-configured by default)"}, &console.IntFlag{Name: "port", DefaultValue: 8000, Usage: "Preferred HTTP port"}, + &console.StringFlag{Name: "listen-ip", DefaultValue: "127.0.0.1", Usage: "The IP on which the CLI should listen"}, + &console.BoolFlag{Name: "allow-all-ip", Usage: "Listen on all the available interfaces"}, &console.BoolFlag{Name: "daemon", Aliases: []string{"d"}, Usage: "Run the server in the background"}, &console.BoolFlag{Name: "no-humanize", Usage: "Do not format JSON logs"}, &console.StringFlag{Name: "p12", Usage: "Name of the file containing the TLS certificate to use in p12 format"}, diff --git a/local/http/http.go b/local/http/http.go index ddac3163..859dd25b 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -49,6 +49,7 @@ type Server struct { Callback ServerCallback Port int PreferredPort int + ListenIp string PKCS12 string AllowHTTP bool Logger zerolog.Logger @@ -79,7 +80,7 @@ var gzipContentTypes = []string{ // Start starts the server func (s *Server) Start(errChan chan error) (int, error) { - ln, port, err := process.CreateListener(s.Port, s.PreferredPort) + ln, port, err := process.CreateListener(s.ListenIp, s.Port, s.PreferredPort) if err != nil { return port, errors.WithStack(err) } diff --git a/local/process/listener.go b/local/process/listener.go index 02ec7b81..a5b21368 100644 --- a/local/process/listener.go +++ b/local/process/listener.go @@ -20,8 +20,8 @@ package process import ( + "fmt" "net" - "strconv" "github.com/pkg/errors" ) @@ -29,7 +29,7 @@ import ( // CreateListener creates a listener on a port // Pass a preferred port (will increment by 1 if port is not available) // or pass 0 to auto-find any available port -func CreateListener(port, preferredPort int) (net.Listener, int, error) { +func CreateListener(listenIp string, port, preferredPort int) (net.Listener, int, error) { var ln net.Listener var err error tryPort := preferredPort @@ -39,9 +39,15 @@ func CreateListener(port, preferredPort int) (net.Listener, int, error) { max = 1 } for { - ln, err = net.Listen("tcp", "127.0.0.1:"+strconv.Itoa(tryPort)) + // we really want to test availability on 127.0.0.1 + ln, err = net.Listen("tcp", fmt.Sprintf("127.0.0.1:%d", tryPort)) if err == nil { - break + ln.Close() + // but then, we want to listen to as many local IP's as possible + ln, err = net.Listen("tcp", fmt.Sprintf("%s:%d", listenIp, tryPort)) + if err == nil { + break + } } if port > 0 { return nil, 0, errors.Wrapf(err, "unable to listen on port %d", port) diff --git a/local/project/config.go b/local/project/config.go index 0ea217bf..307f01bf 100644 --- a/local/project/config.go +++ b/local/project/config.go @@ -35,6 +35,7 @@ const DockerComposeWorkerKey = "docker_compose" type Config struct { HomeDir string ProjectDir string + ListenIp string DocumentRoot string `yaml:"document_root"` Passthru string `yaml:"passthru"` Port int `yaml:"port"` @@ -83,6 +84,11 @@ func NewConfigFromContext(c *console.Context, projectDir string) (*Config, *File } config.AppVersion = c.App.Version config.ProjectDir = projectDir + if c.IsSet("allow-all-ip") { + config.ListenIp = "" + } else { + config.ListenIp = c.String("listen-ip") + } if c.IsSet("document-root") { config.DocumentRoot = c.String("document-root") } diff --git a/local/project/project.go b/local/project/project.go index a9605c65..a4fbbc88 100644 --- a/local/project/project.go +++ b/local/project/project.go @@ -56,6 +56,7 @@ func New(c *Config) (*Project, error) { DocumentRoot: documentRoot, Port: c.Port, PreferredPort: c.PreferredPort, + ListenIp: c.ListenIp, Logger: c.Logger, PKCS12: c.PKCS12, AllowHTTP: c.AllowHTTP, From 903639a40a1cd274414f9d78784236e6d94c2230 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 9 Sep 2024 15:12:38 +0200 Subject: [PATCH 394/466] refacto: improve Docker Compose project name determination By using the library constants and reading the yaml files --- envs/docker.go | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/envs/docker.go b/envs/docker.go index c0c195cf..eb97e8f4 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -32,10 +32,13 @@ import ( "strings" "time" + compose "github.com/compose-spec/compose-go/cli" + composeConsts "github.com/compose-spec/compose-go/consts" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" docker "github.com/docker/docker/client" "github.com/symfony-cli/terminal" + "gopkg.in/yaml.v2" ) var ( @@ -491,7 +494,7 @@ func getEnvValue(env string, key string) string { func (l *Local) getComposeProjectName() string { // https://docs.docker.com/compose/reference/envvars/#compose_project_name - if project := os.Getenv("COMPOSE_PROJECT_NAME"); project != "" { + if project := os.Getenv(composeConsts.ComposeProjectName); project != "" { return project } @@ -507,13 +510,36 @@ func (l *Local) getComposeProjectName() string { if _, err := os.Stat(filepath.Join(composeDir, ".env")); err == nil { if contents, err := os.ReadFile(filepath.Join(composeDir, ".env")); err == nil { for _, line := range bytes.Split(contents, []byte("\n")) { - if bytes.HasPrefix(line, []byte("COMPOSE_PROJECT_NAME=")) { - return string(line[len("COMPOSE_PROJECT_NAME="):]) + if bytes.HasPrefix(line, []byte(composeConsts.ComposeProjectName+"=")) { + return string(line[len(composeConsts.ComposeProjectName)+1:]) } } } } + // Compose project name can be set in every Docker Compose file + for index, filename := range compose.DefaultFileNames { + if _, err := os.Stat(filepath.Join(composeDir, filename)); err != nil { + continue + } + + for _, filename := range []string{compose.DefaultOverrideFileNames[index], filename} { + buf, err := os.ReadFile(filepath.Join(composeDir, filename)) + if err != nil { + continue + } + + config := struct { + ProjectName string `yaml:"name"` + }{} + + // unmarshall the content of the file to get the project name + if err := yaml.Unmarshal(buf, &config); err == nil && config.ProjectName != "" { + return config.ProjectName + } + } + } + return filepath.Base(composeDir) } @@ -526,7 +552,7 @@ func (l *Local) getComposeDir() string { // look for the first dir up with a docker-composer.ya?ml file (in case of a multi-project) dir := l.Dir for { - for _, filename := range []string{"compose.yaml", "compose.yml", "docker-compose.yaml", "docker-compose.yml"} { + for _, filename := range compose.DefaultFileNames { if _, err := os.Stat(filepath.Join(dir, filename)); err == nil { return dir } From e060e0325919b7221c03d6167883d2bc715a5a45 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 14 Oct 2024 11:24:50 +0200 Subject: [PATCH 395/466] Add a warning about the listening IP change in 5.10.3 --- commands/local_server_start.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 9df40292..04ddf087 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -304,6 +304,10 @@ var localServerStartCmd = &console.Command{ reexec.NotifyForeground("listening") ui.Warning(localWebServerProdWarningMsg) + if config.ListenIp == "127.0.0.1" { + ui.Warning(`Please note that the Symfony CLI only listens on 127.0.0.1 by default since version 5.10.3. + You can use the --allow-all-ip or --listen-ip flags to change this behavior.`) + } ui.Success(msg) } From 4c51f18f33bc9bba4efa54b26e01a4a99107cdd8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:12:55 +0000 Subject: [PATCH 396/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index feb2a9bf..1e1eddaf 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -246,7 +246,7 @@ var availableServices = []*service{ Type: "solr", Versions: serviceVersions{ Deprecated: []string{"3.6", "4.10", "6.3", "6.6", "7.6", "7.7", "8.0", "8.4", "8.6"}, - Supported: []string{"8.11", "9.1", "9.2", "9.4"}, + Supported: []string{"8.11", "9.1", "9.2", "9.4", "9.6"}, }, }, { From 8d0bae9da12d366b814729e97505ee2a0ab7ecf5 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 9 Nov 2024 09:09:17 +0100 Subject: [PATCH 397/466] Update check-requirements.php script to v2.0.2 --- commands/data/check-requirements.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/commands/data/check-requirements.php b/commands/data/check-requirements.php index 1c9bbb21..9cb500bb 100644 --- a/commands/data/check-requirements.php +++ b/commands/data/check-requirements.php @@ -372,6 +372,8 @@ class ProjectRequirements extends RequirementCollection const REQUIRED_PHP_VERSION_3x = '5.5.9'; const REQUIRED_PHP_VERSION_4x = '7.1.3'; const REQUIRED_PHP_VERSION_5x = '7.2.9'; + const REQUIRED_PHP_VERSION_6x = '8.1.0'; + const REQUIRED_PHP_VERSION_7x = '8.2.0'; public function __construct($rootDir) { @@ -386,12 +388,16 @@ public function __construct($rootDir) $rootDir = $this->getComposerRootDir($rootDir); $options = $this->readComposer($rootDir); - $phpVersion = self::REQUIRED_PHP_VERSION_3x; + $phpVersion = self::REQUIRED_PHP_VERSION_7x; if (null !== $symfonyVersion) { - if (version_compare($symfonyVersion, '5.0.0', '>=')) { + if (version_compare($symfonyVersion, '6.0.0', '>=')) { + $phpVersion = self::REQUIRED_PHP_VERSION_6x; + } elseif (version_compare($symfonyVersion, '5.0.0', '>=')) { $phpVersion = self::REQUIRED_PHP_VERSION_5x; } elseif (version_compare($symfonyVersion, '4.0.0', '>=')) { $phpVersion = self::REQUIRED_PHP_VERSION_4x; + } elseif (version_compare($symfonyVersion, '3.0.0', '>=')) { + $phpVersion = self::REQUIRED_PHP_VERSION_3x; } } From 2fde8a56240d242a3d0603c190abdba790040580 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 14 Nov 2024 23:27:01 +0100 Subject: [PATCH 398/466] Update check-requirements.php script to v2.0.3 --- commands/data/check-requirements.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/data/check-requirements.php b/commands/data/check-requirements.php index 9cb500bb..45ab9a86 100644 --- a/commands/data/check-requirements.php +++ b/commands/data/check-requirements.php @@ -935,7 +935,7 @@ private function getUploadMaxFilesize() $requirements = $symfonyRequirements->getRequirements(); // specific directory to check? -$dir = isset($args[1]) ? $args[1] : (file_exists(getcwd().'/composer.json') ? getcwd().'/composer.json' : null); +$dir = isset($args[1]) ? $args[1] : (file_exists(getcwd().'/composer.json') ? getcwd() : null); if (null !== $dir) { $projectRequirements = new ProjectRequirements($dir); $requirements = array_merge($requirements, $projectRequirements->getRequirements()); From 5cb949d774b90f4cc62b062b140bd47e948c33cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 12:20:39 +0000 Subject: [PATCH 399/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 96 +++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 1e1eddaf..aa6f3681 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -23,74 +23,74 @@ package platformsh var availablePHPExts = map[string][]string{ - "amqp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "amqp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "apc": {"5.4"}, - "apcu": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "apcu": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "apcu_bc": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "applepay": {"7.0", "7.1", "7.3", "7.4"}, - "bcmath": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "bcmath": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "blackfire": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "bz2": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "calendar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "ctype": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "curl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "bz2": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "calendar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "ctype": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "curl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "datadog": {"8.2", "8.3"}, - "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "dba": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "dom": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "enchant": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "event": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "exif": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "exif": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "ffi": {"7.4", "8.0", "8.1", "8.2", "8.3"}, - "fileinfo": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "ftp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "gd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "fileinfo": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "ftp": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "gd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "gearman": {"5.4", "5.5", "5.6"}, "geoip": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "gettext": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "gmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "gnupg": {"8.2", "8.3"}, "http": {"5.4", "5.5", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "iconv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "iconv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "igbinary": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "imagick": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"}, - "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "imap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "interbase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, - "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "intl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "ioncube": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "json": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4"}, "ldap": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mailparse": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "mbstring": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "mbstring": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "mcrypt": {"5.4", "5.5", "5.6", "7.0", "7.1"}, "memcache": {"5.4", "5.5", "5.6"}, "memcached": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mongo": {"5.4", "5.5", "5.6"}, - "mongodb": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "mongodb": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "msgpack": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "mssql": {"5.4", "5.5", "5.6"}, "mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "mysqli": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "mysqlnd": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "newrelic": {"5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "oauth": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "opcache": {"5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "openswoole": {"8.2", "8.3"}, "opentelemetry": {"8.2", "8.3"}, - "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1"}, - "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "pdo_sqlite": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "pdo_sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "pecl-http": {"5.6"}, - "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "phar": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "phpdbg": {"5.6"}, "pinba": {"5.4", "5.5", "5.6"}, - "posix": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "posix": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "propro": {"5.6"}, "protobuf": {"8.1"}, "pspell": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, @@ -99,41 +99,41 @@ var availablePHPExts = map[string][]string{ "rdkafka": {"8.1", "8.2", "8.3"}, "readline": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "recode": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3"}, - "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "simplexml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "redis": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "shmop": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "simplexml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "snmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "sourceguardian": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "sourceguardian": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "spplus": {"5.4", "5.5"}, - "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "sqlsrv": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "ssh2": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "swoole": {"8.2", "8.3"}, "sybase": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "sysvmsg": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "sysvsem": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "sysvshm": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "tideways": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"}, "tideways_xhprof": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"}, "tidy": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "wddx": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "xcache": {"5.4", "5.5"}, "xdebug": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "xhprof": {"5.4", "5.5", "5.6"}, - "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, - "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "xml": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "xmlreader": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "xmlrpc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "xmlwriter": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, + "xsl": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "yaml": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "zbarcode": {"7.0", "7.1", "7.2", "7.3"}, "zendopcache": {"5.4"}, - "zip": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "zip": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, } var availableServices = []*service{ From f11e67e0916cdcd15a04df9d11365a3b32511d0c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 28 Nov 2024 17:56:12 +0100 Subject: [PATCH 400/466] Fix path on local envs --- envs/local.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/envs/local.go b/envs/local.go index 2eee8089..b687f7c8 100644 --- a/envs/local.go +++ b/envs/local.go @@ -48,7 +48,7 @@ func NewLocal(path string, debug bool) (*Local, error) { return nil, errors.WithStack(err) } return &Local{ - Dir: path, + Dir: guessProjectDir(path), Debug: debug, }, nil } @@ -283,3 +283,20 @@ func (l *Local) webServer() Envs { return env } + +func guessProjectDir(dir string) string { + for { + f, err := os.Stat(filepath.Join(dir, ".git")) + if err == nil && f.IsDir() { + return dir + } + + upDir := filepath.Dir(dir) + if upDir == dir || upDir == "." { + break + } + dir = upDir + } + + return "" +} From 91294e15b326eee032480d59ddb1989c9a857188 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 30 Nov 2024 10:55:57 +0100 Subject: [PATCH 401/466] Update fixtures --- commands/testdata/project/.platform.app.yaml | 2 +- commands/testdata/project/.upsun/config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/testdata/project/.platform.app.yaml b/commands/testdata/project/.platform.app.yaml index 9a749e96..da867bc4 100644 --- a/commands/testdata/project/.platform.app.yaml +++ b/commands/testdata/project/.platform.app.yaml @@ -48,7 +48,7 @@ hooks: curl -fs https://get.symfony.com/cloud/configurator | bash - NODE_VERSION=18 symfony-build + NODE_VERSION=22 symfony-build deploy: | set -x -e diff --git a/commands/testdata/project/.upsun/config.yaml b/commands/testdata/project/.upsun/config.yaml index 3f16bbd8..dfccafe6 100644 --- a/commands/testdata/project/.upsun/config.yaml +++ b/commands/testdata/project/.upsun/config.yaml @@ -61,7 +61,7 @@ applications: curl -fs https://get.symfony.com/cloud/configurator | bash - NODE_VERSION=18 symfony-build + NODE_VERSION=22 symfony-build deploy: | set -x -e From 9626746314f724ae01259a8693fe28718378ed5d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:20:39 +0000 Subject: [PATCH 402/466] chore: Update supported Platform.sh services --- local/platformsh/commands.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index 7123ad78..a1a03d75 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -1772,6 +1772,7 @@ var Commands = []*console.Command{ &console.BoolFlag{Name: "no-header",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + &console.BoolFlag{Name: "refresh",}, }, }, { @@ -1941,6 +1942,7 @@ var Commands = []*console.Command{ Flags: []console.Flag{ &console.StringFlag{Name: "default-branch", DefaultValue: "main",}, &console.StringFlag{Name: "environments",}, + &console.StringFlag{Name: "init-repo",}, &console.BoolFlag{Name: "no-set-remote",}, &console.StringFlag{Name: "org", Aliases: []string{"o"},}, &console.StringFlag{Name: "plan",}, From bf59a3028bc1a789c1b14ef30151d15d7ffee12c Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 7 Dec 2024 12:30:15 +0100 Subject: [PATCH 403/466] fix(docs): Fix Cloudsmith logo in README #SymfonyHackday, fix 542 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 198d9965..a84d6fad 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Security Issues If you discover a security vulnerability, please follow our [disclosure procedure][11]. -Sponsorship [](https://cloudsmith.io/) +Sponsorship [](https://cloudsmith.io/) ----------- Package repository hosting is graciously provided by From 577e09714b230b36bbfd716bf06f97cf880c9470 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Thu, 16 Mar 2023 00:21:30 +0100 Subject: [PATCH 404/466] feat(http): add flag/config to allow CORS requests, close #229 --- commands/local_server_start.go | 6 ++++++ local/http/cors.go | 34 ++++++++++++++++++++++++++++++++++ local/http/http.go | 5 +++++ local/project/config.go | 4 ++++ local/project/project.go | 1 + 5 files changed, 50 insertions(+) create mode 100644 local/http/cors.go diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 04ddf087..5e24c816 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -52,6 +52,7 @@ import ( var localWebServerProdWarningMsg = "The local web server is optimized for local development and MUST never be used in a production setup." var localWebServerTlsKeyLogWarningMsg = "Logging TLS master key is enabled. It means TLS connections between the client and this server will be INSECURE. This is NOT recommended unless you are debugging the connections." +var localWebServerAllowsCORSLogWarningMsg = "Cross-origin resource sharing (CORS) is enabled for all requests.\nYou may want to use https://github.com/nelmio/NelmioCorsBundle to have better control over HTTP headers." var localServerStartCmd = &console.Command{ Category: "local", @@ -83,6 +84,7 @@ var localServerStartCmd = &console.Command{ EnvVars: []string{"SSLKEYLOGFILE"}, }, &console.BoolFlag{Name: "no-workers", Usage: "Do not start workers"}, + &console.BoolFlag{Name: "allow-cors", Usage: "Allow Cross-origin resource sharing (CORS) requests"}, }, Action: func(c *console.Context) error { ui := terminal.SymfonyStyle(terminal.Stdout, terminal.Stdin) @@ -188,6 +190,10 @@ var localServerStartCmd = &console.Command{ ui.Warning(localWebServerTlsKeyLogWarningMsg) } + if config.AllowCORS { + ui.Warning(localWebServerAllowsCORSLogWarningMsg) + } + lw, err := pidFile.LogWriter() if err != nil { return err diff --git a/local/http/cors.go b/local/http/cors.go new file mode 100644 index 00000000..8ea4a84f --- /dev/null +++ b/local/http/cors.go @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package http + +import ( + "net/http" +) + +func corsWrapper(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Access-Control-Allow-Origin", "*") + w.Header().Set("Access-Control-Allow-Methods", "*") + w.Header().Set("Access-Control-Allow-Headers", "*") + + h.ServeHTTP(w, r) + }) +} diff --git a/local/http/http.go b/local/http/http.go index 859dd25b..1c19c09b 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -56,6 +56,7 @@ type Server struct { Appversion string UseGzip bool TlsKeyLogFile string + AllowCORS bool httpserver *http.Server httpsserver *http.Server @@ -98,6 +99,10 @@ func (s *Server) Start(errChan chan error) (int, error) { proxyHandler = gzipWrapper(proxyHandler) } + if s.AllowCORS { + proxyHandler = corsWrapper(proxyHandler) + } + s.httpserver = &http.Server{ Handler: proxyHandler, } diff --git a/local/project/config.go b/local/project/config.go index 307f01bf..82049342 100644 --- a/local/project/config.go +++ b/local/project/config.go @@ -49,6 +49,7 @@ type Config struct { UseGzip bool `yaml:"use_gzip"` TlsKeyLogFile string `yaml:"tls_key_log_file"` NoWorkers bool `yaml:"no_workers"` + AllowCORS bool `yaml:"allow_cors"` } type FileConfig struct { @@ -122,6 +123,9 @@ func NewConfigFromContext(c *console.Context, projectDir string) (*Config, *File if c.IsSet("no-workers") { config.NoWorkers = c.Bool("no-workers") } + if c.IsSet("allow-cors") { + config.AllowCORS = c.Bool("allow-cors") + } return config, fileConfig, nil } diff --git a/local/project/project.go b/local/project/project.go index a4fbbc88..53ad6e9f 100644 --- a/local/project/project.go +++ b/local/project/project.go @@ -63,6 +63,7 @@ func New(c *Config) (*Project, error) { UseGzip: c.UseGzip, Appversion: c.AppVersion, TlsKeyLogFile: c.TlsKeyLogFile, + AllowCORS: c.AllowCORS, }, } if err != nil { From ac66e13fab7b7dcc4d073651bc566fc0652ea3d9 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 7 Dec 2024 12:08:34 +0100 Subject: [PATCH 405/466] chore(http): add a warning if multiple CORS headers are detected --- local/http/cors.go | 20 ++++++++++++++++---- local/http/http.go | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/local/http/cors.go b/local/http/cors.go index 8ea4a84f..56abf2bd 100644 --- a/local/http/cors.go +++ b/local/http/cors.go @@ -21,14 +21,26 @@ package http import ( "net/http" + + "github.com/rs/zerolog" ) -func corsWrapper(h http.Handler) http.Handler { +func corsWrapper(h http.Handler, logger zerolog.Logger) http.Handler { + var corsHeaders = []string{"Access-Control-Allow-Origin", "Access-Control-Allow-Methods", "Access-Control-Allow-Headers"} + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Access-Control-Allow-Origin", "*") - w.Header().Set("Access-Control-Allow-Methods", "*") - w.Header().Set("Access-Control-Allow-Headers", "*") + for _, corsHeader := range corsHeaders { + w.Header().Set(corsHeader, "*") + } h.ServeHTTP(w, r) + + for _, corsHeader := range corsHeaders { + if headers, exists := w.Header()[corsHeader]; !exists || len(headers) < 2 { + continue + } + + logger.Warn().Msgf(`Multiple entries detected for header "%s". Only one should be set: you should enable CORS handling in the CLI only if the application does not handle them.`, corsHeader) + } }) } diff --git a/local/http/http.go b/local/http/http.go index 1c19c09b..650ed678 100644 --- a/local/http/http.go +++ b/local/http/http.go @@ -100,7 +100,7 @@ func (s *Server) Start(errChan chan error) (int, error) { } if s.AllowCORS { - proxyHandler = corsWrapper(proxyHandler) + proxyHandler = corsWrapper(proxyHandler, s.Logger) } s.httpserver = &http.Server{ From b4e12f4bbae6739814771866f34f0a71f6211799 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:13:54 +0000 Subject: [PATCH 406/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index aa6f3681..d2ca1978 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -253,7 +253,7 @@ var availableServices = []*service{ Type: "varnish", Versions: serviceVersions{ Deprecated: []string{"5.1", "5.2", "6.3", "6.4", "7.1"}, - Supported: []string{"6.0", "7.2", "7.3"}, + Supported: []string{"6.0", "7.2", "7.3", "7.6"}, }, }, { From 66695f29bb5152c5a9fddfaa1aa9e96f5c522eae Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:12:12 +0000 Subject: [PATCH 407/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index d2ca1978..bb6b5402 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -105,7 +105,7 @@ var availablePHPExts = map[string][]string{ "snmp": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "soap": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "sockets": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, - "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "sodium": {"7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "sourceguardian": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "spplus": {"5.4", "5.5"}, "sqlite3": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, From 77fbd5b89c4c62ecbf26ec770af0abbc77079a02 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 28 Nov 2024 19:34:02 +0100 Subject: [PATCH 408/466] Fix project directory guessing is not traversing tree upward --- envs/local.go | 19 +------------------ local/php/symfony.go | 30 ++++++++++++++++++++---------- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/envs/local.go b/envs/local.go index b687f7c8..2eee8089 100644 --- a/envs/local.go +++ b/envs/local.go @@ -48,7 +48,7 @@ func NewLocal(path string, debug bool) (*Local, error) { return nil, errors.WithStack(err) } return &Local{ - Dir: guessProjectDir(path), + Dir: path, Debug: debug, }, nil } @@ -283,20 +283,3 @@ func (l *Local) webServer() Envs { return env } - -func guessProjectDir(dir string) string { - for { - f, err := os.Stat(filepath.Join(dir, ".git")) - if err == nil && f.IsDir() { - return dir - } - - upDir := filepath.Dir(dir) - if upDir == dir || upDir == "." { - break - } - dir = upDir - } - - return "" -} diff --git a/local/php/symfony.go b/local/php/symfony.go index 14e83c22..4ae705f0 100644 --- a/local/php/symfony.go +++ b/local/php/symfony.go @@ -4,24 +4,34 @@ import ( "os" "github.com/pkg/errors" + "path/filepath" ) // ComposerExecutor returns an Executor prepared to run Symfony Console. // It returns an error if no console binary is found. func SymonyConsoleExecutor(args []string) (*Executor, error) { - consolePath := "bin/console" + dir, err := os.Getwd() + if err != nil { + return nil, errors.WithStack(err) + } - if _, err := os.Stat(consolePath); err != nil { - // Fallback to app/console for projects created with older versions of Symfony - consolePath = "app/console" + for { + for _, consolePath := range []string{"bin/console", "app/console"} { + consolePath = filepath.Join(dir, consolePath) + if _, err := os.Stat(consolePath); err == nil { + return &Executor{ + BinName: "php", + Args: append([]string{"php", consolePath}, args...), + }, nil + } + } - if _, err2 := os.Stat(consolePath); err2 != nil { - return nil, errors.WithStack(err) + upDir := filepath.Dir(dir) + if upDir == dir || upDir == "." { + break } + dir = upDir } - return &Executor{ - BinName: "php", - Args: append([]string{"php", consolePath}, args...), - }, nil + return nil, errors.New("No console binary found") } From fc452bed9d8bdad6401037580d2618a23020e581 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 1 Jan 2025 22:31:03 +0100 Subject: [PATCH 409/466] Fix Goreleaser deprecation --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 54e73ff3..82ab262c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -63,7 +63,7 @@ source: enabled: true snapshot: - name_template: "next" + version_template: "next" universal_binaries: - replace: true From 2fc40e2804a06b9a6e5a3db4df1a40474708c9d9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:12:26 +0000 Subject: [PATCH 410/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index bb6b5402..b6de0118 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -79,7 +79,7 @@ var availablePHPExts = map[string][]string{ "opentelemetry": {"8.2", "8.3"}, "pdo": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "pdo_dblib": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, - "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1"}, + "pdo_firebird": {"5.4", "5.5", "5.6", "7.0", "7.1", "8.2", "8.3", "8.4"}, "pdo_mysql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "pdo_odbc": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "pdo_pgsql": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, From ee8dff26d4c76bd5ca1139f4479192ae98a1ec79 Mon Sep 17 00:00:00 2001 From: Jeffrey Cafferata Date: Wed, 8 Jan 2025 15:18:25 +0100 Subject: [PATCH 411/466] Updated the PHP `8.2.x` versions to the (current) PHP `8.4.x` in de `local:php:list` text output. --- commands/local_php_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/local_php_list.go b/commands/local_php_list.go index f687596d..2583cdd5 100644 --- a/commands/local_php_list.go +++ b/commands/local_php_list.go @@ -88,7 +88,7 @@ var localPhpListCmd = &console.Command{ } terminal.Println("") - terminal.Println("To control the version used in a directory, create a .php-version file that contains the version number (e.g. 8.2 or 8.2.16),") + terminal.Println("To control the version used in a directory, create a .php-version file that contains the version number (e.g. 8.4 or 8.4.2),") terminal.Println("or define config.platform.php inside composer.json.") terminal.Println("If you're using Platform.sh or Upsun, the version can also be specified in their configuration files.") From 2a6bbfd8fdd586bc89063120c39a7fc7f25869be Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:12:39 +0000 Subject: [PATCH 412/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index b6de0118..86e6ef7c 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -232,7 +232,7 @@ var availableServices = []*service{ Type: "rabbitmq", Versions: serviceVersions{ Deprecated: []string{"3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"}, - Supported: []string{"3.12", "3.13"}, + Supported: []string{"3.12", "3.13", "4.0"}, }, }, { From 42ca8b3794ede5e5b09df5a14a997eb6312b3e59 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:12:03 +0000 Subject: [PATCH 413/466] chore: Update supported Platform.sh services --- local/platformsh/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 86e6ef7c..e3392ad0 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -121,6 +121,7 @@ var availablePHPExts = map[string][]string{ "tidy": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, "tokenizer": {"7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"}, "uuid": {"7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, + "uv": {"8.3"}, "wddx": {"7.0", "7.1", "7.2", "7.3", "7.4"}, "xcache": {"5.4", "5.5"}, "xdebug": {"5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"}, From 9c3ccd1b55292a6c63e5fea795d92f0223c99420 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 7 Feb 2025 12:08:17 +0100 Subject: [PATCH 414/466] fix: Fix Docker containers are not detected with Docker Desktop 4.38.0 This is due to a regression in Docker Desktop 4.38.0 making the API slow. We workaround this by defining a User Agent starting with "Docker-Client/" --- .github/workflows/releaser.yml | 2 +- commands/root.go | 3 +++ envs/docker.go | 21 ++++++++++++++++++--- envs/docker_version.go | 25 +++++++++++++++++++++++++ envs/generate_docker_version | 29 +++++++++++++++++++++++++++++ 5 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 envs/docker_version.go create mode 100644 envs/generate_docker_version diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 5f116172..9c3d11a2 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -42,7 +42,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') - name: Prepare - run: go generate ./ + run: go generate ./... - name: Check Git status id: git diff --git a/commands/root.go b/commands/root.go index 495e7014..cbe528e3 100644 --- a/commands/root.go +++ b/commands/root.go @@ -25,6 +25,7 @@ import ( "github.com/pkg/errors" "github.com/symfony-cli/console" + "github.com/symfony-cli/symfony-cli/envs" "github.com/symfony-cli/symfony-cli/local/platformsh" "github.com/symfony-cli/symfony-cli/reexec" "github.com/symfony-cli/symfony-cli/updater" @@ -99,6 +100,8 @@ func init() { } func InitAppFunc(c *console.Context) error { + envs.ComputeDockerUserAgent(c.App.Name, c.App.Version) + psh, err := platformsh.Get() if err != nil { return err diff --git a/envs/docker.go b/envs/docker.go index eb97e8f4..ddd34de7 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -19,6 +19,8 @@ package envs +//go:generate sh generate_docker_version + import ( "bytes" "context" @@ -44,8 +46,13 @@ import ( var ( dockerComposeNormalizeRegexp = regexp.MustCompile("[^-_a-z0-9]") dockerComposeNormalizeRegexpLegacy = regexp.MustCompile("[^a-z0-9]") + dockerUserAgent = "Docker-Client/unknown version" ) +func ComputeDockerUserAgent(appName, appVersion string) { + dockerUserAgent = fmt.Sprintf("Docker-Client/%s %s/%s", dockerClientVersion, appName, appVersion) +} + type sortedPorts []types.Port func (ps sortedPorts) Len() int { return len(ps) } @@ -71,7 +78,17 @@ func (l *Local) RelationshipsFromDocker() Relationships { return nil } - client, err := docker.NewClientWithOpts(docker.WithTimeout(2*time.Second), docker.FromEnv, dockerUseDesktopSocketIfAvailable) + client, err := docker.NewClientWithOpts( + docker.FromEnv, + dockerUseDesktopSocketIfAvailable, + docker.WithAPIVersionNegotiation(), + // we use a short timeout here because we don't want to impact + // negatively performance when Docker is not reachable + docker.WithTimeout(2*time.Second), + // defining a User Agent to avoid having the Docker API being slow + // see https://github.com/docker/for-mac/issues/7575 + docker.WithUserAgent(dockerUserAgent), + ) if err != nil { if l.Debug { fmt.Fprintf(os.Stderr, "ERROR: %s\n", err) @@ -80,8 +97,6 @@ func (l *Local) RelationshipsFromDocker() Relationships { } defer client.Close() - client.NegotiateAPIVersion(context.Background()) - containers, err := client.ContainerList(context.Background(), container.ListOptions{}) if err != nil { if docker.IsErrConnectionFailed(err) { diff --git a/envs/docker_version.go b/envs/docker_version.go new file mode 100644 index 00000000..6713f4ce --- /dev/null +++ b/envs/docker_version.go @@ -0,0 +1,25 @@ +// Code generated by envs/generate_docker_version +// DO NOT EDIT + +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package envs + +const dockerClientVersion = "v27.3.1" diff --git a/envs/generate_docker_version b/envs/generate_docker_version new file mode 100644 index 00000000..b5b42fb7 --- /dev/null +++ b/envs/generate_docker_version @@ -0,0 +1,29 @@ +#!/usr/bin/env sh + +cat < docker_version.go +// Code generated by envs/generate_docker_version +// DO NOT EDIT + +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package envs + +const dockerClientVersion = "$(go list -m all | grep github.com/docker/docker | awk -F '[ +]' '{print $2}')" +EOF From e7cd994f7ebb29ae9abc1ceb16518617858fd8a6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 7 Feb 2025 16:56:15 +0100 Subject: [PATCH 415/466] Bump pm.max_children from 5 to 100 --- local/php/fpm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/php/fpm.go b/local/php/fpm.go index 364c8c63..b1092d24 100644 --- a/local/php/fpm.go +++ b/local/php/fpm.go @@ -92,7 +92,7 @@ daemonize = no listen = %s listen.allowed_clients = 127.0.0.1 pm = dynamic -pm.max_children = 5 +pm.max_children = 30 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 From e3b7acc635dc8416a2e1ceecf0940c5d2f269410 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 7 Feb 2025 18:38:40 +0100 Subject: [PATCH 416/466] Update fixtures --- commands/testdata/project/.platform.app.yaml | 5 ++++- commands/testdata/project/.upsun/config.yaml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/commands/testdata/project/.platform.app.yaml b/commands/testdata/project/.platform.app.yaml index da867bc4..84e0accc 100644 --- a/commands/testdata/project/.platform.app.yaml +++ b/commands/testdata/project/.platform.app.yaml @@ -34,7 +34,7 @@ web: passthru: "/index.php" mounts: - "/var": { source: local, source_path: var } + "/var/cache": { source: local, source_path: var/cache } relationships: @@ -60,5 +60,8 @@ crons: # Check that no security issues have been found for PHP packages deployed in production spec: '50 23 * * *' cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape COMPOSER_ROOT_VERSION=1.0.0 COMPOSER_AUDIT_ABANDONED=ignore composer audit --no-cache; fi + clean-expired-sessions: + spec: '17,47 * * * *' + cmd: croncape php-session-clean diff --git a/commands/testdata/project/.upsun/config.yaml b/commands/testdata/project/.upsun/config.yaml index dfccafe6..c1e767bc 100644 --- a/commands/testdata/project/.upsun/config.yaml +++ b/commands/testdata/project/.upsun/config.yaml @@ -73,5 +73,8 @@ applications: # Check that no security issues have been found for PHP packages deployed in production spec: '50 23 * * *' cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape COMPOSER_ROOT_VERSION=1.0.0 COMPOSER_AUDIT_ABANDONED=ignore composer audit --no-cache; fi + clean-expired-sessions: + spec: '17,47 * * * *' + cmd: croncape php-session-clean From f205bcae8f06f9f49e9917aba94f05b54cc2ad6c Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 8 Feb 2025 15:40:12 +0100 Subject: [PATCH 417/466] refactor: cleanup unused fields --- local/project/project.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/local/project/project.go b/local/project/project.go index 53ad6e9f..ac179b12 100644 --- a/local/project/project.go +++ b/local/project/project.go @@ -34,11 +34,9 @@ import ( // Project represents a PHP project type Project struct { - HTTP *lhttp.Server - PHPServer *php.Server - Logger zerolog.Logger - homeDir string - projectDir string + HTTP *lhttp.Server + PHPServer *php.Server + Logger zerolog.Logger } // New creates a new PHP project @@ -49,9 +47,7 @@ func New(c *Config) (*Project, error) { } passthru, err := realPassthru(documentRoot, c.Passthru) p := &Project{ - Logger: c.Logger.With().Str("source", "HTTP").Logger(), - homeDir: c.HomeDir, - projectDir: c.ProjectDir, + Logger: c.Logger.With().Str("source", "HTTP").Logger(), HTTP: &lhttp.Server{ DocumentRoot: documentRoot, Port: c.Port, From a2f79dfdbec8c2615f9f7e95f692a7311696ae8c Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 8 Feb 2025 18:27:43 +0100 Subject: [PATCH 418/466] fix: cleanup $HOME/.symfony5/tmp temporary directories --- commands/local_server_start.go | 4 ++++ local/php/executor.go | 30 +++++++++++++++++++----------- local/php/php_server.go | 4 ++++ 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 5e24c816..224edb66 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -417,6 +417,10 @@ var localServerStartCmd = &console.Command{ return err } terminal.Eprintln("") + // wait for the PHP Server to be done cleaning up + if p.PHPServer != nil { + <-p.PHPServer.StoppedChan + } ui.Success("Stopped all processes successfully") } return nil diff --git a/local/php/executor.go b/local/php/executor.go index e259449d..a014ce45 100644 --- a/local/php/executor.go +++ b/local/php/executor.go @@ -163,7 +163,11 @@ func (e *Executor) DetectScriptDir() (string, error) { return e.scriptDir, nil } -// Config determines the right version of PHP depending on the configuration (+ its configuration) +// Config determines the right version of PHP depending on the configuration +// (+ its configuration). It also creates some symlinks to ease the integration +// with underlying tools that could try to run PHP. This is the responsability +// of the caller to clean those temporary files. One can call +// CleanupTemporaryDirectories to do so. func (e *Executor) Config(loadDotEnv bool) error { // reset environment e.environ = make([]string, 0) @@ -220,8 +224,10 @@ func (e *Executor) Config(loadDotEnv bool) error { // prepending the PHP directory in the PATH does not work well if the PHP binary is not named "php" (like php7.3 for instance) // in that case, we create a temp directory with a symlink // we also link php-config for pecl to pick up the right one (it is always looks for something called php-config) - phpDir := filepath.Join(cliDir, "tmp", xid.New().String(), "bin") - e.tempDir = phpDir + if e.tempDir == "" { + e.tempDir = filepath.Join(cliDir, "tmp", xid.New().String()) + } + phpDir := filepath.Join(e.tempDir, "bin") if err := os.MkdirAll(phpDir, 0755); err != nil { return err } @@ -284,6 +290,15 @@ func (e *Executor) Config(loadDotEnv bool) error { return err } +func (e *Executor) CleanupTemporaryDirectories() { + if e.iniDir != "" { + os.RemoveAll(e.iniDir) + } + if e.tempDir != "" { + os.RemoveAll(e.tempDir) + } +} + // Find composer depending on the configuration func (e *Executor) findComposer(extraBin string) (string, error) { if scriptDir, err := e.DetectScriptDir(); err == nil { @@ -312,14 +327,7 @@ func (e *Executor) Execute(loadDotEnv bool) int { fmt.Fprintln(os.Stderr, err) return 1 } - defer func() { - if e.iniDir != "" { - os.RemoveAll(e.iniDir) - } - if e.tempDir != "" { - os.RemoveAll(e.tempDir) - } - }() + defer e.CleanupTemporaryDirectories() cmd := execCommand(e.Args[0], e.Args[1:]...) environ := append(os.Environ(), e.environ...) gpathname := "PATH" diff --git a/local/php/php_server.go b/local/php/php_server.go index 44c8a001..19d3e23d 100644 --- a/local/php/php_server.go +++ b/local/php/php_server.go @@ -48,6 +48,7 @@ import ( type Server struct { Version *phpstore.Version logger zerolog.Logger + StoppedChan chan bool appVersion string homeDir string projectDir string @@ -79,6 +80,7 @@ func NewServer(homeDir, projectDir, documentRoot, passthru, appVersion string, l projectDir: projectDir, documentRoot: documentRoot, passthru: passthru, + StoppedChan: make(chan bool, 1), }, nil } @@ -195,6 +197,8 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, for _, path := range pathsToRemove { os.RemoveAll(path) } + e.CleanupTemporaryDirectories() + p.StoppedChan <- true }() return errors.Wrap(errors.WithStack(runner.Run()), "PHP server exited unexpectedly") From e95e7ad0f515b737deeb0a15ac9149518466de32 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 8 Feb 2025 18:44:34 +0100 Subject: [PATCH 419/466] fix: cleanup additional temporary directories --- commands/local_server_start.go | 1 + local/php/fpm.go | 6 +----- local/php/php_builtin_server.go | 7 +------ local/php/php_server.go | 16 ++++++++-------- local/pid/pidfile.go | 13 +++++++++++++ 5 files changed, 24 insertions(+), 19 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index 224edb66..af3479e4 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -421,6 +421,7 @@ var localServerStartCmd = &console.Command{ if p.PHPServer != nil { <-p.PHPServer.StoppedChan } + pidFile.CleanupDirectories() ui.Success("Stopped all processes successfully") } return nil diff --git a/local/php/fpm.go b/local/php/fpm.go index b1092d24..e783dcb3 100644 --- a/local/php/fpm.go +++ b/local/php/fpm.go @@ -114,9 +114,5 @@ env['LC_ALL'] = C } func (p *Server) fpmConfigFile() string { - path := filepath.Join(p.homeDir, fmt.Sprintf("php/%s/fpm-%s.ini", name(p.projectDir), p.Version.Version)) - if _, err := os.Stat(filepath.Dir(path)); os.IsNotExist(err) { - _ = os.MkdirAll(filepath.Dir(path), 0755) - } - return path + return filepath.Join(p.tempDir, fmt.Sprintf("fpm-%s.ini", p.Version.Version)) } diff --git a/local/php/php_builtin_server.go b/local/php/php_builtin_server.go index 88638d75..3a394e55 100644 --- a/local/php/php_builtin_server.go +++ b/local/php/php_builtin_server.go @@ -21,7 +21,6 @@ package php import ( "fmt" - "os" "path/filepath" ) @@ -61,9 +60,5 @@ require $script; `) func (p *Server) phpRouterFile() string { - path := filepath.Join(p.homeDir, fmt.Sprintf("php/%s-router.php", name(p.projectDir))) - if _, err := os.Stat(filepath.Dir(path)); os.IsNotExist(err) { - _ = os.MkdirAll(filepath.Dir(path), 0755) - } - return path + return filepath.Join(p.tempDir, fmt.Sprintf("%s-router.php", p.Version.Version)) } diff --git a/local/php/php_server.go b/local/php/php_server.go index 19d3e23d..22224bb3 100644 --- a/local/php/php_server.go +++ b/local/php/php_server.go @@ -50,7 +50,7 @@ type Server struct { logger zerolog.Logger StoppedChan chan bool appVersion string - homeDir string + tempDir string projectDir string documentRoot string passthru string @@ -76,7 +76,6 @@ func NewServer(homeDir, projectDir, documentRoot, passthru, appVersion string, l Version: version, logger: logger.With().Str("source", "PHP").Str("php", version.Version).Str("path", version.ServerPath()).Logger(), appVersion: appVersion, - homeDir: homeDir, projectDir: projectDir, documentRoot: documentRoot, passthru: passthru, @@ -86,7 +85,13 @@ func NewServer(homeDir, projectDir, documentRoot, passthru, appVersion string, l // Start starts a PHP server func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, func() error, error) { - var pathsToRemove []string + p.tempDir = pidFile.TempDirectory() + if _, err := os.Stat(p.tempDir); os.IsNotExist(err) { + if err = os.MkdirAll(p.tempDir, 0755); err != nil { + return nil, nil, err + } + } + port, err := process.FindAvailablePort() if err != nil { p.logger.Debug().Err(err).Msg("unable to find an available port") @@ -125,7 +130,6 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, return nil, nil, errors.WithStack(err) } p.proxy.Transport = &cgiTransport{} - pathsToRemove = append(pathsToRemove, fpmConfigFile) binName = "php-fpm" workerName = "PHP-FPM" args = []string{p.Version.ServerPath(), "--nodaemonize", "--fpm-config", fpmConfigFile} @@ -151,7 +155,6 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, if err := os.WriteFile(routerPath, phprouter, 0644); err != nil { return nil, nil, errors.WithStack(err) } - pathsToRemove = append(pathsToRemove, routerPath) binName = "php" workerName = "PHP" args = []string{p.Version.ServerPath(), "-S", "127.0.0.1:" + strconv.Itoa(port), "-d", "variables_order=EGPCS", routerPath} @@ -194,9 +197,6 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, return phpPidFile, func() error { defer func() { - for _, path := range pathsToRemove { - os.RemoveAll(path) - } e.CleanupTemporaryDirectories() p.StoppedChan <- true }() diff --git a/local/pid/pidfile.go b/local/pid/pidfile.go index b5e41f28..243a2012 100644 --- a/local/pid/pidfile.go +++ b/local/pid/pidfile.go @@ -232,6 +232,19 @@ func (p *PidFile) WorkerPidDir() string { return filepath.Join(util.GetHomeDir(), "var", name(p.Dir)) } +func (p *PidFile) TempDirectory() string { + return filepath.Join(util.GetHomeDir(), "php", name(p.Dir)) +} + +func (p *PidFile) CleanupDirectories() { + os.RemoveAll(p.TempDirectory()) + // We don't want to force removal of log and pid files, we only want to + // clean up empty directories. To do so we use `os.Remove` instead of + // `os.RemoveAll` + os.Remove(p.WorkerLogDir()) + os.Remove(p.WorkerPidDir()) +} + func (p *PidFile) LogReader() (io.ReadCloser, error) { logFile := p.LogFile() if err := os.MkdirAll(filepath.Dir(logFile), 0755); err != nil { From f7b227d3534bb4136394ba0c3adca60e3a75147b Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 14 Feb 2025 05:54:12 -0500 Subject: [PATCH 420/466] Update local/php/executor.go Co-authored-by: Fabien Potencier --- local/php/executor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/php/executor.go b/local/php/executor.go index a014ce45..b66dfaca 100644 --- a/local/php/executor.go +++ b/local/php/executor.go @@ -165,7 +165,7 @@ func (e *Executor) DetectScriptDir() (string, error) { // Config determines the right version of PHP depending on the configuration // (+ its configuration). It also creates some symlinks to ease the integration -// with underlying tools that could try to run PHP. This is the responsability +// with underlying tools that could try to run PHP. This is the responsibility // of the caller to clean those temporary files. One can call // CleanupTemporaryDirectories to do so. func (e *Executor) Config(loadDotEnv bool) error { From e0b9e03aefeb6b64b1a7e1d7d33ac35ad4bf51b9 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 14 Feb 2025 13:33:53 +0100 Subject: [PATCH 421/466] fix: cleanup stale temporary directories please note that this might take a while because we clean by batches, use `find ~/.symfony5/tmp -type d -mindepth 1 -maxdepth 1 -delete` if you are eager --- local/php/composer.go | 5 +-- local/php/executor.go | 78 +++++++++++++++++++++++++++++++++++++++++ local/php/php_server.go | 1 + main.go | 2 ++ 4 files changed, 84 insertions(+), 2 deletions(-) diff --git a/local/php/composer.go b/local/php/composer.go index 65fd9ef8..c6f8b5b5 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -78,7 +78,7 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, fmt.Fprintln(logger, " WARNING: Unable to find Composer, downloading one. It is recommended to install Composer yourself at https://getcomposer.org/download/") // we don't store it under bin/ to avoid it being found by findComposer as we want to only use it as a fallback binDir := filepath.Join(util.GetHomeDir(), "composer") - if path, err = downloadComposer(binDir); err != nil { + if path, err = downloadComposer(binDir, debugLogger); err != nil { return ComposerResult{ code: 1, error: errors.Wrap(err, "unable to find composer, get it at https://getcomposer.org/download/"), @@ -157,7 +157,7 @@ func findComposer(extraBin string, logger zerolog.Logger) (string, error) { return "", os.ErrNotExist } -func downloadComposer(dir string) (string, error) { +func downloadComposer(dir string, debugLogger zerolog.Logger) (string, error) { if err := os.MkdirAll(dir, 0755); err != nil { return "", err } @@ -193,6 +193,7 @@ func downloadComposer(dir string) (string, error) { SkipNbArgs: 1, Stdout: &stdout, Stderr: &stdout, + Logger: debugLogger, } ret := e.Execute(false) if ret == 1 { diff --git a/local/php/executor.go b/local/php/executor.go index b66dfaca..91d384cd 100644 --- a/local/php/executor.go +++ b/local/php/executor.go @@ -29,6 +29,7 @@ import ( "runtime" "strings" "syscall" + "time" "github.com/pkg/errors" "github.com/rs/xid" @@ -291,6 +292,7 @@ func (e *Executor) Config(loadDotEnv bool) error { } func (e *Executor) CleanupTemporaryDirectories() { + go cleanupStaleTemporaryDirectories(e.Logger) if e.iniDir != "" { os.RemoveAll(e.iniDir) } @@ -299,6 +301,82 @@ func (e *Executor) CleanupTemporaryDirectories() { } } +// The Symfony CLI used to leak temporary directories until v5.10.8. The bug is +// fixed but because directories names are random they are not going to be +// reused and thus are not going to be cleaned up. And because they might be +// in-use by running servers we can't simply delete the parent directory. This +// is why we make our best to find the oldest directories and remove then, +// cleaning the directory little by little. +func cleanupStaleTemporaryDirectories(mainLogger zerolog.Logger) { + parentDirectory := filepath.Join(util.GetHomeDir(), "tmp") + mainLogger = mainLogger.With().Str("dir", parentDirectory).Logger() + + if len(parentDirectory) < 6 { + mainLogger.Warn().Msg("temporary dir path looks too short") + return + } + + mainLogger.Debug().Msg("Starting temporary directory cleanup...") + dir, err := os.Open(parentDirectory) + if err != nil { + mainLogger.Warn().Err(err).Msg("Failed to open temporary directory") + return + } + defer dir.Close() + + // the duration after which we consider temporary directories as + // stale and can be removed + cutoff := time.Now().Add(-7 * 24 * time.Hour) + + for { + // we might have a lof of entries so we need to work in batches + entries, err := dir.Readdirnames(30) + if err == io.EOF { + mainLogger.Debug().Msg("Cleaning is done...") + return + } + if err != nil { + mainLogger.Warn().Err(err).Msg("Failed to read entries") + return + } + + for _, entry := range entries { + logger := mainLogger.With().Str("entry", entry).Logger() + + // we generate temporary directory names with + // `xid.New().String()` which is always 20 char long + if len(entry) != 20 { + logger.Debug().Msg("found an entry that is not from us") + continue + } else if _, err := xid.FromString(entry); err != nil { + logger.Debug().Err(err).Msg("found an entry that is not from us") + continue + } + + entryPath := filepath.Join(parentDirectory, entry) + file, err := os.Open(entryPath) + if err != nil { + logger.Warn().Err(err).Msg("failed to read entry") + continue + } else if fi, err := file.Stat(); err != nil { + logger.Warn().Err(err).Msg("failed to read entry") + continue + } else if !fi.IsDir() { + logger.Warn().Err(err).Msg("entry is not a directory") + continue + } else if fi.ModTime().After(cutoff) { + logger.Debug().Any("cutoff", cutoff).Msg("entry is more recent than cutoff, keeping it for now") + continue + } + + logger.Debug().Str("entry", entry).Msg("entry matches the criterias, removing it") + if err := os.RemoveAll(entryPath); err != nil { + logger.Warn().Err(err).Msg("failed to remove entry") + } + } + } +} + // Find composer depending on the configuration func (e *Executor) findComposer(extraBin string) (string, error) { if scriptDir, err := e.DetectScriptDir(); err == nil { diff --git a/local/php/php_server.go b/local/php/php_server.go index 22224bb3..4384cc25 100644 --- a/local/php/php_server.go +++ b/local/php/php_server.go @@ -166,6 +166,7 @@ func (p *Server) Start(ctx context.Context, pidFile *pid.PidFile) (*pid.PidFile, BinName: binName, Args: args, scriptDir: p.projectDir, + Logger: p.logger, } p.logger.Info().Int("port", port).Msg("listening") diff --git a/main.go b/main.go index 2d89d1e9..4d93c765 100644 --- a/main.go +++ b/main.go @@ -68,12 +68,14 @@ func main() { BinName: args[1], Args: args[1:], ExtraEnv: getCliExtraEnv(), + Logger: terminal.Logger, } os.Exit(e.Execute(true)) } // called via "symfony console"? if len(args) >= 2 && args[1] == "console" { if executor, err := php.SymonyConsoleExecutor(args[2:]); err == nil { + executor.Logger = terminal.Logger executor.ExtraEnv = getCliExtraEnv() os.Exit(executor.Execute(false)) } From 3dfbfcacf9f858561586f9ac9319c102ff8213a7 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 14 Feb 2025 16:00:30 +0100 Subject: [PATCH 422/466] feat: improve stale temp directories background cleanup --- local/php/executor.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/local/php/executor.go b/local/php/executor.go index 91d384cd..b3123788 100644 --- a/local/php/executor.go +++ b/local/php/executor.go @@ -292,13 +292,22 @@ func (e *Executor) Config(loadDotEnv bool) error { } func (e *Executor) CleanupTemporaryDirectories() { - go cleanupStaleTemporaryDirectories(e.Logger) + backgroundCleanup := make(chan bool, 1) + go cleanupStaleTemporaryDirectories(e.Logger, backgroundCleanup) + if e.iniDir != "" { os.RemoveAll(e.iniDir) } if e.tempDir != "" { os.RemoveAll(e.tempDir) } + + // give some room to the background clean up job to do its work + select { + case <-backgroundCleanup: + case <-time.After(100 * time.Millisecond): + e.Logger.Debug().Msg("Allocated time for temporary directories to be cleaned up is over, it will resume later on") + } } // The Symfony CLI used to leak temporary directories until v5.10.8. The bug is @@ -307,7 +316,10 @@ func (e *Executor) CleanupTemporaryDirectories() { // in-use by running servers we can't simply delete the parent directory. This // is why we make our best to find the oldest directories and remove then, // cleaning the directory little by little. -func cleanupStaleTemporaryDirectories(mainLogger zerolog.Logger) { +func cleanupStaleTemporaryDirectories(mainLogger zerolog.Logger, doneCh chan<- bool) { + defer func() { + doneCh <- true + }() parentDirectory := filepath.Join(util.GetHomeDir(), "tmp") mainLogger = mainLogger.With().Str("dir", parentDirectory).Logger() From 716eb38ba541c721da7ab6ed90e1755947bd6d23 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 15 Feb 2025 12:26:07 +0100 Subject: [PATCH 423/466] refacto: extract WSL check fron symfony-cli/console package I believe this check should not be part of the symfony-cli/console package as it is not generic and display a warning about the Symfony CLI binary --- commands/root.go | 2 ++ commands/wsl_others.go | 26 ++++++++++++++++++++++++++ commands/wsl_windows.go | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 commands/wsl_others.go create mode 100644 commands/wsl_windows.go diff --git a/commands/root.go b/commands/root.go index cbe528e3..01cbaa44 100644 --- a/commands/root.go +++ b/commands/root.go @@ -100,6 +100,8 @@ func init() { } func InitAppFunc(c *console.Context) error { + checkWSL() + envs.ComputeDockerUserAgent(c.App.Name, c.App.Version) psh, err := platformsh.Get() diff --git a/commands/wsl_others.go b/commands/wsl_others.go new file mode 100644 index 00000000..9ddae2ed --- /dev/null +++ b/commands/wsl_others.go @@ -0,0 +1,26 @@ +//go:build !windows +// +build !windows + +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +func checkWSL() { +} diff --git a/commands/wsl_windows.go b/commands/wsl_windows.go new file mode 100644 index 00000000..10301a4b --- /dev/null +++ b/commands/wsl_windows.go @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +import ( + "os" + + "github.com/symfony-cli/terminal" +) + +func checkWSL() { + if fi, err := os.Stat("/proc/version"); fi == nil || err != nil { + return + } + + ui := terminal.SymfonyStyle(terminal.Stdout, terminal.Stdin) + ui.Error("Wrong binary for WSL") + terminal.Println(`You are trying to run the Windows version of the Symfony CLI on WSL (Linux). +You must use the Linux version to use the Symfony CLI on WSL. + +Download it at https://symfony.com/download +`) + os.Exit(1) +} From c86f25b888aee8048021342d0fc09893f18c2001 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 15 Feb 2025 14:06:15 +0100 Subject: [PATCH 424/466] refactor: improve cleaning up stale temp directories if workers fail to shutdown --- commands/local_server_start.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/commands/local_server_start.go b/commands/local_server_start.go index af3479e4..1ddb5016 100644 --- a/commands/local_server_start.go +++ b/commands/local_server_start.go @@ -413,15 +413,16 @@ var localServerStartCmd = &console.Command{ case <-shutdownCh: terminal.Eprintln("") terminal.Eprintln("Shutting down! Waiting for all workers to be done.") - if err := waitForWorkers(projectDir, pidFile); err != nil { - return err - } - terminal.Eprintln("") + err := waitForWorkers(projectDir, pidFile) // wait for the PHP Server to be done cleaning up if p.PHPServer != nil { <-p.PHPServer.StoppedChan } pidFile.CleanupDirectories() + if err != nil { + return err + } + terminal.Eprintln("") ui.Success("Stopped all processes successfully") } return nil From 5b3448fdf53d72f006e60c672c7c831b359d7cdc Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 17 Feb 2025 09:43:04 +0100 Subject: [PATCH 425/466] Bump dependencies --- go.mod | 47 +++++++++++----------- go.sum | 121 +++++++++++++++++++++++++++++---------------------------- 2 files changed, 87 insertions(+), 81 deletions(-) diff --git a/go.mod b/go.mod index 3f8f89fd..ebbb6087 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,14 @@ module github.com/symfony-cli/symfony-cli -go 1.22.4 +go 1.23.0 + +toolchain go1.23.3 require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v27.3.1+incompatible + github.com/docker/docker v27.5.1+incompatible github.com/elazarl/goproxy v0.0.0-20240909085733-6741dbfc16a1 github.com/fabpot/local-php-security-checker/v2 v2.1.3 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 @@ -21,16 +23,16 @@ require ( github.com/rjeczalik/notify v0.9.3 github.com/rs/xid v1.6.0 github.com/rs/zerolog v1.33.0 - github.com/schollz/progressbar/v3 v3.16.1 + github.com/schollz/progressbar/v3 v3.18.0 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.6 - github.com/symfony-cli/console v1.1.5 + github.com/symfony-cli/console v1.2.0 github.com/symfony-cli/phpstore v1.0.12 github.com/symfony-cli/terminal v1.0.7 - golang.org/x/sync v0.8.0 - golang.org/x/text v0.19.0 + golang.org/x/sync v0.11.0 + golang.org/x/text v0.22.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/yaml.v2 v2.4.0 ) @@ -43,7 +45,7 @@ require ( github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -54,14 +56,14 @@ require ( github.com/imdario/mergo v0.3.16 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect - github.com/moby/term v0.5.0 // indirect + github.com/moby/term v0.5.2 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect @@ -72,20 +74,21 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect - go.opentelemetry.io/otel v1.30.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 // indirect - go.opentelemetry.io/otel/metric v1.30.0 // indirect - go.opentelemetry.io/otel/sdk v1.30.0 // indirect - go.opentelemetry.io/otel/trace v1.30.0 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/time v0.7.0 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect + go.opentelemetry.io/otel v1.34.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 // indirect + go.opentelemetry.io/otel/metric v1.34.0 // indirect + go.opentelemetry.io/otel/sdk v1.34.0 // indirect + go.opentelemetry.io/otel/trace v1.34.0 // indirect + golang.org/x/crypto v0.33.0 // indirect + golang.org/x/exp v0.0.0-20250215185904-eff6e970281f // indirect + golang.org/x/net v0.35.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/term v0.29.0 // indirect + golang.org/x/time v0.10.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.1 // indirect - software.sslmate.com/src/go-pkcs12 v0.4.0 // indirect + software.sslmate.com/src/go-pkcs12 v0.5.0 // indirect ) diff --git a/go.sum b/go.sum index 73c4fee1..8a29b326 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= @@ -23,8 +23,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= -github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.5.1+incompatible h1:4PYU5dnBYqRQi0294d1FBECqT9ECWeQAIfE8q4YnPY8= +github.com/docker/docker v27.5.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -38,8 +38,8 @@ github.com/fabpot/local-php-security-checker/v2 v2.1.3/go.mod h1:t4Qk2u9Mj4ZM05X github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -56,8 +56,8 @@ 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/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -84,8 +84,9 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= @@ -103,8 +104,8 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= @@ -137,8 +138,8 @@ github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/schollz/progressbar/v3 v3.16.1 h1:RnF1neWZFzLCoGx8yp1yF7SDl4AzNDI5y4I0aUJRrZQ= -github.com/schollz/progressbar/v3 v3.16.1/go.mod h1:I2ILR76gz5VXqYMIY/LdLecvMHDPVcQm3W/MSKi1TME= +github.com/schollz/progressbar/v3 v3.18.0 h1:uXdoHABRFmNIjUfte/Ex7WtuyVslrw2wVPQmCN62HpA= +github.com/schollz/progressbar/v3 v3.18.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= @@ -151,12 +152,12 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/symfony-cli/cert v1.0.6 h1:FKdNRhKSxc+IcOkSRYvcOjr4jyZxGHiNS0xCN0uXZQI= github.com/symfony-cli/cert v1.0.6/go.mod h1:7Lt0uwi9z6DYTwLQeKsdPrsTqvTZRTqdlVSDJJqKUVo= -github.com/symfony-cli/console v1.1.5 h1:zN1n0cN5jTYx+wf+AxEtNprPGsoyYtgsQHia1tLFgME= -github.com/symfony-cli/console v1.1.5/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= +github.com/symfony-cli/console v1.2.0 h1:j7xHRB9QizWZNRtkj3clAtDamb+bYddYiOwgZFpaUZY= +github.com/symfony-cli/console v1.2.0/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA= github.com/symfony-cli/phpstore v1.0.12/go.mod h1:U29bdJBPs9p28PzLIRKfKfKkaiH0kacdyufl3eSB1d4= github.com/symfony-cli/terminal v1.0.7 h1:57L9PUTE2cHfQtP8Ti8dyiiPEYlQ1NBIDpMJ3RPEGPc= @@ -170,29 +171,31 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= -go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= -go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 h1:umZgi92IyxfXd/l4kaDhnKgY8rnN/cZcF1LKc6I8OQ8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0/go.mod h1:4lVs6obhSVRb1EW5FhOuBTyiQhtRtAnnva9vD3yRfq8= -go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= -go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= -go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= -go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= -go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= -go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= -go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= -go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSGJt/Ao6Gp4CXckLxVRRsRgDHoI8XjbL3PDl8s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I= +go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= +go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 h1:BEj3SPM81McUZHYjRS5pEgNgnmzGJ5tRpU5krWnV8Bs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0/go.mod h1:9cKLGBDzI/F3NoHLQGm4ZrYdIHsvGt6ej6hUowxY0J4= +go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= +go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= +go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= +go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= 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.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= -golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw= -golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= +golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= +golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= +golang.org/x/exp v0.0.0-20250215185904-eff6e970281f h1:oFMYAjX0867ZD2jcNiLBrI9BdpmEkvPyi5YrBGXbamg= +golang.org/x/exp v0.0.0-20250215185904-eff6e970281f/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -200,13 +203,13 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -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/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/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= @@ -216,16 +219,16 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.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= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= 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.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= +golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -234,14 +237,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM= -google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f h1:gap6+3Gk41EItBuyi4XX/bp4oqJ3UwuIMl25yGinuAA= +google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:Ic02D47M+zbarjYYUlK57y316f2MoN0gjAwI3f2S95o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= +google.golang.org/protobuf v1.36.3/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-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -258,5 +261,5 @@ gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM= howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= -software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k= -software.sslmate.com/src/go-pkcs12 v0.4.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= +software.sslmate.com/src/go-pkcs12 v0.5.0 h1:EC6R394xgENTpZ4RltKydeDUjtlM5drOYIG9c6TVj2M= +software.sslmate.com/src/go-pkcs12 v0.5.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= From 64ca240d2c476417cfc5d47d0cbdbd0eb93f3fa1 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 17 Feb 2025 09:44:57 +0100 Subject: [PATCH 426/466] Bump proxy --- go.mod | 2 +- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index ebbb6087..ea93e946 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 github.com/docker/docker v27.5.1+incompatible - github.com/elazarl/goproxy v0.0.0-20240909085733-6741dbfc16a1 + github.com/elazarl/goproxy v1.7.0 github.com/fabpot/local-php-security-checker/v2 v2.1.3 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 github.com/hashicorp/go-version v1.7.0 diff --git a/go.sum b/go.sum index 8a29b326..56b930f6 100644 --- a/go.sum +++ b/go.sum @@ -29,10 +29,8 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20240909085733-6741dbfc16a1 h1:g7YUigN4dW2+zpdusdTTghZ+5Py3BaUMAStvL8Nk+FY= -github.com/elazarl/goproxy v0.0.0-20240909085733-6741dbfc16a1/go.mod h1:thX175TtLTzLj3p7N/Q9IiKZ7NF+p72cvL91emV0hzo= -github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= -github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= +github.com/elazarl/goproxy v1.7.0 h1:EXv2nV4EjM60ZtsEVLYJG4oBXhDGutMKperpHsZ/v+0= +github.com/elazarl/goproxy v1.7.0/go.mod h1:X/5W/t+gzDyLfHW4DrMdpjqYjpXsURlBt9lpBDxZZZQ= github.com/fabpot/local-php-security-checker/v2 v2.1.3 h1:sL69IHlEvlmaOnyzfOhIAbrG1Ugp2IibM3f6JVxV+yk= github.com/fabpot/local-php-security-checker/v2 v2.1.3/go.mod h1:t4Qk2u9Mj4ZM05X4cnwuwqrHGDKohweR8ox5rFBPBls= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= From f44b5cdcb2e9ebd5362e530156d99e973f34d88b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 17 Feb 2025 10:06:35 +0100 Subject: [PATCH 427/466] Fix Docker client version --- envs/docker_version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envs/docker_version.go b/envs/docker_version.go index 6713f4ce..f0d9f3c9 100644 --- a/envs/docker_version.go +++ b/envs/docker_version.go @@ -22,4 +22,4 @@ package envs -const dockerClientVersion = "v27.3.1" +const dockerClientVersion = "v27.5.1" From cced2c74db8245a6c5ba695463d6efe5f06d9022 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 17 Feb 2025 10:01:02 +0100 Subject: [PATCH 428/466] feat: make command names case insensitive From be907bf4b305ab16fe33298a0f1adce057c467b9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 17 Feb 2025 11:30:11 +0100 Subject: [PATCH 429/466] Fix typo --- commands/completion_posix.go | 2 +- local/php/symfony.go | 7 ++++--- main.go | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/commands/completion_posix.go b/commands/completion_posix.go index 97557993..5144a782 100644 --- a/commands/completion_posix.go +++ b/commands/completion_posix.go @@ -31,7 +31,7 @@ func autocompleteSymfonyConsoleWrapper(context *console.Context, words complete. // Composer does not support those options yet, so we only use them for Symfony Console args = append(args, "-a1", fmt.Sprintf("-s%s", console.GuessShell())) - if executor, err := php.SymonyConsoleExecutor(args); err == nil { + if executor, err := php.SymfonyConsoleExecutor(args); err == nil { os.Exit(executor.Execute(false)) } diff --git a/local/php/symfony.go b/local/php/symfony.go index 4ae705f0..c0ee7981 100644 --- a/local/php/symfony.go +++ b/local/php/symfony.go @@ -3,13 +3,14 @@ package php import ( "os" - "github.com/pkg/errors" "path/filepath" + + "github.com/pkg/errors" ) -// ComposerExecutor returns an Executor prepared to run Symfony Console. +// SymfonyConsoleExecutor returns an Executor prepared to run Symfony Console. // It returns an error if no console binary is found. -func SymonyConsoleExecutor(args []string) (*Executor, error) { +func SymfonyConsoleExecutor(args []string) (*Executor, error) { dir, err := os.Getwd() if err != nil { return nil, errors.WithStack(err) diff --git a/main.go b/main.go index 4d93c765..bdd7af30 100644 --- a/main.go +++ b/main.go @@ -74,7 +74,7 @@ func main() { } // called via "symfony console"? if len(args) >= 2 && args[1] == "console" { - if executor, err := php.SymonyConsoleExecutor(args[2:]); err == nil { + if executor, err := php.SymfonyConsoleExecutor(args[2:]); err == nil { executor.Logger = terminal.Logger executor.ExtraEnv = getCliExtraEnv() os.Exit(executor.Execute(false)) From 055440ba78f55dea780d04f0543398adb1217847 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 17 Feb 2025 11:50:06 +0100 Subject: [PATCH 430/466] Fix unbuffered os.Signal channel --- local/php/executor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/php/executor.go b/local/php/executor.go index b3123788..bb3e5774 100644 --- a/local/php/executor.go +++ b/local/php/executor.go @@ -457,7 +457,7 @@ func (e *Executor) Execute(loadDotEnv bool) int { close(waitCh) }() - sigChan := make(chan os.Signal) + sigChan := make(chan os.Signal, 1) signal.Notify(sigChan) defer signal.Stop(sigChan) From fc60c8163a4f92d2cf078ed93d5306614e1289b6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 17 Feb 2025 11:52:32 +0100 Subject: [PATCH 431/466] Remove unused func --- local/php/php_server.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/local/php/php_server.go b/local/php/php_server.go index 4384cc25..56adacd0 100644 --- a/local/php/php_server.go +++ b/local/php/php_server.go @@ -21,9 +21,7 @@ package php import ( "context" - "crypto/sha1" "fmt" - "io" "net" "net/http" "net/http/httputil" @@ -238,9 +236,3 @@ func (p *Server) Serve(w http.ResponseWriter, r *http.Request, env map[string]st p.proxy.ServeHTTP(w, r) return nil } - -func name(dir string) string { - h := sha1.New() - io.WriteString(h, dir) - return fmt.Sprintf("%x", h.Sum(nil)) -} From 333d8456465d2c5240a1f22aec25940c363d4421 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 18 Feb 2025 08:28:30 +0100 Subject: [PATCH 432/466] Extract logic for parsing Symfony CLI apps --- local/platformsh/generator/commands.go | 59 ++----------- symfony/cli.go | 112 +++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 50 deletions(-) create mode 100644 symfony/cli.go diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index 21af685f..025d1a15 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -11,44 +11,11 @@ import ( "text/template" "github.com/mitchellh/go-homedir" - "github.com/pkg/errors" "github.com/symfony-cli/console" "github.com/symfony-cli/symfony-cli/local/platformsh" + "github.com/symfony-cli/symfony-cli/symfony" ) -type application struct { - Namespaces []namespace - Commands []command -} - -type namespace struct { - ID string - Commands []string -} - -type command struct { - Name string - Usage []string - Description string - Help string - Definition definition - Hidden bool - Aliases []string -} - -type definition struct { - Arguments map[string]argument - Options map[string]option -} - -type argument struct { -} - -type option struct { - Shortcut string - Default interface{} -} - var commandsTemplate = template.Must(template.New("output").Parse(`// Code generated by platformsh/generator/main.go // DO NOT EDIT @@ -112,20 +79,12 @@ func generateCommands() { } func parseCommands(cloudPath string) (string, error) { - var buf bytes.Buffer - var bufErr bytes.Buffer - cmd := exec.Command(cloudPath, "list", "--format=json", "--all") - cmd.Stdout = &buf - cmd.Stderr = &bufErr - if err := cmd.Run(); err != nil { - return "", errors.Errorf("unable to list commands: %s\n%s\n%s", err, bufErr.String(), buf.String()) + wd, err := os.Getwd() + if err != nil { + return "", err } - - // Fix PHP types - cleanOutput := bytes.ReplaceAll(buf.Bytes(), []byte(`"arguments":[]`), []byte(`"arguments":{}`)) - - var definition application - if err := json.Unmarshal(cleanOutput, &definition); err != nil { + cliApp, err := symfony.NewGoCliApp(wd, cloudPath, []string{"--all"}) + if err != nil { return "", err } @@ -147,7 +106,7 @@ func parseCommands(cloudPath string) (string, error) { excludedOptions = append(excludedOptions, console.VersionFlag.Names()...) definitionAsString := "" - for _, command := range definition.Commands { + for _, command := range cliApp.Commands { if strings.Contains(command.Description, "deprecated") || strings.Contains(command.Description, "DEPRECATED") { continue } @@ -162,7 +121,7 @@ func parseCommands(cloudPath string) (string, error) { } namespace := "cloud" loop: - for _, n := range definition.Namespaces { + for _, n := range cliApp.Namespaces { for _, name := range n.Commands { if name == command.Name { if n.ID != "_global" { @@ -282,7 +241,7 @@ func getCommandAliases(name, cloudPath string) ([]string, error) { return []string{}, nil //return nil, errors.Errorf("unable to get definition for command %s: %s\n%s\n%s", name, err, bufErr.String(), buf.String()) } - var cmd command + var cmd symfony.CliCommand if err := json.Unmarshal(buf.Bytes(), &cmd); err != nil { return nil, err } diff --git a/symfony/cli.go b/symfony/cli.go new file mode 100644 index 00000000..b7130a25 --- /dev/null +++ b/symfony/cli.go @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package symfony + +import ( + "bytes" + "encoding/json" + "fmt" + "os/exec" + "strings" + + "github.com/pkg/errors" + "github.com/symfony-cli/symfony-cli/local/php" +) + +type CliApp struct { + Commands []CliCommand + Namespaces []CliNamespace +} + +type CliNamespace struct { + ID string + Commands []string +} + +type CliCommand struct { + Name string + Usage []string + Description string + Help string + Definition CliDefinition + Hidden bool + Aliases []string +} + +type CliDefinition struct { + Arguments map[string]CliArgument + Options map[string]CliOption +} + +type CliArgument struct { + Required bool `json:"is_required"` + IsArray bool `json:"is_array"` + Description string `json:"description"` + Default interface{} `json:"default"` +} + +type CliOption struct { + Shortcut string `json:"shortcut"` + Description string `json:"description"` + AcceptValue bool `json:"accept_value"` + IsValueRequired bool `json:"is_value_required"` + IsMultiple bool `json:"is_multiple"` + Default interface{} `json:"default"` +} + +func NewCliApp(projectDir string, args []string) (*CliApp, error) { + args = append(args, "list", "--format=json") + var buf bytes.Buffer + e := &php.Executor{ + BinName: "php", + Dir: projectDir, + Args: args, + Stdout: &buf, + Stderr: &buf, + } + if ret := e.Execute(false); ret != 0 { + return nil, errors.Errorf("unable to list commands (%s):\n%s", strings.Join(args, " "), buf.String()) + } + return parseCommands(buf.Bytes()) +} + +func NewGoCliApp(projectDir string, binPath string, args []string) (*CliApp, error) { + var buf bytes.Buffer + cmd := exec.Command(binPath, "list", "--format=json") + cmd.Args = append(cmd.Args, args...) + fmt.Println(cmd.Args) + cmd.Dir = projectDir + cmd.Stdout = &buf + cmd.Stderr = &buf + if err := cmd.Run(); err != nil { + return nil, errors.Errorf("unable to list commands (%s):\n%s\n%s", strings.Join(args, " "), err, buf.String()) + } + return parseCommands(buf.Bytes()) +} + +func parseCommands(output []byte) (*CliApp, error) { + // Fix PHP types + cleanOutput := bytes.ReplaceAll(output, []byte(`"arguments":[]`), []byte(`"arguments":{}`)) + var app *CliApp + if err := json.Unmarshal(cleanOutput, &app); err != nil { + return nil, err + } + return app, nil +} From 7d729912827c0cd8131c92c20d7d6250d84c5ac6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 18 Feb 2025 08:49:38 +0100 Subject: [PATCH 433/466] Add missing license headers --- commands/cloud_env_debug.go | 19 +++++++++++++++++++ commands/completion_others.go | 19 +++++++++++++++++++ commands/completion_posix.go | 19 +++++++++++++++++++ .../doctrine_check_server_version_setting.go | 19 +++++++++++++++++++ commands/local_check_security.go | 19 +++++++++++++++++++ local/php/cgi.go | 19 +++++++++++++++++++ local/php/composer_test.go | 19 +++++++++++++++++++ local/php/context.go | 19 +++++++++++++++++++ local/php/symfony.go | 19 +++++++++++++++++++ local/php/xsendfile.go | 19 +++++++++++++++++++ local/platformsh/db_versions.go | 19 +++++++++++++++++++ local/platformsh/generator/commands.go | 19 +++++++++++++++++++ local/platformsh/generator/config.go | 19 +++++++++++++++++++ local/runner_posix.go | 19 +++++++++++++++++++ local/runner_windows.go | 19 +++++++++++++++++++ 15 files changed, 285 insertions(+) diff --git a/commands/cloud_env_debug.go b/commands/cloud_env_debug.go index ac2a1eb2..4a46619d 100644 --- a/commands/cloud_env_debug.go +++ b/commands/cloud_env_debug.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package commands import ( diff --git a/commands/completion_others.go b/commands/completion_others.go index 3224f2e2..1a825908 100644 --- a/commands/completion_others.go +++ b/commands/completion_others.go @@ -1,6 +1,25 @@ //go:build !darwin && !linux && !freebsd && !openbsd // +build !darwin,!linux,!freebsd,!openbsd +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package commands import ( diff --git a/commands/completion_posix.go b/commands/completion_posix.go index 5144a782..c499fd8e 100644 --- a/commands/completion_posix.go +++ b/commands/completion_posix.go @@ -1,5 +1,24 @@ //go:build darwin || linux || freebsd || openbsd +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package commands import ( diff --git a/commands/doctrine_check_server_version_setting.go b/commands/doctrine_check_server_version_setting.go index b8532e64..a2b67903 100644 --- a/commands/doctrine_check_server_version_setting.go +++ b/commands/doctrine_check_server_version_setting.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package commands import ( diff --git a/commands/local_check_security.go b/commands/local_check_security.go index 0622972b..41b8231d 100644 --- a/commands/local_check_security.go +++ b/commands/local_check_security.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package commands import ( diff --git a/local/php/cgi.go b/local/php/cgi.go index f1b1ff67..e1eb3217 100644 --- a/local/php/cgi.go +++ b/local/php/cgi.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package php import ( diff --git a/local/php/composer_test.go b/local/php/composer_test.go index ad01c475..c6febd3a 100644 --- a/local/php/composer_test.go +++ b/local/php/composer_test.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package php import ( diff --git a/local/php/context.go b/local/php/context.go index 8a51b9a4..b48fd1a5 100644 --- a/local/php/context.go +++ b/local/php/context.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package php type phpServerContextKey string diff --git a/local/php/symfony.go b/local/php/symfony.go index c0ee7981..2684181e 100644 --- a/local/php/symfony.go +++ b/local/php/symfony.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package php import ( diff --git a/local/php/xsendfile.go b/local/php/xsendfile.go index 7e82d140..a72673f4 100644 --- a/local/php/xsendfile.go +++ b/local/php/xsendfile.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package php import ( diff --git a/local/platformsh/db_versions.go b/local/platformsh/db_versions.go index 9c349942..6086d072 100644 --- a/local/platformsh/db_versions.go +++ b/local/platformsh/db_versions.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package platformsh import ( diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index 21af685f..a35b6db6 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( diff --git a/local/platformsh/generator/config.go b/local/platformsh/generator/config.go index e1361726..223b5ddb 100644 --- a/local/platformsh/generator/config.go +++ b/local/platformsh/generator/config.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( diff --git a/local/runner_posix.go b/local/runner_posix.go index 71cb7abf..80af5da5 100644 --- a/local/runner_posix.go +++ b/local/runner_posix.go @@ -1,6 +1,25 @@ //go:build !windows // +build !windows +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package local import ( diff --git a/local/runner_windows.go b/local/runner_windows.go index 4b0ec0b9..868cae6c 100644 --- a/local/runner_windows.go +++ b/local/runner_windows.go @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package local import "os/exec" From 7c32cc09a4728b7b3158e27f7da2870b9bb451ef Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 7 Feb 2025 12:58:04 +0100 Subject: [PATCH 434/466] feat: automatically generate latest PHP version --- commands/generator/main.go | 107 +++++++++++++++++++++++++++++++++++++ commands/local_php_list.go | 4 +- commands/php_version.go | 26 +++++++++ 3 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 commands/generator/main.go create mode 100644 commands/php_version.go diff --git a/commands/generator/main.go b/commands/generator/main.go new file mode 100644 index 00000000..c6e636f8 --- /dev/null +++ b/commands/generator/main.go @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package main + +import ( + "encoding/json" + "fmt" + "io" + "net/http" + "os" + + "github.com/hashicorp/go-version" +) + +func main() { + generateLatestPhpVersion() +} + +func generateLatestPhpVersion() { + resp, err := http.Get("https://www.php.net/releases/active.php") + if err != nil { + panic(err) + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + panic(err) + } + + var result map[int]map[string]struct { + Announcement bool + LatestMinor string `json:"version"` + } + + if err := json.Unmarshal(body, &result); err != nil { + panic(err) + } + + var latestVersion *version.Version + + for _, versions := range result { + for _, versionInfo := range versions { + if !versionInfo.Announcement { + continue + } + + ver, err := version.NewVersion(versionInfo.LatestMinor) + if err != nil { + panic(err) + } + + if latestVersion == nil || ver.GreaterThan(latestVersion) { + latestVersion = ver + } + } + } + + f, err := os.Create("php_version.go") + if err != nil { + panic(err) + } + f.WriteString(`// Code generated by commands/generator/main.go +// DO NOT EDIT + +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +const LatestPhpMajorVersion = "` + fmt.Sprintf("%d.%d", latestVersion.Segments()[0], latestVersion.Segments()[1]) + `" +const LatestPhpMinorVersion = "` + latestVersion.Original() + `" +`) +} diff --git a/commands/local_php_list.go b/commands/local_php_list.go index 2583cdd5..1c76d713 100644 --- a/commands/local_php_list.go +++ b/commands/local_php_list.go @@ -19,6 +19,8 @@ package commands +//go:generate go run generator/main.go + import ( "os" "strings" @@ -88,7 +90,7 @@ var localPhpListCmd = &console.Command{ } terminal.Println("") - terminal.Println("To control the version used in a directory, create a .php-version file that contains the version number (e.g. 8.4 or 8.4.2),") + terminal.Println("To control the version used in a directory, create a .php-version file that contains the version number (e.g. " + LatestPhpMajorVersion + " or " + LatestPhpMinorVersion + "),") terminal.Println("or define config.platform.php inside composer.json.") terminal.Println("If you're using Platform.sh or Upsun, the version can also be specified in their configuration files.") diff --git a/commands/php_version.go b/commands/php_version.go new file mode 100644 index 00000000..30615fe5 --- /dev/null +++ b/commands/php_version.go @@ -0,0 +1,26 @@ +// Code generated by commands/generator/main.go +// DO NOT EDIT + +/* + * Copyright (c) 2021-present Fabien Potencier + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package commands + +const LatestPhpMajorVersion = "8.4" +const LatestPhpMinorVersion = "8.4.3" From 8cf623b985e6a03f63461fd7c48cc6b7b132b4e5 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 18 Feb 2025 07:37:20 +0100 Subject: [PATCH 435/466] build: automate Docker Client and PHP version updates --- .github/workflows/go_generate_update.yml | 40 +++++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go_generate_update.yml b/.github/workflows/go_generate_update.yml index bdef08a6..6f364ee2 100644 --- a/.github/workflows/go_generate_update.yml +++ b/.github/workflows/go_generate_update.yml @@ -5,6 +5,12 @@ on: schedule: - cron: '0 8-18/4 * * 1-5' +env: + GIT_AUTHOR_NAME: github-actions[bot] + GIT_COMMITTER_NAME: github-actions[bot] + GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com + GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com + jobs: update: name: Update generated code @@ -19,16 +25,19 @@ jobs: with: go-version-file: 'go.mod' - - name: Prepare + name: Prepare, generate, and format code run: | rm -rf ~/.platformsh/bin/ - go generate ./ + go generate ./... - name: Check Git status id: git run: | - RESULT=$(git status --untracked-files=no --porcelain) - echo "gitstatus=$RESULT" >> $GITHUB_OUTPUT + { + echo 'gitstatus<> $GITHUB_OUTPUT - name: Test if: steps.git.outputs.gitstatus != '' @@ -36,12 +45,27 @@ jobs: - name: Validate build if: steps.git.outputs.gitstatus != '' run: go run . + - - name: Commit and push the update + name: Commit the update for PSH-related code if: steps.git.outputs.gitstatus != '' run: | - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config user.name "github-actions[bot]" git add local/platformsh/commands.go local/platformsh/config.go - git commit -m "chore: Update supported Platform.sh services" + git diff --staged --quiet || git commit -m "Update supported Platform.sh services" + + - name: Commit the update for Docker-related code + if: steps.git.outputs.gitstatus != '' + run: | + git add envs/docker_version.go + git diff --staged --quiet || git commit -m "Update Docker Client version" + + - name: Commit the update for PHP-related code + if: steps.git.outputs.gitstatus != '' + run: | + git add commands/php_version.go + git diff --staged --quiet || git commit -m "Update latest available PHP version" + + - name: Commit and push the updates + if: steps.git.outputs.gitstatus != '' + run: | git push From 073f56a804e964d999b3410019ebcbd91fc8b099 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 18 Feb 2025 14:13:44 +0100 Subject: [PATCH 436/466] fix: fix generated PSH related code format --- local/platformsh/commands.go | 3008 ++++++++++++------------ local/platformsh/config.go | 2 +- local/platformsh/generator/commands.go | 17 +- local/platformsh/generator/config.go | 9 +- 4 files changed, 1523 insertions(+), 1513 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index a1a03d75..d2a6dcdc 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -30,155 +30,155 @@ var Commands = []*console.Command{ { Category: "cloud", Name: "_completion", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "upsun:_completion", Hidden: true}, }, - Usage: "BASH completion hook.", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "generate-hook", Aliases: []string{"g"},}, - &console.BoolFlag{Name: "multiple", Aliases: []string{"m"},}, - &console.StringFlag{Name: "program", Aliases: []string{"p"},}, - &console.StringFlag{Name: "shell-type",}, + Usage: "BASH completion hook.", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "generate-hook", Aliases: []string{"g"}}, + &console.BoolFlag{Name: "multiple", Aliases: []string{"m"}}, + &console.StringFlag{Name: "program", Aliases: []string{"p"}}, + &console.StringFlag{Name: "shell-type"}, }, }, { Category: "cloud", Name: "bot", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "upsun:bot", Hidden: true}, }, - Usage: "The Platform.sh/Upsun Bot", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "parrot",}, - &console.BoolFlag{Name: "party",}, + Usage: "The Platform.sh/Upsun Bot", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "parrot"}, + &console.BoolFlag{Name: "party"}, }, }, { Category: "cloud", Name: "clear-cache", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "upsun:clear-cache", Hidden: true}, {Name: "cloud:cc"}, {Name: "upsun:cc", Hidden: true}, }, - Usage: "Clear the CLI cache", + Usage: "Clear the CLI cache", }, { Category: "cloud", Name: "docs", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "upsun:docs", Hidden: true}, }, - Usage: "Open the online documentation", - Flags: []console.Flag{ - &console.StringFlag{Name: "browser",}, - &console.BoolFlag{Name: "pipe",}, + Usage: "Open the online documentation", + Flags: []console.Flag{ + &console.StringFlag{Name: "browser"}, + &console.BoolFlag{Name: "pipe"}, }, }, { Category: "cloud", Name: "legacy-migrate", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "upsun:legacy-migrate", Hidden: true}, }, - Usage: "Migrate from the legacy file structure", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "no-backup",}, + Usage: "Migrate from the legacy file structure", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "no-backup"}, }, }, { Category: "cloud", Name: "multi", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "upsun:multi", Hidden: true}, }, - Usage: "Execute a command on multiple projects", - Flags: []console.Flag{ - &console.BoolFlag{Name: "continue",}, - &console.StringFlag{Name: "projects", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "reverse",}, - &console.StringFlag{Name: "sort", DefaultValue: "title",}, + Usage: "Execute a command on multiple projects", + Flags: []console.Flag{ + &console.BoolFlag{Name: "continue"}, + &console.StringFlag{Name: "projects", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "reverse"}, + &console.StringFlag{Name: "sort", DefaultValue: "title"}, }, }, { Category: "cloud", Name: "web", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "upsun:web", Hidden: true}, }, - Usage: "Open the project in the Web Console", - Flags: []console.Flag{ - &console.StringFlag{Name: "browser",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "pipe",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Open the project in the Web Console", + Flags: []console.Flag{ + &console.StringFlag{Name: "browser"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "pipe"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud", Name: "welcome", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "upsun:welcome", Hidden: true}, }, - Usage: "Welcome to Platform.sh/Upsun", - Hidden: console.Hide, + Usage: "Welcome to Platform.sh/Upsun", + Hidden: console.Hide, }, { Category: "cloud", Name: "winky", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "upsun:winky", Hidden: true}, }, - Usage: "", - Hidden: console.Hide, + Usage: "", + Hidden: console.Hide, }, { Category: "cloud:activity", Name: "cancel", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "activity:cancel", Hidden: true}, {Name: "upsun:activity:cancel", Hidden: true}, }, - Usage: "Cancel an activity", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "type", Aliases: []string{"t"},}, + Usage: "Cancel an activity", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all", Aliases: []string{"a"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "type", Aliases: []string{"t"}}, }, }, { Category: "cloud:activity", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "activity:get", Hidden: true}, {Name: "upsun:activity:get", Hidden: true}, }, - Usage: "View detailed information on a single activity", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, - &console.StringFlag{Name: "result",}, - &console.StringFlag{Name: "state",}, - &console.StringFlag{Name: "type", Aliases: []string{"t"},}, + Usage: "View detailed information on a single activity", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all", Aliases: []string{"a"}}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"}}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, + &console.StringFlag{Name: "result"}, + &console.StringFlag{Name: "state"}, + &console.StringFlag{Name: "type", Aliases: []string{"t"}}, }, }, { Category: "cloud:activity", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "activity:list", Hidden: true}, {Name: "upsun:activity:list", Hidden: true}, {Name: "cloud:activities"}, @@ -188,378 +188,378 @@ var Commands = []*console.Command{ {Name: "upsun:act", Hidden: true}, {Name: "act", Hidden: true}, }, - Usage: "Get a list of activities for an environment or project", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, - &console.StringFlag{Name: "limit",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "result",}, - &console.StringFlag{Name: "start",}, - &console.StringFlag{Name: "state",}, - &console.StringFlag{Name: "type", Aliases: []string{"t"},}, + Usage: "Get a list of activities for an environment or project", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all", Aliases: []string{"a"}}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"}}, + &console.StringFlag{Name: "limit"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "result"}, + &console.StringFlag{Name: "start"}, + &console.StringFlag{Name: "state"}, + &console.StringFlag{Name: "type", Aliases: []string{"t"}}, }, }, { Category: "cloud:activity", Name: "log", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "activity:log", Hidden: true}, {Name: "upsun:activity:log", Hidden: true}, }, - Usage: "Display the log for an activity", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, - &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "refresh",}, - &console.StringFlag{Name: "result",}, - &console.StringFlag{Name: "state",}, - &console.BoolFlag{Name: "timestamps", Aliases: []string{"t"},}, - &console.StringFlag{Name: "type",}, + Usage: "Display the log for an activity", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all", Aliases: []string{"a"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"}}, + &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "refresh"}, + &console.StringFlag{Name: "result"}, + &console.StringFlag{Name: "state"}, + &console.BoolFlag{Name: "timestamps", Aliases: []string{"t"}}, + &console.StringFlag{Name: "type"}, }, }, { Category: "cloud:api", Name: "curl", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "api:curl", Hidden: true}, {Name: "upsun:api:curl", Hidden: true}, }, - Usage: "Run an authenticated cURL request on the Platform.sh/Upsun API", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "data", Aliases: []string{"d"},}, - &console.BoolFlag{Name: "disable-compression",}, - &console.BoolFlag{Name: "enable-glob",}, - &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, - &console.StringFlag{Name: "header", Aliases: []string{"H"},}, - &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, - &console.StringFlag{Name: "json",}, - &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + Usage: "Run an authenticated cURL request on the Platform.sh/Upsun API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"}}, + &console.BoolFlag{Name: "disable-compression"}, + &console.BoolFlag{Name: "enable-glob"}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"}}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"}}, + &console.StringFlag{Name: "header", Aliases: []string{"H"}}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"}}, + &console.StringFlag{Name: "json"}, + &console.StringFlag{Name: "request", Aliases: []string{"X"}}, }, }, { Category: "cloud:app", Name: "config-get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "app:config-get", Hidden: true}, {Name: "upsun:app:config-get", Hidden: true}, }, - Usage: "View the configuration of an app", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, - &console.BoolFlag{Name: "refresh",}, + Usage: "View the configuration of an app", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "identity-file", Aliases: []string{"i"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, + &console.BoolFlag{Name: "refresh"}, }, }, { Category: "cloud:app", Name: "config-validate", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "app:config-validate", Hidden: true}, {Name: "upsun:app:config-validate", Hidden: true}, }, - Usage: "Validate the config files of a project", + Usage: "Validate the config files of a project", }, { Category: "cloud:app", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "app:list", Hidden: true}, {Name: "upsun:app:list", Hidden: true}, {Name: "cloud:apps"}, {Name: "upsun:apps", Hidden: true}, {Name: "apps", Hidden: true}, }, - Usage: "List apps in the project", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "pipe",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, + Usage: "List apps in the project", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.BoolFlag{Name: "pipe"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "refresh"}, }, }, { Category: "cloud:auth", Name: "api-token-login", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "auth:api-token-login", Hidden: true}, {Name: "upsun:auth:api-token-login", Hidden: true}, }, - Usage: "Log in to Platform.sh/Upsun using an API token", + Usage: "Log in to Platform.sh/Upsun using an API token", }, { Category: "cloud:auth", Name: "browser-login", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "auth:browser-login", Hidden: true}, {Name: "upsun:auth:browser-login", Hidden: true}, {Name: "cloud:login"}, {Name: "upsun:login", Hidden: true}, {Name: "login", Hidden: true}, }, - Usage: "Log in to Platform.sh/Upsun via a browser", - Flags: []console.Flag{ - &console.StringFlag{Name: "browser",}, - &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, - &console.StringFlag{Name: "max-age",}, - &console.StringFlag{Name: "method",}, - &console.BoolFlag{Name: "pipe",}, + Usage: "Log in to Platform.sh/Upsun via a browser", + Flags: []console.Flag{ + &console.StringFlag{Name: "browser"}, + &console.BoolFlag{Name: "force", Aliases: []string{"f"}}, + &console.StringFlag{Name: "max-age"}, + &console.StringFlag{Name: "method"}, + &console.BoolFlag{Name: "pipe"}, }, }, { Category: "cloud:auth", Name: "info", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "auth:info", Hidden: true}, {Name: "upsun:auth:info", Hidden: true}, }, - Usage: "Display your account information", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-auto-login",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, - &console.BoolFlag{Name: "refresh",}, + Usage: "Display your account information", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-auto-login"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, + &console.BoolFlag{Name: "refresh"}, }, }, { Category: "cloud:auth", Name: "logout", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "auth:logout", Hidden: true}, {Name: "upsun:auth:logout", Hidden: true}, {Name: "cloud:logout"}, {Name: "upsun:logout", Hidden: true}, {Name: "logout", Hidden: true}, }, - Usage: "Log out of Platform.sh/Upsun", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.BoolFlag{Name: "other",}, + Usage: "Log out of Platform.sh/Upsun", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all", Aliases: []string{"a"}}, + &console.BoolFlag{Name: "other"}, }, }, { Category: "cloud:auth", Name: "token", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "auth:token", Hidden: true}, {Name: "upsun:auth:token", Hidden: true}, }, - Usage: "Obtain an OAuth 2 access token for requests to Platform.sh/Upsun APIs", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.BoolFlag{Name: "header", Aliases: []string{"H"},}, - &console.BoolFlag{Name: "no-warn", Aliases: []string{"W"},}, + Usage: "Obtain an OAuth 2 access token for requests to Platform.sh/Upsun APIs", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.BoolFlag{Name: "header", Aliases: []string{"H"}}, + &console.BoolFlag{Name: "no-warn", Aliases: []string{"W"}}, }, }, { Category: "cloud:auth", Name: "verify-phone-number", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "auth:verify-phone-number", Hidden: true}, {Name: "upsun:auth:verify-phone-number", Hidden: true}, }, - Usage: "Verify your phone number interactively", + Usage: "Verify your phone number interactively", }, { Category: "cloud:backup", Name: "create", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "backup:create", Hidden: true}, {Name: "upsun:backup:create", Hidden: true}, {Name: "cloud:backup"}, {Name: "upsun:backup", Hidden: true}, {Name: "backup", Hidden: true}, }, - Usage: "Make a backup of an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "live",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Make a backup of an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "live"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:backup", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "backup:delete", Hidden: true}, {Name: "upsun:backup:delete", Hidden: true}, }, - Usage: "Delete an environment backup", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Delete an environment backup", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:backup", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "backup:get", Hidden: true}, {Name: "upsun:backup:get", Hidden: true}, }, - Usage: "View an environment backup", - Flags: []console.Flag{ - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + Usage: "View an environment backup", + Flags: []console.Flag{ + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, }, }, { Category: "cloud:backup", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "backup:list", Hidden: true}, {Name: "upsun:backup:list", Hidden: true}, {Name: "cloud:backups"}, {Name: "upsun:backups", Hidden: true}, {Name: "backups", Hidden: true}, }, - Usage: "List available backups of an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "List available backups of an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:backup", Name: "restore", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "backup:restore", Hidden: true}, {Name: "upsun:backup:restore", Hidden: true}, }, - Usage: "Restore an environment backup", - Flags: []console.Flag{ - &console.StringFlag{Name: "branch-from",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-code",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "target",}, - &console.BoolFlag{Name: "wait",}, + Usage: "Restore an environment backup", + Flags: []console.Flag{ + &console.StringFlag{Name: "branch-from"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-code"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "target"}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:blue-green", Name: "conclude", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "blue-green:conclude", Hidden: true}, {Name: "upsun:blue-green:conclude", Hidden: true}, }, - Usage: "ALPHA Conclude a blue/green deployment", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "ALPHA Conclude a blue/green deployment", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:blue-green", Name: "deploy", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "blue-green:deploy", Hidden: true}, {Name: "upsun:blue-green:deploy", Hidden: true}, }, - Usage: "ALPHA Perform a blue/green deployment", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "routing-percentage",}, + Usage: "ALPHA Perform a blue/green deployment", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "routing-percentage"}, }, }, { Category: "cloud:blue-green", Name: "enable", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "blue-green:enable", Hidden: true}, {Name: "upsun:blue-green:enable", Hidden: true}, }, - Usage: "ALPHA Enable blue/green deployments", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "routing-percentage", Aliases: []string{"%"},}, + Usage: "ALPHA Enable blue/green deployments", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "routing-percentage", Aliases: []string{"%"}}, }, }, { Category: "cloud:certificate", Name: "add", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "certificate:add", Hidden: true}, {Name: "upsun:certificate:add", Hidden: true}, }, - Usage: "Add an SSL certificate to the project", - Flags: []console.Flag{ - &console.StringFlag{Name: "cert",}, - &console.StringFlag{Name: "chain",}, - &console.StringFlag{Name: "key",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Add an SSL certificate to the project", + Flags: []console.Flag{ + &console.StringFlag{Name: "cert"}, + &console.StringFlag{Name: "chain"}, + &console.StringFlag{Name: "key"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:certificate", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "certificate:delete", Hidden: true}, {Name: "upsun:certificate:delete", Hidden: true}, }, - Usage: "Delete a certificate from the project", - Flags: []console.Flag{ - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Delete a certificate from the project", + Flags: []console.Flag{ + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:certificate", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "certificate:get", Hidden: true}, {Name: "upsun:certificate:get", Hidden: true}, }, - Usage: "View a certificate", - Flags: []console.Flag{ - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + Usage: "View a certificate", + Flags: []console.Flag{ + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, }, }, { Category: "cloud:certificate", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "certificate:list", Hidden: true}, {Name: "upsun:certificate:list", Hidden: true}, {Name: "cloud:certificates"}, @@ -569,355 +569,355 @@ var Commands = []*console.Command{ {Name: "upsun:certs", Hidden: true}, {Name: "certs", Hidden: true}, }, - Usage: "List project certificates", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "domain",}, - &console.StringFlag{Name: "exclude-domain",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "ignore-expiry",}, - &console.StringFlag{Name: "issuer",}, - &console.BoolFlag{Name: "no-auto",}, - &console.BoolFlag{Name: "no-expired",}, - &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "only-auto",}, - &console.BoolFlag{Name: "only-expired",}, - &console.BoolFlag{Name: "pipe-domains",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "List project certificates", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "domain"}, + &console.StringFlag{Name: "exclude-domain"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "ignore-expiry"}, + &console.StringFlag{Name: "issuer"}, + &console.BoolFlag{Name: "no-auto"}, + &console.BoolFlag{Name: "no-expired"}, + &console.BoolFlag{Name: "no-header"}, + &console.BoolFlag{Name: "only-auto"}, + &console.BoolFlag{Name: "only-expired"}, + &console.BoolFlag{Name: "pipe-domains"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:commit", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "commit:get", Hidden: true}, {Name: "upsun:commit:get", Hidden: true}, }, - Usage: "Show commit details", - Flags: []console.Flag{ - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + Usage: "Show commit details", + Flags: []console.Flag{ + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, }, }, { Category: "cloud:commit", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "commit:list", Hidden: true}, {Name: "upsun:commit:list", Hidden: true}, {Name: "cloud:commits"}, {Name: "upsun:commits", Hidden: true}, {Name: "commits", Hidden: true}, }, - Usage: "List commits", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "limit",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "List commits", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.StringFlag{Name: "limit"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:db", Name: "dump", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "db:dump", Hidden: true}, {Name: "upsun:db:dump", Hidden: true}, }, - Usage: "Create a local dump of the remote database", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "charset",}, - &console.StringFlag{Name: "directory", Aliases: []string{"d"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude-table",}, - &console.StringFlag{Name: "file", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "gzip", Aliases: []string{"z"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, - &console.StringFlag{Name: "schema",}, - &console.BoolFlag{Name: "schema-only",}, - &console.BoolFlag{Name: "stdout", Aliases: []string{"o"},}, - &console.StringFlag{Name: "table",}, - &console.BoolFlag{Name: "timestamp", Aliases: []string{"t"},}, + Usage: "Create a local dump of the remote database", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "charset"}, + &console.StringFlag{Name: "directory", Aliases: []string{"d"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "exclude-table"}, + &console.StringFlag{Name: "file", Aliases: []string{"f"}}, + &console.BoolFlag{Name: "gzip", Aliases: []string{"z"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "relationship", Aliases: []string{"r"}}, + &console.StringFlag{Name: "schema"}, + &console.BoolFlag{Name: "schema-only"}, + &console.BoolFlag{Name: "stdout", Aliases: []string{"o"}}, + &console.StringFlag{Name: "table"}, + &console.BoolFlag{Name: "timestamp", Aliases: []string{"t"}}, }, }, { Category: "cloud:db", Name: "sql", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "db:sql", Hidden: true}, {Name: "upsun:db:sql", Hidden: true}, {Name: "cloud:sql"}, {Name: "upsun:sql", Hidden: true}, {Name: "sql", Hidden: true}, }, - Usage: "Run SQL on the remote database", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "raw",}, - &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, - &console.StringFlag{Name: "schema",}, + Usage: "Run SQL on the remote database", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "raw"}, + &console.StringFlag{Name: "relationship", Aliases: []string{"r"}}, + &console.StringFlag{Name: "schema"}, }, }, { Category: "cloud:domain", Name: "add", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "domain:add", Hidden: true}, {Name: "upsun:domain:add", Hidden: true}, }, - Usage: "Add a new domain to the project", - Flags: []console.Flag{ - &console.StringFlag{Name: "attach",}, - &console.StringFlag{Name: "cert",}, - &console.StringFlag{Name: "chain",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "key",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Add a new domain to the project", + Flags: []console.Flag{ + &console.StringFlag{Name: "attach"}, + &console.StringFlag{Name: "cert"}, + &console.StringFlag{Name: "chain"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "key"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:domain", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "domain:delete", Hidden: true}, {Name: "upsun:domain:delete", Hidden: true}, }, - Usage: "Delete a domain from the project", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Delete a domain from the project", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:domain", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "domain:get", Hidden: true}, {Name: "upsun:domain:get", Hidden: true}, }, - Usage: "Show detailed information for a domain", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + Usage: "Show detailed information for a domain", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, }, }, { Category: "cloud:domain", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "domain:list", Hidden: true}, {Name: "upsun:domain:list", Hidden: true}, {Name: "cloud:domains"}, {Name: "upsun:domains", Hidden: true}, {Name: "domains", Hidden: true}, }, - Usage: "Get a list of all domains", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Get a list of all domains", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:domain", Name: "update", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "domain:update", Hidden: true}, {Name: "upsun:domain:update", Hidden: true}, }, - Usage: "Update a domain", - Flags: []console.Flag{ - &console.StringFlag{Name: "cert",}, - &console.StringFlag{Name: "chain",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "key",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Update a domain", + Flags: []console.Flag{ + &console.StringFlag{Name: "cert"}, + &console.StringFlag{Name: "chain"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "key"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "activate", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:activate", Hidden: true}, {Name: "upsun:environment:activate", Hidden: true}, }, - Usage: "Activate an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "parent",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Activate an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "parent"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "branch", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:branch", Hidden: true}, {Name: "upsun:environment:branch", Hidden: true}, {Name: "cloud:branch"}, {Name: "upsun:branch", Hidden: true}, {Name: "branch", Hidden: true}, }, - Usage: "Branch an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-checkout",}, - &console.BoolFlag{Name: "no-clone-parent",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "title",}, - &console.StringFlag{Name: "type",}, - &console.BoolFlag{Name: "wait",}, + Usage: "Branch an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-checkout"}, + &console.BoolFlag{Name: "no-clone-parent"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "title"}, + &console.StringFlag{Name: "type"}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "checkout", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:checkout", Hidden: true}, {Name: "upsun:environment:checkout", Hidden: true}, {Name: "cloud:checkout"}, {Name: "upsun:checkout", Hidden: true}, {Name: "checkout", Hidden: true}, }, - Usage: "Check out an environment", + Usage: "Check out an environment", }, { Category: "cloud:environment", Name: "curl", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:curl", Hidden: true}, {Name: "upsun:environment:curl", Hidden: true}, }, - Usage: "Run an authenticated cURL request on an environment's API", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "data", Aliases: []string{"d"},}, - &console.BoolFlag{Name: "disable-compression",}, - &console.BoolFlag{Name: "enable-glob",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, - &console.StringFlag{Name: "header", Aliases: []string{"H"},}, - &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, - &console.StringFlag{Name: "json",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + Usage: "Run an authenticated cURL request on an environment's API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"}}, + &console.BoolFlag{Name: "disable-compression"}, + &console.BoolFlag{Name: "enable-glob"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"}}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"}}, + &console.StringFlag{Name: "header", Aliases: []string{"H"}}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"}}, + &console.StringFlag{Name: "json"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "request", Aliases: []string{"X"}}, }, }, { Category: "cloud:environment", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:delete", Hidden: true}, {Name: "upsun:environment:delete", Hidden: true}, }, - Usage: "Delete one or more environments", - Flags: []console.Flag{ - &console.BoolFlag{Name: "allow-delete-parent",}, - &console.BoolFlag{Name: "delete-branch",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude",}, - &console.StringFlag{Name: "exclude-status",}, - &console.StringFlag{Name: "exclude-type",}, - &console.BoolFlag{Name: "inactive",}, - &console.BoolFlag{Name: "merged",}, - &console.BoolFlag{Name: "no-delete-branch",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "only-status",}, - &console.StringFlag{Name: "only-type", Aliases: []string{"t"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "status",}, - &console.StringFlag{Name: "type",}, - &console.BoolFlag{Name: "wait",}, + Usage: "Delete one or more environments", + Flags: []console.Flag{ + &console.BoolFlag{Name: "allow-delete-parent"}, + &console.BoolFlag{Name: "delete-branch"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "exclude"}, + &console.StringFlag{Name: "exclude-status"}, + &console.StringFlag{Name: "exclude-type"}, + &console.BoolFlag{Name: "inactive"}, + &console.BoolFlag{Name: "merged"}, + &console.BoolFlag{Name: "no-delete-branch"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "only-status"}, + &console.StringFlag{Name: "only-type", Aliases: []string{"t"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "status"}, + &console.StringFlag{Name: "type"}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "http-access", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:http-access", Hidden: true}, {Name: "upsun:environment:http-access", Hidden: true}, {Name: "cloud:httpaccess"}, {Name: "upsun:httpaccess", Hidden: true}, {Name: "httpaccess", Hidden: true}, }, - Usage: "Update HTTP access settings for an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "access",}, - &console.StringFlag{Name: "auth",}, - &console.StringFlag{Name: "enabled",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Update HTTP access settings for an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "access"}, + &console.StringFlag{Name: "auth"}, + &console.StringFlag{Name: "enabled"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "info", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:info", Hidden: true}, {Name: "upsun:environment:info", Hidden: true}, }, - Usage: "Read or set properties for an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, - &console.BoolFlag{Name: "wait",}, + Usage: "Read or set properties for an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "refresh"}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "init", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:init", Hidden: true}, {Name: "upsun:environment:init", Hidden: true}, }, - Usage: "Initialize an environment from a public Git repository", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "profile",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Initialize an environment from a public Git repository", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "profile"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:list", Hidden: true}, {Name: "upsun:environment:list", Hidden: true}, {Name: "cloud:environments"}, @@ -927,79 +927,79 @@ var Commands = []*console.Command{ {Name: "upsun:env", Hidden: true}, {Name: "env", Hidden: true}, }, - Usage: "Get a list of environments", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-inactive", Aliases: []string{"I"},}, - &console.BoolFlag{Name: "pipe",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "refresh",}, - &console.BoolFlag{Name: "reverse",}, - &console.StringFlag{Name: "sort", DefaultValue: "title",}, - &console.StringFlag{Name: "status",}, - &console.StringFlag{Name: "type",}, + Usage: "Get a list of environments", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.BoolFlag{Name: "no-inactive", Aliases: []string{"I"}}, + &console.BoolFlag{Name: "pipe"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "refresh"}, + &console.BoolFlag{Name: "reverse"}, + &console.StringFlag{Name: "sort", DefaultValue: "title"}, + &console.StringFlag{Name: "status"}, + &console.StringFlag{Name: "type"}, }, }, { Category: "cloud:environment", Name: "logs", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:logs", Hidden: true}, {Name: "upsun:environment:logs", Hidden: true}, {Name: "cloud:log"}, {Name: "upsun:log", Hidden: true}, {Name: "log", Hidden: true}, }, - Usage: "Read an environment's logs", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.StringFlag{Name: "lines",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "tail",}, - &console.StringFlag{Name: "worker",}, + Usage: "Read an environment's logs", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"}}, + &console.StringFlag{Name: "lines"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "tail"}, + &console.StringFlag{Name: "worker"}, }, }, { Category: "cloud:environment", Name: "merge", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:merge", Hidden: true}, {Name: "upsun:environment:merge", Hidden: true}, {Name: "cloud:merge"}, {Name: "upsun:merge", Hidden: true}, {Name: "merge", Hidden: true}, }, - Usage: "Merge an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Merge an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "pause", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:pause", Hidden: true}, {Name: "upsun:environment:pause", Hidden: true}, }, - Usage: "Pause an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Pause an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "push", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:push", Hidden: true}, {Name: "upsun:environment:push", Hidden: true}, {Name: "cloud:push"}, @@ -1009,44 +1009,44 @@ var Commands = []*console.Command{ {Name: "cloud:deploy"}, {Name: "upsun:deploy", Hidden: true}, }, - Usage: "Push code to an environment", - Flags: []console.Flag{ - &console.BoolFlag{Name: "activate",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "force-with-lease",}, - &console.BoolFlag{Name: "no-clone-parent",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "parent",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "set-upstream", Aliases: []string{"u"},}, - &console.StringFlag{Name: "target",}, - &console.StringFlag{Name: "type",}, - &console.BoolFlag{Name: "wait",}, + Usage: "Push code to an environment", + Flags: []console.Flag{ + &console.BoolFlag{Name: "activate"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "force", Aliases: []string{"f"}}, + &console.BoolFlag{Name: "force-with-lease"}, + &console.BoolFlag{Name: "no-clone-parent"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "parent"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "set-upstream", Aliases: []string{"u"}}, + &console.StringFlag{Name: "target"}, + &console.StringFlag{Name: "type"}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "redeploy", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:redeploy", Hidden: true}, {Name: "upsun:environment:redeploy", Hidden: true}, {Name: "cloud:redeploy"}, {Name: "upsun:redeploy", Hidden: true}, {Name: "redeploy", Hidden: true}, }, - Usage: "Redeploy an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Redeploy an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "relationships", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:relationships", Hidden: true}, {Name: "upsun:environment:relationships", Hidden: true}, {Name: "cloud:relationships"}, @@ -1056,381 +1056,381 @@ var Commands = []*console.Command{ {Name: "upsun:rel", Hidden: true}, {Name: "rel", Hidden: true}, }, - Usage: "Show an environment's relationships", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, - &console.BoolFlag{Name: "refresh",}, + Usage: "Show an environment's relationships", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, + &console.BoolFlag{Name: "refresh"}, }, }, { Category: "cloud:environment", Name: "resume", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:resume", Hidden: true}, {Name: "upsun:environment:resume", Hidden: true}, }, - Usage: "Resume a paused environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Resume a paused environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "scp", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:scp", Hidden: true}, {Name: "upsun:environment:scp", Hidden: true}, {Name: "cloud:scp"}, {Name: "upsun:scp", Hidden: true}, {Name: "scp", Hidden: true}, }, - Usage: "Copy files to and from an environment using scp", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "recursive", Aliases: []string{"r"},}, - &console.StringFlag{Name: "worker",}, + Usage: "Copy files to and from an environment using scp", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "recursive", Aliases: []string{"r"}}, + &console.StringFlag{Name: "worker"}, }, }, { Category: "cloud:environment", Name: "set-remote", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:set-remote", Hidden: true}, {Name: "upsun:environment:set-remote", Hidden: true}, }, - Usage: "Set the remote environment to map to a branch", - Hidden: console.Hide, + Usage: "Set the remote environment to map to a branch", + Hidden: console.Hide, }, { Category: "cloud:environment", Name: "ssh", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:ssh", Hidden: true}, {Name: "upsun:environment:ssh", Hidden: true}, {Name: "cloud:ssh"}, {Name: "upsun:ssh", Hidden: true}, {Name: "ssh", Hidden: true}, }, - Usage: "SSH to the current environment", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all",}, - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.StringFlag{Name: "option", Aliases: []string{"o"},}, - &console.BoolFlag{Name: "pipe",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "worker",}, + Usage: "SSH to the current environment", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all"}, + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"}}, + &console.StringFlag{Name: "option", Aliases: []string{"o"}}, + &console.BoolFlag{Name: "pipe"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "worker"}, }, }, { Category: "cloud:environment", Name: "synchronize", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:synchronize", Hidden: true}, {Name: "upsun:environment:synchronize", Hidden: true}, {Name: "cloud:sync"}, {Name: "upsun:sync", Hidden: true}, {Name: "sync", Hidden: true}, }, - Usage: "Synchronize an environment's code and/or data from its parent", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "rebase",}, - &console.BoolFlag{Name: "wait",}, + Usage: "Synchronize an environment's code and/or data from its parent", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "rebase"}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:environment", Name: "url", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:url", Hidden: true}, {Name: "upsun:environment:url", Hidden: true}, {Name: "cloud:url"}, {Name: "upsun:url", Hidden: true}, {Name: "url", Hidden: true}, }, - Usage: "Get the public URLs of an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "browser",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "pipe",}, - &console.BoolFlag{Name: "primary", Aliases: []string{"1"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Get the public URLs of an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "browser"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "pipe"}, + &console.BoolFlag{Name: "primary", Aliases: []string{"1"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:environment", Name: "xdebug", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "environment:xdebug", Hidden: true}, {Name: "upsun:environment:xdebug", Hidden: true}, {Name: "cloud:xdebug"}, {Name: "upsun:xdebug", Hidden: true}, {Name: "xdebug", Hidden: true}, }, - Usage: "Open a tunnel to Xdebug on the environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.StringFlag{Name: "port",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "worker",}, + Usage: "Open a tunnel to Xdebug on the environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"}}, + &console.StringFlag{Name: "port"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "worker"}, }, }, { Category: "cloud:integration", Name: "activity:get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "integration:activity:get", Hidden: true}, {Name: "upsun:integration:activity:get", Hidden: true}, }, - Usage: "View detailed information on a single integration activity", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + Usage: "View detailed information on a single integration activity", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, }, }, { Category: "cloud:integration", Name: "activity:list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "integration:activity:list", Hidden: true}, {Name: "upsun:integration:activity:list", Hidden: true}, {Name: "cloud:integration:activities"}, {Name: "upsun:integration:activities", Hidden: true}, {Name: "integration:activities", Hidden: true}, }, - Usage: "Get a list of activities for an integration", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"},}, - &console.StringFlag{Name: "limit",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "result",}, - &console.StringFlag{Name: "start",}, - &console.StringFlag{Name: "state",}, - &console.StringFlag{Name: "type",}, + Usage: "Get a list of activities for an integration", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "exclude-type", Aliases: []string{"x"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "incomplete", Aliases: []string{"i"}}, + &console.StringFlag{Name: "limit"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "result"}, + &console.StringFlag{Name: "start"}, + &console.StringFlag{Name: "state"}, + &console.StringFlag{Name: "type"}, }, }, { Category: "cloud:integration", Name: "activity:log", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "integration:activity:log", Hidden: true}, {Name: "upsun:integration:activity:log", Hidden: true}, }, - Usage: "Display the log for an integration activity", - Flags: []console.Flag{ - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "timestamps", Aliases: []string{"t"},}, + Usage: "Display the log for an integration activity", + Flags: []console.Flag{ + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "timestamps", Aliases: []string{"t"}}, }, }, { Category: "cloud:integration", Name: "add", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "integration:add", Hidden: true}, {Name: "upsun:integration:add", Hidden: true}, }, - Usage: "Add an integration to the project", - Flags: []console.Flag{ - &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix",}, - &console.StringFlag{Name: "auth-token",}, - &console.StringFlag{Name: "base-url",}, - &console.StringFlag{Name: "bitbucket-url",}, - &console.BoolFlag{Name: "build-draft-pull-requests", DefaultValue: true,}, - &console.BoolFlag{Name: "build-merge-requests", DefaultValue: true,}, - &console.BoolFlag{Name: "build-pull-requests", DefaultValue: true,}, - &console.BoolFlag{Name: "build-pull-requests-post-merge",}, - &console.BoolFlag{Name: "build-wip-merge-requests", DefaultValue: true,}, - &console.StringFlag{Name: "category",}, - &console.StringFlag{Name: "channel",}, - &console.StringFlag{Name: "environments",}, - &console.StringFlag{Name: "events",}, - &console.StringFlag{Name: "excluded-environments",}, - &console.StringFlag{Name: "facility",}, - &console.BoolFlag{Name: "fetch-branches", DefaultValue: true,}, - &console.StringFlag{Name: "file",}, - &console.StringFlag{Name: "from-address",}, - &console.StringFlag{Name: "header",}, - &console.StringFlag{Name: "index",}, - &console.StringFlag{Name: "key",}, - &console.StringFlag{Name: "license-key",}, - &console.BoolFlag{Name: "merge-requests-clone-parent-data", DefaultValue: true,}, - &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "protocol", DefaultValue: "tls",}, - &console.BoolFlag{Name: "prune-branches", DefaultValue: true,}, - &console.BoolFlag{Name: "pull-requests-clone-parent-data", DefaultValue: true,}, - &console.StringFlag{Name: "recipients",}, - &console.StringFlag{Name: "repository",}, - &console.StringFlag{Name: "resources-init", DefaultValue: "parent",}, - &console.BoolFlag{Name: "resync-pull-requests",}, - &console.StringFlag{Name: "routing-key",}, - &console.StringFlag{Name: "secret",}, - &console.StringFlag{Name: "server-project",}, - &console.StringFlag{Name: "shared-key",}, - &console.StringFlag{Name: "sourcetype",}, - &console.StringFlag{Name: "states",}, - &console.StringFlag{Name: "syslog-host",}, - &console.StringFlag{Name: "syslog-port",}, - &console.StringFlag{Name: "token",}, - &console.StringFlag{Name: "type",}, - &console.StringFlag{Name: "url",}, - &console.StringFlag{Name: "username",}, - &console.BoolFlag{Name: "verify-tls", DefaultValue: true,}, - &console.BoolFlag{Name: "wait",}, + Usage: "Add an integration to the project", + Flags: []console.Flag{ + &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix"}, + &console.StringFlag{Name: "auth-token"}, + &console.StringFlag{Name: "base-url"}, + &console.StringFlag{Name: "bitbucket-url"}, + &console.BoolFlag{Name: "build-draft-pull-requests", DefaultValue: true}, + &console.BoolFlag{Name: "build-merge-requests", DefaultValue: true}, + &console.BoolFlag{Name: "build-pull-requests", DefaultValue: true}, + &console.BoolFlag{Name: "build-pull-requests-post-merge"}, + &console.BoolFlag{Name: "build-wip-merge-requests", DefaultValue: true}, + &console.StringFlag{Name: "category"}, + &console.StringFlag{Name: "channel"}, + &console.StringFlag{Name: "environments"}, + &console.StringFlag{Name: "events"}, + &console.StringFlag{Name: "excluded-environments"}, + &console.StringFlag{Name: "facility"}, + &console.BoolFlag{Name: "fetch-branches", DefaultValue: true}, + &console.StringFlag{Name: "file"}, + &console.StringFlag{Name: "from-address"}, + &console.StringFlag{Name: "header"}, + &console.StringFlag{Name: "index"}, + &console.StringFlag{Name: "key"}, + &console.StringFlag{Name: "license-key"}, + &console.BoolFlag{Name: "merge-requests-clone-parent-data", DefaultValue: true}, + &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "protocol", DefaultValue: "tls"}, + &console.BoolFlag{Name: "prune-branches", DefaultValue: true}, + &console.BoolFlag{Name: "pull-requests-clone-parent-data", DefaultValue: true}, + &console.StringFlag{Name: "recipients"}, + &console.StringFlag{Name: "repository"}, + &console.StringFlag{Name: "resources-init", DefaultValue: "parent"}, + &console.BoolFlag{Name: "resync-pull-requests"}, + &console.StringFlag{Name: "routing-key"}, + &console.StringFlag{Name: "secret"}, + &console.StringFlag{Name: "server-project"}, + &console.StringFlag{Name: "shared-key"}, + &console.StringFlag{Name: "sourcetype"}, + &console.StringFlag{Name: "states"}, + &console.StringFlag{Name: "syslog-host"}, + &console.StringFlag{Name: "syslog-port"}, + &console.StringFlag{Name: "token"}, + &console.StringFlag{Name: "type"}, + &console.StringFlag{Name: "url"}, + &console.StringFlag{Name: "username"}, + &console.BoolFlag{Name: "verify-tls", DefaultValue: true}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:integration", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "integration:delete", Hidden: true}, {Name: "upsun:integration:delete", Hidden: true}, }, - Usage: "Delete an integration from a project", - Flags: []console.Flag{ - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Delete an integration from a project", + Flags: []console.Flag{ + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:integration", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "integration:get", Hidden: true}, {Name: "upsun:integration:get", Hidden: true}, }, - Usage: "View details of an integration", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + Usage: "View details of an integration", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, }, }, { Category: "cloud:integration", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "integration:list", Hidden: true}, {Name: "upsun:integration:list", Hidden: true}, {Name: "cloud:integrations"}, {Name: "upsun:integrations", Hidden: true}, {Name: "integrations", Hidden: true}, }, - Usage: "View a list of project integration(s)", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "type", Aliases: []string{"t"},}, + Usage: "View a list of project integration(s)", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "type", Aliases: []string{"t"}}, }, }, { Category: "cloud:integration", Name: "update", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "integration:update", Hidden: true}, {Name: "upsun:integration:update", Hidden: true}, }, - Usage: "Update an integration", - Flags: []console.Flag{ - &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix",}, - &console.StringFlag{Name: "auth-token",}, - &console.StringFlag{Name: "base-url",}, - &console.StringFlag{Name: "bitbucket-url",}, - &console.BoolFlag{Name: "build-draft-pull-requests", DefaultValue: true,}, - &console.BoolFlag{Name: "build-merge-requests", DefaultValue: true,}, - &console.BoolFlag{Name: "build-pull-requests", DefaultValue: true,}, - &console.BoolFlag{Name: "build-pull-requests-post-merge",}, - &console.BoolFlag{Name: "build-wip-merge-requests", DefaultValue: true,}, - &console.StringFlag{Name: "category",}, - &console.StringFlag{Name: "channel",}, - &console.StringFlag{Name: "environments",}, - &console.StringFlag{Name: "events",}, - &console.StringFlag{Name: "excluded-environments",}, - &console.StringFlag{Name: "facility",}, - &console.BoolFlag{Name: "fetch-branches", DefaultValue: true,}, - &console.StringFlag{Name: "file",}, - &console.StringFlag{Name: "from-address",}, - &console.StringFlag{Name: "header",}, - &console.StringFlag{Name: "index",}, - &console.StringFlag{Name: "key",}, - &console.StringFlag{Name: "license-key",}, - &console.BoolFlag{Name: "merge-requests-clone-parent-data", DefaultValue: true,}, - &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "protocol", DefaultValue: "tls",}, - &console.BoolFlag{Name: "prune-branches", DefaultValue: true,}, - &console.BoolFlag{Name: "pull-requests-clone-parent-data", DefaultValue: true,}, - &console.StringFlag{Name: "recipients",}, - &console.StringFlag{Name: "repository",}, - &console.StringFlag{Name: "resources-init", DefaultValue: "parent",}, - &console.BoolFlag{Name: "resync-pull-requests",}, - &console.StringFlag{Name: "routing-key",}, - &console.StringFlag{Name: "secret",}, - &console.StringFlag{Name: "server-project",}, - &console.StringFlag{Name: "shared-key",}, - &console.StringFlag{Name: "sourcetype",}, - &console.StringFlag{Name: "states",}, - &console.StringFlag{Name: "syslog-host",}, - &console.StringFlag{Name: "syslog-port",}, - &console.StringFlag{Name: "token",}, - &console.StringFlag{Name: "type",}, - &console.StringFlag{Name: "url",}, - &console.StringFlag{Name: "username",}, - &console.BoolFlag{Name: "verify-tls", DefaultValue: true,}, - &console.BoolFlag{Name: "wait",}, + Usage: "Update an integration", + Flags: []console.Flag{ + &console.StringFlag{Name: "auth-mode", DefaultValue: "prefix"}, + &console.StringFlag{Name: "auth-token"}, + &console.StringFlag{Name: "base-url"}, + &console.StringFlag{Name: "bitbucket-url"}, + &console.BoolFlag{Name: "build-draft-pull-requests", DefaultValue: true}, + &console.BoolFlag{Name: "build-merge-requests", DefaultValue: true}, + &console.BoolFlag{Name: "build-pull-requests", DefaultValue: true}, + &console.BoolFlag{Name: "build-pull-requests-post-merge"}, + &console.BoolFlag{Name: "build-wip-merge-requests", DefaultValue: true}, + &console.StringFlag{Name: "category"}, + &console.StringFlag{Name: "channel"}, + &console.StringFlag{Name: "environments"}, + &console.StringFlag{Name: "events"}, + &console.StringFlag{Name: "excluded-environments"}, + &console.StringFlag{Name: "facility"}, + &console.BoolFlag{Name: "fetch-branches", DefaultValue: true}, + &console.StringFlag{Name: "file"}, + &console.StringFlag{Name: "from-address"}, + &console.StringFlag{Name: "header"}, + &console.StringFlag{Name: "index"}, + &console.StringFlag{Name: "key"}, + &console.StringFlag{Name: "license-key"}, + &console.BoolFlag{Name: "merge-requests-clone-parent-data", DefaultValue: true}, + &console.StringFlag{Name: "message-format", DefaultValue: "rfc5424"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "protocol", DefaultValue: "tls"}, + &console.BoolFlag{Name: "prune-branches", DefaultValue: true}, + &console.BoolFlag{Name: "pull-requests-clone-parent-data", DefaultValue: true}, + &console.StringFlag{Name: "recipients"}, + &console.StringFlag{Name: "repository"}, + &console.StringFlag{Name: "resources-init", DefaultValue: "parent"}, + &console.BoolFlag{Name: "resync-pull-requests"}, + &console.StringFlag{Name: "routing-key"}, + &console.StringFlag{Name: "secret"}, + &console.StringFlag{Name: "server-project"}, + &console.StringFlag{Name: "shared-key"}, + &console.StringFlag{Name: "sourcetype"}, + &console.StringFlag{Name: "states"}, + &console.StringFlag{Name: "syslog-host"}, + &console.StringFlag{Name: "syslog-port"}, + &console.StringFlag{Name: "token"}, + &console.StringFlag{Name: "type"}, + &console.StringFlag{Name: "url"}, + &console.StringFlag{Name: "username"}, + &console.BoolFlag{Name: "verify-tls", DefaultValue: true}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:integration", Name: "validate", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "integration:validate", Hidden: true}, {Name: "upsun:integration:validate", Hidden: true}, }, - Usage: "Validate an existing integration", - Flags: []console.Flag{ - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Validate an existing integration", + Flags: []console.Flag{ + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:metrics", Name: "all", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "metrics:all", Hidden: true}, {Name: "upsun:metrics:all", Hidden: true}, {Name: "cloud:metrics"}, @@ -1440,104 +1440,104 @@ var Commands = []*console.Command{ {Name: "upsun:met", Hidden: true}, {Name: "met", Hidden: true}, }, - Usage: "Show CPU, disk and memory metrics for an environment", - Flags: []console.Flag{ - &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "range", Aliases: []string{"r"},}, - &console.StringFlag{Name: "service", Aliases: []string{"s"},}, - &console.StringFlag{Name: "to",}, - &console.StringFlag{Name: "type",}, + Usage: "Show CPU, disk and memory metrics for an environment", + Flags: []console.Flag{ + &console.BoolFlag{Name: "bytes", Aliases: []string{"B"}}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.StringFlag{Name: "interval", Aliases: []string{"i"}}, + &console.BoolFlag{Name: "latest", Aliases: []string{"1"}}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "range", Aliases: []string{"r"}}, + &console.StringFlag{Name: "service", Aliases: []string{"s"}}, + &console.StringFlag{Name: "to"}, + &console.StringFlag{Name: "type"}, }, }, { Category: "cloud:metrics", Name: "cpu", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "metrics:cpu", Hidden: true}, {Name: "upsun:metrics:cpu", Hidden: true}, {Name: "cloud:cpu"}, {Name: "upsun:cpu", Hidden: true}, {Name: "cpu", Hidden: true}, }, - Usage: "Show CPU usage of an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "range", Aliases: []string{"r"},}, - &console.StringFlag{Name: "service", Aliases: []string{"s"},}, - &console.StringFlag{Name: "to",}, - &console.StringFlag{Name: "type",}, + Usage: "Show CPU usage of an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.StringFlag{Name: "interval", Aliases: []string{"i"}}, + &console.BoolFlag{Name: "latest", Aliases: []string{"1"}}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "range", Aliases: []string{"r"}}, + &console.StringFlag{Name: "service", Aliases: []string{"s"}}, + &console.StringFlag{Name: "to"}, + &console.StringFlag{Name: "type"}, }, }, { Category: "cloud:metrics", Name: "curl", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "metrics:curl", Hidden: true}, {Name: "upsun:metrics:curl", Hidden: true}, }, - Usage: "Run an authenticated cURL request on an environment's metrics API", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "data", Aliases: []string{"d"},}, - &console.BoolFlag{Name: "disable-compression",}, - &console.BoolFlag{Name: "enable-glob",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, - &console.StringFlag{Name: "header", Aliases: []string{"H"},}, - &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, - &console.StringFlag{Name: "json",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + Usage: "Run an authenticated cURL request on an environment's metrics API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"}}, + &console.BoolFlag{Name: "disable-compression"}, + &console.BoolFlag{Name: "enable-glob"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"}}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"}}, + &console.StringFlag{Name: "header", Aliases: []string{"H"}}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"}}, + &console.StringFlag{Name: "json"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "request", Aliases: []string{"X"}}, }, }, { Category: "cloud:metrics", Name: "disk-usage", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "metrics:disk-usage", Hidden: true}, {Name: "upsun:metrics:disk-usage", Hidden: true}, {Name: "cloud:disk"}, {Name: "upsun:disk", Hidden: true}, {Name: "disk", Hidden: true}, }, - Usage: "Show disk usage of an environment", - Flags: []console.Flag{ - &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "range", Aliases: []string{"r"},}, - &console.StringFlag{Name: "service", Aliases: []string{"s"},}, - &console.BoolFlag{Name: "tmp",}, - &console.StringFlag{Name: "to",}, - &console.StringFlag{Name: "type",}, + Usage: "Show disk usage of an environment", + Flags: []console.Flag{ + &console.BoolFlag{Name: "bytes", Aliases: []string{"B"}}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.StringFlag{Name: "interval", Aliases: []string{"i"}}, + &console.BoolFlag{Name: "latest", Aliases: []string{"1"}}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "range", Aliases: []string{"r"}}, + &console.StringFlag{Name: "service", Aliases: []string{"s"}}, + &console.BoolFlag{Name: "tmp"}, + &console.StringFlag{Name: "to"}, + &console.StringFlag{Name: "type"}, }, }, { Category: "cloud:metrics", Name: "memory", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "metrics:memory", Hidden: true}, {Name: "upsun:metrics:memory", Hidden: true}, {Name: "cloud:mem"}, @@ -1547,238 +1547,238 @@ var Commands = []*console.Command{ {Name: "upsun:memory", Hidden: true}, {Name: "memory", Hidden: true}, }, - Usage: "Show memory usage of an environment", - Flags: []console.Flag{ - &console.BoolFlag{Name: "bytes", Aliases: []string{"B"},}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "interval", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "latest", Aliases: []string{"1"},}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "range", Aliases: []string{"r"},}, - &console.StringFlag{Name: "service", Aliases: []string{"s"},}, - &console.StringFlag{Name: "to",}, - &console.StringFlag{Name: "type",}, + Usage: "Show memory usage of an environment", + Flags: []console.Flag{ + &console.BoolFlag{Name: "bytes", Aliases: []string{"B"}}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.StringFlag{Name: "interval", Aliases: []string{"i"}}, + &console.BoolFlag{Name: "latest", Aliases: []string{"1"}}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "range", Aliases: []string{"r"}}, + &console.StringFlag{Name: "service", Aliases: []string{"s"}}, + &console.StringFlag{Name: "to"}, + &console.StringFlag{Name: "type"}, }, }, { Category: "cloud:mount", Name: "download", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "mount:download", Hidden: true}, {Name: "upsun:mount:download", Hidden: true}, }, - Usage: "Download files from a mount, using rsync", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.BoolFlag{Name: "delete",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude",}, - &console.StringFlag{Name: "include",}, - &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.StringFlag{Name: "mount", Aliases: []string{"m"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, - &console.BoolFlag{Name: "source-path",}, - &console.StringFlag{Name: "target",}, - &console.StringFlag{Name: "worker",}, + Usage: "Download files from a mount, using rsync", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all", Aliases: []string{"a"}}, + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.BoolFlag{Name: "delete"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "exclude"}, + &console.StringFlag{Name: "include"}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"}}, + &console.StringFlag{Name: "mount", Aliases: []string{"m"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "refresh"}, + &console.BoolFlag{Name: "source-path"}, + &console.StringFlag{Name: "target"}, + &console.StringFlag{Name: "worker"}, }, }, { Category: "cloud:mount", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "mount:list", Hidden: true}, {Name: "upsun:mount:list", Hidden: true}, {Name: "cloud:mounts"}, {Name: "upsun:mounts", Hidden: true}, {Name: "mounts", Hidden: true}, }, - Usage: "Get a list of mounts", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "paths",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, - &console.StringFlag{Name: "worker",}, + Usage: "Get a list of mounts", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"}}, + &console.BoolFlag{Name: "no-header"}, + &console.BoolFlag{Name: "paths"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "refresh"}, + &console.StringFlag{Name: "worker"}, }, }, { Category: "cloud:mount", Name: "upload", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "mount:upload", Hidden: true}, {Name: "upsun:mount:upload", Hidden: true}, }, - Usage: "Upload files to a mount, using rsync", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.BoolFlag{Name: "delete",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "exclude",}, - &console.StringFlag{Name: "include",}, - &console.StringFlag{Name: "instance", Aliases: []string{"I"},}, - &console.StringFlag{Name: "mount", Aliases: []string{"m"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, - &console.StringFlag{Name: "source",}, - &console.StringFlag{Name: "worker",}, + Usage: "Upload files to a mount, using rsync", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.BoolFlag{Name: "delete"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "exclude"}, + &console.StringFlag{Name: "include"}, + &console.StringFlag{Name: "instance", Aliases: []string{"I"}}, + &console.StringFlag{Name: "mount", Aliases: []string{"m"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "refresh"}, + &console.StringFlag{Name: "source"}, + &console.StringFlag{Name: "worker"}, }, }, { Category: "cloud:operation", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "operation:list", Hidden: true}, {Name: "upsun:operation:list", Hidden: true}, {Name: "cloud:ops"}, {Name: "upsun:ops", Hidden: true}, {Name: "ops", Hidden: true}, }, - Usage: "List runtime operations on an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "full",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "worker",}, + Usage: "List runtime operations on an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "full"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "worker"}, }, }, { Category: "cloud:operation", Name: "run", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "operation:run", Hidden: true}, {Name: "upsun:operation:run", Hidden: true}, }, - Usage: "Run an operation on the environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, - &console.StringFlag{Name: "worker",}, + Usage: "Run an operation on the environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, + &console.StringFlag{Name: "worker"}, }, }, { Category: "cloud:organization", Name: "billing:address", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:billing:address", Hidden: true}, {Name: "upsun:organization:billing:address", Hidden: true}, }, - Usage: "View or change an organization's billing address", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "View or change an organization's billing address", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:organization", Name: "billing:profile", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:billing:profile", Hidden: true}, {Name: "upsun:organization:billing:profile", Hidden: true}, }, - Usage: "View or change an organization's billing profile", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "View or change an organization's billing profile", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:organization", Name: "create", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:create", Hidden: true}, {Name: "upsun:organization:create", Hidden: true}, }, - Usage: "Create a new organization", - Flags: []console.Flag{ - &console.StringFlag{Name: "country",}, - &console.StringFlag{Name: "label",}, - &console.StringFlag{Name: "name",}, + Usage: "Create a new organization", + Flags: []console.Flag{ + &console.StringFlag{Name: "country"}, + &console.StringFlag{Name: "label"}, + &console.StringFlag{Name: "name"}, }, }, { Category: "cloud:organization", Name: "curl", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:curl", Hidden: true}, {Name: "upsun:organization:curl", Hidden: true}, }, - Usage: "Run an authenticated cURL request on an organization's API", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "data", Aliases: []string{"d"},}, - &console.BoolFlag{Name: "disable-compression",}, - &console.BoolFlag{Name: "enable-glob",}, - &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, - &console.StringFlag{Name: "header", Aliases: []string{"H"},}, - &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, - &console.StringFlag{Name: "json",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + Usage: "Run an authenticated cURL request on an organization's API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"}}, + &console.BoolFlag{Name: "disable-compression"}, + &console.BoolFlag{Name: "enable-glob"}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"}}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"}}, + &console.StringFlag{Name: "header", Aliases: []string{"H"}}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"}}, + &console.StringFlag{Name: "json"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "request", Aliases: []string{"X"}}, }, }, { Category: "cloud:organization", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:delete", Hidden: true}, {Name: "upsun:organization:delete", Hidden: true}, }, - Usage: "Delete an organization", - Flags: []console.Flag{ - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Delete an organization", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:organization", Name: "info", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:info", Hidden: true}, {Name: "upsun:organization:info", Hidden: true}, }, - Usage: "View or change organization details", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, + Usage: "View or change organization details", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "refresh"}, }, }, { Category: "cloud:organization", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:list", Hidden: true}, {Name: "upsun:organization:list", Hidden: true}, {Name: "cloud:orgs"}, @@ -1788,245 +1788,245 @@ var Commands = []*console.Command{ {Name: "upsun:organizations", Hidden: true}, {Name: "organizations", Hidden: true}, }, - Usage: "List organizations", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "my",}, - &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "reverse",}, - &console.StringFlag{Name: "sort",}, + Usage: "List organizations", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "my"}, + &console.BoolFlag{Name: "no-header"}, + &console.BoolFlag{Name: "reverse"}, + &console.StringFlag{Name: "sort"}, }, }, { Category: "cloud:organization", Name: "subscription:list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:subscription:list", Hidden: true}, {Name: "upsun:organization:subscription:list", Hidden: true}, {Name: "cloud:org:subs"}, {Name: "upsun:org:subs", Hidden: true}, {Name: "org:subs", Hidden: true}, }, - Usage: "List subscriptions within an organization", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, - &console.StringFlag{Name: "count", Aliases: []string{"c"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "page",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "List subscriptions within an organization", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns"}, + &console.StringFlag{Name: "count", Aliases: []string{"c"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "page"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:organization", Name: "user:add", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:user:add", Hidden: true}, {Name: "upsun:organization:user:add", Hidden: true}, }, - Usage: "Invite a user to an organization", - Flags: []console.Flag{ - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "permission",}, + Usage: "Invite a user to an organization", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "permission"}, }, }, { Category: "cloud:organization", Name: "user:delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:user:delete", Hidden: true}, {Name: "upsun:organization:user:delete", Hidden: true}, }, - Usage: "Remove a user from an organization", - Flags: []console.Flag{ - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + Usage: "Remove a user from an organization", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, }, }, { Category: "cloud:organization", Name: "user:get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:user:get", Hidden: true}, {Name: "upsun:organization:user:get", Hidden: true}, }, - Usage: "View an organization user", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + Usage: "View an organization user", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, }, }, { Category: "cloud:organization", Name: "user:list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:user:list", Hidden: true}, {Name: "upsun:organization:user:list", Hidden: true}, {Name: "cloud:org:users"}, {Name: "upsun:org:users", Hidden: true}, {Name: "org:users", Hidden: true}, }, - Usage: "List organization users", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, - &console.StringFlag{Name: "count", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.BoolFlag{Name: "reverse",}, - &console.StringFlag{Name: "sort", DefaultValue: "created_at",}, + Usage: "List organization users", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns"}, + &console.StringFlag{Name: "count", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.BoolFlag{Name: "reverse"}, + &console.StringFlag{Name: "sort", DefaultValue: "created_at"}, }, }, { Category: "cloud:organization", Name: "user:projects", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:user:projects", Hidden: true}, {Name: "upsun:organization:user:projects", Hidden: true}, {Name: "cloud:oups"}, {Name: "upsun:oups", Hidden: true}, {Name: "oups", Hidden: true}, }, - Usage: "List the projects a user can access", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "list-all",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, + Usage: "List the projects a user can access", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "list-all"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, }, }, { Category: "cloud:organization", Name: "user:update", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "organization:user:update", Hidden: true}, {Name: "upsun:organization:user:update", Hidden: true}, }, - Usage: "Update an organization user", - Flags: []console.Flag{ - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "permission",}, + Usage: "Update an organization user", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "permission"}, }, }, { Category: "cloud:project", Name: "clear-build-cache", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "project:clear-build-cache", Hidden: true}, {Name: "upsun:project:clear-build-cache", Hidden: true}, }, - Usage: "Clear a project's build cache", - Flags: []console.Flag{ - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Clear a project's build cache", + Flags: []console.Flag{ + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:project", Name: "create", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "project:create", Hidden: true}, {Name: "upsun:project:create", Hidden: true}, {Name: "cloud:create"}, {Name: "upsun:create", Hidden: true}, {Name: "create", Hidden: true}, }, - Usage: "Create a new project", - Flags: []console.Flag{ - &console.StringFlag{Name: "default-branch", DefaultValue: "main",}, - &console.StringFlag{Name: "environments",}, - &console.StringFlag{Name: "init-repo",}, - &console.BoolFlag{Name: "no-set-remote",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "plan",}, - &console.StringFlag{Name: "region",}, - &console.BoolFlag{Name: "set-remote",}, - &console.StringFlag{Name: "storage",}, - &console.StringFlag{Name: "title", DefaultValue: "Untitled Project",}, + Usage: "Create a new project", + Flags: []console.Flag{ + &console.StringFlag{Name: "default-branch", DefaultValue: "main"}, + &console.StringFlag{Name: "environments"}, + &console.StringFlag{Name: "init-repo"}, + &console.BoolFlag{Name: "no-set-remote"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "plan"}, + &console.StringFlag{Name: "region"}, + &console.BoolFlag{Name: "set-remote"}, + &console.StringFlag{Name: "storage"}, + &console.StringFlag{Name: "title", DefaultValue: "Untitled Project"}, }, }, { Category: "cloud:project", Name: "curl", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "project:curl", Hidden: true}, {Name: "upsun:project:curl", Hidden: true}, }, - Usage: "Run an authenticated cURL request on a project's API", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "data", Aliases: []string{"d"},}, - &console.BoolFlag{Name: "disable-compression",}, - &console.BoolFlag{Name: "enable-glob",}, - &console.BoolFlag{Name: "fail", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "head", Aliases: []string{"I"},}, - &console.StringFlag{Name: "header", Aliases: []string{"H"},}, - &console.BoolFlag{Name: "include", Aliases: []string{"i"},}, - &console.StringFlag{Name: "json",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "request", Aliases: []string{"X"},}, + Usage: "Run an authenticated cURL request on a project's API", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "data", Aliases: []string{"d"}}, + &console.BoolFlag{Name: "disable-compression"}, + &console.BoolFlag{Name: "enable-glob"}, + &console.BoolFlag{Name: "fail", Aliases: []string{"f"}}, + &console.BoolFlag{Name: "head", Aliases: []string{"I"}}, + &console.StringFlag{Name: "header", Aliases: []string{"H"}}, + &console.BoolFlag{Name: "include", Aliases: []string{"i"}}, + &console.StringFlag{Name: "json"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "request", Aliases: []string{"X"}}, }, }, { Category: "cloud:project", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "project:delete", Hidden: true}, {Name: "upsun:project:delete", Hidden: true}, }, - Usage: "Delete a project", - Flags: []console.Flag{ - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Delete a project", + Flags: []console.Flag{ + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:project", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "project:get", Hidden: true}, {Name: "upsun:project:get", Hidden: true}, {Name: "cloud:get"}, {Name: "upsun:get", Hidden: true}, {Name: "get", Hidden: true}, }, - Usage: "Clone a project locally", - Flags: []console.Flag{ - &console.BoolFlag{Name: "build",}, - &console.StringFlag{Name: "depth",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Clone a project locally", + Flags: []console.Flag{ + &console.BoolFlag{Name: "build"}, + &console.StringFlag{Name: "depth"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:project", Name: "info", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "project:info", Hidden: true}, {Name: "upsun:project:info", Hidden: true}, }, - Usage: "Read or set properties for a project", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, - &console.BoolFlag{Name: "wait",}, + Usage: "Read or set properties for a project", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "refresh"}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:project", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "project:list", Hidden: true}, {Name: "upsun:project:list", Hidden: true}, {Name: "cloud:projects"}, @@ -2036,88 +2036,88 @@ var Commands = []*console.Command{ {Name: "upsun:pro", Hidden: true}, {Name: "pro", Hidden: true}, }, - Usage: "Get a list of all active projects", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, - &console.StringFlag{Name: "count", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "my",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "page",}, - &console.BoolFlag{Name: "pipe",}, - &console.StringFlag{Name: "refresh",}, - &console.StringFlag{Name: "region",}, - &console.BoolFlag{Name: "reverse",}, - &console.StringFlag{Name: "sort", DefaultValue: "title",}, - &console.StringFlag{Name: "title",}, + Usage: "Get a list of all active projects", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns"}, + &console.StringFlag{Name: "count", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "my"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "page"}, + &console.BoolFlag{Name: "pipe"}, + &console.StringFlag{Name: "refresh"}, + &console.StringFlag{Name: "region"}, + &console.BoolFlag{Name: "reverse"}, + &console.StringFlag{Name: "sort", DefaultValue: "title"}, + &console.StringFlag{Name: "title"}, }, }, { Category: "cloud:project", Name: "set-remote", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "project:set-remote", Hidden: true}, {Name: "upsun:project:set-remote", Hidden: true}, {Name: "cloud:set-remote"}, {Name: "upsun:set-remote", Hidden: true}, {Name: "set-remote", Hidden: true}, }, - Usage: "Set the remote project for the current Git repository", + Usage: "Set the remote project for the current Git repository", }, { Category: "cloud:repo", Name: "cat", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "repo:cat", Hidden: true}, {Name: "upsun:repo:cat", Hidden: true}, }, - Usage: "Read a file in the project repository", - Flags: []console.Flag{ - &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Read a file in the project repository", + Flags: []console.Flag{ + &console.StringFlag{Name: "commit", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:repo", Name: "ls", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "repo:ls", Hidden: true}, {Name: "upsun:repo:ls", Hidden: true}, }, - Usage: "List files in the project repository", - Flags: []console.Flag{ - &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, - &console.BoolFlag{Name: "directories", Aliases: []string{"d"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "files", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "git-style",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "List files in the project repository", + Flags: []console.Flag{ + &console.StringFlag{Name: "commit", Aliases: []string{"c"}}, + &console.BoolFlag{Name: "directories", Aliases: []string{"d"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "files", Aliases: []string{"f"}}, + &console.BoolFlag{Name: "git-style"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:repo", Name: "read", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "repo:read", Hidden: true}, {Name: "upsun:repo:read", Hidden: true}, {Name: "cloud:read"}, {Name: "upsun:read", Hidden: true}, {Name: "read", Hidden: true}, }, - Usage: "Read a directory or file in the project repository", - Flags: []console.Flag{ - &console.StringFlag{Name: "commit", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Read a directory or file in the project repository", + Flags: []console.Flag{ + &console.StringFlag{Name: "commit", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:resources", Name: "build:get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "resources:build:get", Hidden: true}, {Name: "upsun:resources:build:get", Hidden: true}, {Name: "cloud:build-resources:get"}, @@ -2127,36 +2127,36 @@ var Commands = []*console.Command{ {Name: "upsun:build-resources", Hidden: true}, {Name: "build-resources", Hidden: true}, }, - Usage: "View the build resources of a project", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "View the build resources of a project", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:resources", Name: "build:set", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "resources:build:set", Hidden: true}, {Name: "upsun:resources:build:set", Hidden: true}, {Name: "cloud:build-resources:set"}, {Name: "upsun:build-resources:set", Hidden: true}, {Name: "build-resources:set", Hidden: true}, }, - Usage: "Set the build resources of a project", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "cpu",}, - &console.StringFlag{Name: "memory",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Set the build resources of a project", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "cpu"}, + &console.StringFlag{Name: "memory"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:resources", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "resources:get", Hidden: true}, {Name: "upsun:resources:get", Hidden: true}, {Name: "cloud:resources"}, @@ -2166,465 +2166,465 @@ var Commands = []*console.Command{ {Name: "upsun:res", Hidden: true}, {Name: "res", Hidden: true}, }, - Usage: "View the resources of apps and services on an environment", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "app",}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "service", Aliases: []string{"s"},}, - &console.StringFlag{Name: "type",}, - &console.StringFlag{Name: "worker",}, + Usage: "View the resources of apps and services on an environment", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "app"}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "service", Aliases: []string{"s"}}, + &console.StringFlag{Name: "type"}, + &console.StringFlag{Name: "worker"}, }, }, { Category: "cloud:resources", Name: "set", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "resources:set", Hidden: true}, {Name: "upsun:resources:set", Hidden: true}, }, - Usage: "Set the resources of apps and services on an environment", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "count", Aliases: []string{"C"},}, - &console.StringFlag{Name: "disk", Aliases: []string{"D"},}, - &console.BoolFlag{Name: "dry-run",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "force", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "size", Aliases: []string{"S"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Set the resources of apps and services on an environment", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "count", Aliases: []string{"C"}}, + &console.StringFlag{Name: "disk", Aliases: []string{"D"}}, + &console.BoolFlag{Name: "dry-run"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "force", Aliases: []string{"f"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "size", Aliases: []string{"S"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:resources", Name: "size:list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "resources:size:list", Hidden: true}, {Name: "upsun:resources:size:list", Hidden: true}, {Name: "cloud:resources:sizes"}, {Name: "upsun:resources:sizes", Hidden: true}, {Name: "resources:sizes", Hidden: true}, }, - Usage: "List container profile sizes", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "profile",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "service", Aliases: []string{"s"},}, + Usage: "List container profile sizes", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "profile"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "service", Aliases: []string{"s"}}, }, }, { Category: "cloud:route", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "route:get", Hidden: true}, {Name: "upsun:route:get", Hidden: true}, }, - Usage: "View detailed information about a route", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "id",}, - &console.StringFlag{Name: "identity-file", Aliases: []string{"i"},}, - &console.BoolFlag{Name: "primary", Aliases: []string{"1"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, - &console.BoolFlag{Name: "refresh",}, + Usage: "View detailed information about a route", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "id"}, + &console.StringFlag{Name: "identity-file", Aliases: []string{"i"}}, + &console.BoolFlag{Name: "primary", Aliases: []string{"1"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, + &console.BoolFlag{Name: "refresh"}, }, }, { Category: "cloud:route", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "route:list", Hidden: true}, {Name: "upsun:route:list", Hidden: true}, {Name: "cloud:routes"}, {Name: "upsun:routes", Hidden: true}, {Name: "routes", Hidden: true}, }, - Usage: "List all routes for an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, + Usage: "List all routes for an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "refresh"}, }, }, { Category: "cloud:self", Name: "config", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "upsun:self:config", Hidden: true}, }, - Usage: "Read CLI config", - Hidden: console.Hide, + Usage: "Read CLI config", + Hidden: console.Hide, }, { Category: "cloud:service", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "service:list", Hidden: true}, {Name: "upsun:service:list", Hidden: true}, {Name: "cloud:services"}, {Name: "upsun:services", Hidden: true}, {Name: "services", Hidden: true}, }, - Usage: "List services in the project", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "pipe",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, + Usage: "List services in the project", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.BoolFlag{Name: "pipe"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "refresh"}, }, }, { Category: "cloud:service", Name: "mongo:dump", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "service:mongo:dump", Hidden: true}, {Name: "upsun:service:mongo:dump", Hidden: true}, {Name: "cloud:mongodump"}, {Name: "upsun:mongodump", Hidden: true}, {Name: "mongodump", Hidden: true}, }, - Usage: "Create a binary archive dump of data from MongoDB", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "gzip", Aliases: []string{"z"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, - &console.BoolFlag{Name: "stdout", Aliases: []string{"o"},}, + Usage: "Create a binary archive dump of data from MongoDB", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "collection", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "gzip", Aliases: []string{"z"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "relationship", Aliases: []string{"r"}}, + &console.BoolFlag{Name: "stdout", Aliases: []string{"o"}}, }, }, { Category: "cloud:service", Name: "mongo:export", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "service:mongo:export", Hidden: true}, {Name: "upsun:service:mongo:export", Hidden: true}, {Name: "cloud:mongoexport"}, {Name: "upsun:mongoexport", Hidden: true}, {Name: "mongoexport", Hidden: true}, }, - Usage: "Export data from MongoDB", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "fields", Aliases: []string{"f"},}, - &console.BoolFlag{Name: "jsonArray",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, - &console.StringFlag{Name: "type",}, + Usage: "Export data from MongoDB", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "collection", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "fields", Aliases: []string{"f"}}, + &console.BoolFlag{Name: "jsonArray"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "relationship", Aliases: []string{"r"}}, + &console.StringFlag{Name: "type"}, }, }, { Category: "cloud:service", Name: "mongo:restore", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "service:mongo:restore", Hidden: true}, {Name: "upsun:service:mongo:restore", Hidden: true}, {Name: "cloud:mongorestore"}, {Name: "upsun:mongorestore", Hidden: true}, {Name: "mongorestore", Hidden: true}, }, - Usage: "Restore a binary archive dump of data into MongoDB", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "collection", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, + Usage: "Restore a binary archive dump of data into MongoDB", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "collection", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "relationship", Aliases: []string{"r"}}, }, }, { Category: "cloud:service", Name: "mongo:shell", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "service:mongo:shell", Hidden: true}, {Name: "upsun:service:mongo:shell", Hidden: true}, {Name: "cloud:mongo"}, {Name: "upsun:mongo", Hidden: true}, {Name: "mongo", Hidden: true}, }, - Usage: "Use the MongoDB shell", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "eval",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, + Usage: "Use the MongoDB shell", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "eval"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "relationship", Aliases: []string{"r"}}, }, }, { Category: "cloud:service", Name: "redis-cli", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "service:redis-cli", Hidden: true}, {Name: "upsun:service:redis-cli", Hidden: true}, {Name: "cloud:redis"}, {Name: "upsun:redis", Hidden: true}, {Name: "redis", Hidden: true}, }, - Usage: "Access the Redis CLI", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, + Usage: "Access the Redis CLI", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "relationship", Aliases: []string{"r"}}, }, }, { Category: "cloud:session", Name: "switch", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "session:switch", Hidden: true}, {Name: "upsun:session:switch", Hidden: true}, }, - Usage: "BETA Switch between sessions", - Hidden: console.Hide, + Usage: "BETA Switch between sessions", + Hidden: console.Hide, }, { Category: "cloud:source-operation", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "source-operation:list", Hidden: true}, {Name: "upsun:source-operation:list", Hidden: true}, {Name: "cloud:source-ops"}, {Name: "upsun:source-ops", Hidden: true}, {Name: "source-ops", Hidden: true}, }, - Usage: "List source operations on an environment", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "full",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "List source operations on an environment", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "full"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:source-operation", Name: "run", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "source-operation:run", Hidden: true}, {Name: "upsun:source-operation:run", Hidden: true}, }, - Usage: "Run a source operation", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "variable",}, - &console.BoolFlag{Name: "wait",}, + Usage: "Run a source operation", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "variable"}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:ssh-cert", Name: "info", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "ssh-cert:info", Hidden: true}, {Name: "upsun:ssh-cert:info", Hidden: true}, }, - Usage: "Display information about the current SSH certificate", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.BoolFlag{Name: "no-refresh",}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + Usage: "Display information about the current SSH certificate", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.BoolFlag{Name: "no-refresh"}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, }, }, { Category: "cloud:ssh-cert", Name: "load", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "ssh-cert:load", Hidden: true}, {Name: "upsun:ssh-cert:load", Hidden: true}, }, - Usage: "Generate an SSH certificate", - Flags: []console.Flag{ - &console.BoolFlag{Name: "new",}, - &console.BoolFlag{Name: "new-key",}, - &console.BoolFlag{Name: "refresh-only",}, + Usage: "Generate an SSH certificate", + Flags: []console.Flag{ + &console.BoolFlag{Name: "new"}, + &console.BoolFlag{Name: "new-key"}, + &console.BoolFlag{Name: "refresh-only"}, }, }, { Category: "cloud:ssh-key", Name: "add", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "ssh-key:add", Hidden: true}, {Name: "upsun:ssh-key:add", Hidden: true}, }, - Usage: "Add a new SSH key", - Flags: []console.Flag{ - &console.StringFlag{Name: "name",}, + Usage: "Add a new SSH key", + Flags: []console.Flag{ + &console.StringFlag{Name: "name"}, }, }, { Category: "cloud:ssh-key", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "ssh-key:delete", Hidden: true}, {Name: "upsun:ssh-key:delete", Hidden: true}, }, - Usage: "Delete an SSH key", + Usage: "Delete an SSH key", }, { Category: "cloud:ssh-key", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "ssh-key:list", Hidden: true}, {Name: "upsun:ssh-key:list", Hidden: true}, {Name: "cloud:ssh-keys"}, {Name: "upsun:ssh-keys", Hidden: true}, {Name: "ssh-keys", Hidden: true}, }, - Usage: "Get a list of SSH keys in your account", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, + Usage: "Get a list of SSH keys in your account", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, }, }, { Category: "cloud:subscription", Name: "info", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "subscription:info", Hidden: true}, {Name: "upsun:subscription:info", Hidden: true}, }, - Usage: "Read or modify subscription properties", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "id", Aliases: []string{"s"},}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Read or modify subscription properties", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.StringFlag{Name: "id", Aliases: []string{"s"}}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:team", Name: "create", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:create", Hidden: true}, {Name: "upsun:team:create", Hidden: true}, }, - Usage: "Create a new team", - Flags: []console.Flag{ - &console.StringFlag{Name: "label",}, - &console.BoolFlag{Name: "no-check-unique",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.BoolFlag{Name: "output-id",}, - &console.StringFlag{Name: "role", Aliases: []string{"r"},}, + Usage: "Create a new team", + Flags: []console.Flag{ + &console.StringFlag{Name: "label"}, + &console.BoolFlag{Name: "no-check-unique"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.BoolFlag{Name: "output-id"}, + &console.StringFlag{Name: "role", Aliases: []string{"r"}}, }, }, { Category: "cloud:team", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:delete", Hidden: true}, {Name: "upsun:team:delete", Hidden: true}, }, - Usage: "Delete a team", - Flags: []console.Flag{ - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + Usage: "Delete a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "team", Aliases: []string{"t"}}, }, }, { Category: "cloud:team", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:get", Hidden: true}, {Name: "upsun:team:get", Hidden: true}, }, - Usage: "View a team", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, - &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + Usage: "View a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, + &console.StringFlag{Name: "team", Aliases: []string{"t"}}, }, }, { Category: "cloud:team", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:list", Hidden: true}, {Name: "upsun:team:list", Hidden: true}, {Name: "cloud:teams"}, {Name: "upsun:teams", Hidden: true}, {Name: "teams", Hidden: true}, }, - Usage: "List teams", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all", Aliases: []string{"A"},}, - &console.StringFlag{Name: "columns",}, - &console.StringFlag{Name: "count", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "reverse",}, - &console.StringFlag{Name: "sort", DefaultValue: "label",}, + Usage: "List teams", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all", Aliases: []string{"A"}}, + &console.StringFlag{Name: "columns"}, + &console.StringFlag{Name: "count", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "reverse"}, + &console.StringFlag{Name: "sort", DefaultValue: "label"}, }, }, { Category: "cloud:team", Name: "project:add", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:project:add", Hidden: true}, {Name: "upsun:team:project:add", Hidden: true}, }, - Usage: "Add project(s) to a team", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + Usage: "Add project(s) to a team", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "team", Aliases: []string{"t"}}, }, }, { Category: "cloud:team", Name: "project:delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:project:delete", Hidden: true}, {Name: "upsun:team:project:delete", Hidden: true}, }, - Usage: "Remove a project from a team", - Flags: []console.Flag{ - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + Usage: "Remove a project from a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "team", Aliases: []string{"t"}}, }, }, { Category: "cloud:team", Name: "project:list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:project:list", Hidden: true}, {Name: "upsun:team:project:list", Hidden: true}, {Name: "cloud:team:projects"}, @@ -2634,315 +2634,315 @@ var Commands = []*console.Command{ {Name: "upsun:team:pro", Hidden: true}, {Name: "team:pro", Hidden: true}, }, - Usage: "List projects in a team", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, - &console.StringFlag{Name: "count", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + Usage: "List projects in a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns"}, + &console.StringFlag{Name: "count", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "team", Aliases: []string{"t"}}, }, }, { Category: "cloud:team", Name: "update", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:update", Hidden: true}, {Name: "upsun:team:update", Hidden: true}, }, - Usage: "Update a team", - Flags: []console.Flag{ - &console.StringFlag{Name: "label",}, - &console.BoolFlag{Name: "no-check-unique",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "role", Aliases: []string{"r"},}, - &console.StringFlag{Name: "team", Aliases: []string{"t"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Update a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "label"}, + &console.BoolFlag{Name: "no-check-unique"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "role", Aliases: []string{"r"}}, + &console.StringFlag{Name: "team", Aliases: []string{"t"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:team", Name: "user:add", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:user:add", Hidden: true}, {Name: "upsun:team:user:add", Hidden: true}, }, - Usage: "Add a user to a team", - Flags: []console.Flag{ - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + Usage: "Add a user to a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "team", Aliases: []string{"t"}}, }, }, { Category: "cloud:team", Name: "user:delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:user:delete", Hidden: true}, {Name: "upsun:team:user:delete", Hidden: true}, }, - Usage: "Remove a user from a team", - Flags: []console.Flag{ - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + Usage: "Remove a user from a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "team", Aliases: []string{"t"}}, }, }, { Category: "cloud:team", Name: "user:list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "team:user:list", Hidden: true}, {Name: "upsun:team:user:list", Hidden: true}, {Name: "cloud:team:users"}, {Name: "upsun:team:users", Hidden: true}, {Name: "team:users", Hidden: true}, }, - Usage: "List users in a team", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns",}, - &console.StringFlag{Name: "count", Aliases: []string{"c"},}, - &console.StringFlag{Name: "date-fmt", DefaultValue: "c",}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "org", Aliases: []string{"o"},}, - &console.StringFlag{Name: "team", Aliases: []string{"t"},}, + Usage: "List users in a team", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns"}, + &console.StringFlag{Name: "count", Aliases: []string{"c"}}, + &console.StringFlag{Name: "date-fmt", DefaultValue: "c"}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "org", Aliases: []string{"o"}}, + &console.StringFlag{Name: "team", Aliases: []string{"t"}}, }, }, { Category: "cloud:tunnel", Name: "close", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "tunnel:close", Hidden: true}, {Name: "upsun:tunnel:close", Hidden: true}, }, - Usage: "Close SSH tunnels", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Close SSH tunnels", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all", Aliases: []string{"a"}}, + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:tunnel", Name: "info", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "tunnel:info", Hidden: true}, {Name: "upsun:tunnel:info", Hidden: true}, }, - Usage: "View relationship info for SSH tunnels", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.BoolFlag{Name: "encode", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + Usage: "View relationship info for SSH tunnels", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.BoolFlag{Name: "encode", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, }, }, { Category: "cloud:tunnel", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "tunnel:list", Hidden: true}, {Name: "upsun:tunnel:list", Hidden: true}, {Name: "cloud:tunnels"}, {Name: "upsun:tunnels", Hidden: true}, {Name: "tunnels", Hidden: true}, }, - Usage: "List SSH tunnels", - Flags: []console.Flag{ - &console.BoolFlag{Name: "all", Aliases: []string{"a"},}, - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "List SSH tunnels", + Flags: []console.Flag{ + &console.BoolFlag{Name: "all", Aliases: []string{"a"}}, + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:tunnel", Name: "open", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "tunnel:open", Hidden: true}, {Name: "upsun:tunnel:open", Hidden: true}, }, - Usage: "Open SSH tunnels to an app's relationships", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "Open SSH tunnels to an app's relationships", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:tunnel", Name: "single", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "tunnel:single", Hidden: true}, {Name: "upsun:tunnel:single", Hidden: true}, }, - Usage: "Open a single SSH tunnel to an app relationship", - Flags: []console.Flag{ - &console.StringFlag{Name: "app", Aliases: []string{"A"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"},}, - &console.StringFlag{Name: "port",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "relationship", Aliases: []string{"r"},}, + Usage: "Open a single SSH tunnel to an app relationship", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "gateway-ports", Aliases: []string{"g"}}, + &console.StringFlag{Name: "port"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "relationship", Aliases: []string{"r"}}, }, }, { Category: "cloud:user", Name: "add", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "user:add", Hidden: true}, {Name: "upsun:user:add", Hidden: true}, }, - Usage: "Add a user to the project", - Flags: []console.Flag{ - &console.BoolFlag{Name: "force-invite",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "role", Aliases: []string{"r"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Add a user to the project", + Flags: []console.Flag{ + &console.BoolFlag{Name: "force-invite"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "role", Aliases: []string{"r"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:user", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "user:delete", Hidden: true}, {Name: "upsun:user:delete", Hidden: true}, }, - Usage: "Delete a user from the project", - Flags: []console.Flag{ - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Delete a user from the project", + Flags: []console.Flag{ + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:user", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "user:get", Hidden: true}, {Name: "upsun:user:get", Hidden: true}, }, - Usage: "View a user's role(s)", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.BoolFlag{Name: "pipe",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "role", Aliases: []string{"r"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "View a user's role(s)", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "level", Aliases: []string{"l"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.BoolFlag{Name: "pipe"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "role", Aliases: []string{"r"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:user", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "user:list", Hidden: true}, {Name: "upsun:user:list", Hidden: true}, {Name: "cloud:users"}, {Name: "upsun:users", Hidden: true}, {Name: "users", Hidden: true}, }, - Usage: "List project users", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "List project users", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:user", Name: "update", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "user:update", Hidden: true}, {Name: "upsun:user:update", Hidden: true}, }, - Usage: "Update user role(s) on a project", - Flags: []console.Flag{ - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "role", Aliases: []string{"r"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Update user role(s) on a project", + Flags: []console.Flag{ + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "role", Aliases: []string{"r"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:variable", Name: "create", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "variable:create", Hidden: true}, {Name: "upsun:variable:create", Hidden: true}, }, - Usage: "Create a variable", - Flags: []console.Flag{ - &console.BoolFlag{Name: "enabled", DefaultValue: true,}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "inheritable", DefaultValue: true,}, - &console.BoolFlag{Name: "json",}, - &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.StringFlag{Name: "name",}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "prefix", DefaultValue: "none",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "sensitive",}, - &console.BoolFlag{Name: "update", Aliases: []string{"u"},}, - &console.StringFlag{Name: "value",}, - &console.StringFlag{Name: "visible-build",}, - &console.BoolFlag{Name: "visible-runtime", DefaultValue: true,}, - &console.BoolFlag{Name: "wait",}, + Usage: "Create a variable", + Flags: []console.Flag{ + &console.BoolFlag{Name: "enabled", DefaultValue: true}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "inheritable", DefaultValue: true}, + &console.BoolFlag{Name: "json"}, + &console.StringFlag{Name: "level", Aliases: []string{"l"}}, + &console.StringFlag{Name: "name"}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "prefix", DefaultValue: "none"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "sensitive"}, + &console.BoolFlag{Name: "update", Aliases: []string{"u"}}, + &console.StringFlag{Name: "value"}, + &console.StringFlag{Name: "visible-build"}, + &console.BoolFlag{Name: "visible-runtime", DefaultValue: true}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:variable", Name: "delete", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "variable:delete", Hidden: true}, {Name: "upsun:variable:delete", Hidden: true}, }, - Usage: "Delete a variable", - Flags: []console.Flag{ - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "wait",}, + Usage: "Delete a variable", + Flags: []console.Flag{ + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "level", Aliases: []string{"l"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:variable", Name: "get", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "variable:get", Hidden: true}, {Name: "upsun:variable:get", Hidden: true}, {Name: "cloud:vget"}, {Name: "upsun:vget", Hidden: true}, {Name: "vget", Hidden: true}, }, - Usage: "View a variable", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "pipe",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.StringFlag{Name: "property", Aliases: []string{"P"},}, + Usage: "View a variable", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.StringFlag{Name: "level", Aliases: []string{"l"}}, + &console.BoolFlag{Name: "no-header"}, + &console.BoolFlag{Name: "pipe"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "property", Aliases: []string{"P"}}, }, }, { Category: "cloud:variable", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "variable:list", Hidden: true}, {Name: "upsun:variable:list", Hidden: true}, {Name: "cloud:variables"}, @@ -2952,79 +2952,79 @@ var Commands = []*console.Command{ {Name: "upsun:var", Hidden: true}, {Name: "var", Hidden: true}, }, - Usage: "List variables", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "List variables", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.StringFlag{Name: "level", Aliases: []string{"l"}}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:variable", Name: "update", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "variable:update", Hidden: true}, {Name: "upsun:variable:update", Hidden: true}, }, - Usage: "Update a variable", - Flags: []console.Flag{ - &console.BoolFlag{Name: "allow-no-change",}, - &console.BoolFlag{Name: "enabled", DefaultValue: true,}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.BoolFlag{Name: "inheritable", DefaultValue: true,}, - &console.BoolFlag{Name: "json",}, - &console.StringFlag{Name: "level", Aliases: []string{"l"},}, - &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"},}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "sensitive",}, - &console.StringFlag{Name: "value",}, - &console.StringFlag{Name: "visible-build",}, - &console.BoolFlag{Name: "visible-runtime", DefaultValue: true,}, - &console.BoolFlag{Name: "wait",}, + Usage: "Update a variable", + Flags: []console.Flag{ + &console.BoolFlag{Name: "allow-no-change"}, + &console.BoolFlag{Name: "enabled", DefaultValue: true}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "inheritable", DefaultValue: true}, + &console.BoolFlag{Name: "json"}, + &console.StringFlag{Name: "level", Aliases: []string{"l"}}, + &console.BoolFlag{Name: "no-wait", Aliases: []string{"W"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "sensitive"}, + &console.StringFlag{Name: "value"}, + &console.StringFlag{Name: "visible-build"}, + &console.BoolFlag{Name: "visible-runtime", DefaultValue: true}, + &console.BoolFlag{Name: "wait"}, }, }, { Category: "cloud:version", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "version:list", Hidden: true}, {Name: "upsun:version:list", Hidden: true}, {Name: "cloud:versions"}, {Name: "upsun:versions", Hidden: true}, {Name: "versions", Hidden: true}, }, - Usage: "ALPHA List environment versions", - Hidden: console.Hide, - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, + Usage: "ALPHA List environment versions", + Hidden: console.Hide, + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, }, }, { Category: "cloud:worker", Name: "list", - Aliases: []*console.Alias{ + Aliases: []*console.Alias{ {Name: "worker:list", Hidden: true}, {Name: "upsun:worker:list", Hidden: true}, {Name: "cloud:workers"}, {Name: "upsun:workers", Hidden: true}, {Name: "workers", Hidden: true}, }, - Usage: "Get a list of all deployed workers", - Flags: []console.Flag{ - &console.StringFlag{Name: "columns", Aliases: []string{"c"},}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"},}, - &console.StringFlag{Name: "format", DefaultValue: "table",}, - &console.BoolFlag{Name: "no-header",}, - &console.BoolFlag{Name: "pipe",}, - &console.StringFlag{Name: "project", Aliases: []string{"p"},}, - &console.BoolFlag{Name: "refresh",}, + Usage: "Get a list of all deployed workers", + Flags: []console.Flag{ + &console.StringFlag{Name: "columns", Aliases: []string{"c"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "format", DefaultValue: "table"}, + &console.BoolFlag{Name: "no-header"}, + &console.BoolFlag{Name: "pipe"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.BoolFlag{Name: "refresh"}, }, }, } diff --git a/local/platformsh/config.go b/local/platformsh/config.go index e3392ad0..4eaa959f 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -184,7 +184,7 @@ var availableServices = []*service{ Type: "mongodb", Versions: serviceVersions{ Deprecated: []string{"3.0", "3.2", "3.4", "3.6", "4.0.3"}, - Supported: []string{}, + Supported: []string{}, }, }, { diff --git a/local/platformsh/generator/commands.go b/local/platformsh/generator/commands.go index 3c6ec0ad..b99a16a0 100644 --- a/local/platformsh/generator/commands.go +++ b/local/platformsh/generator/commands.go @@ -23,6 +23,7 @@ import ( "bytes" "encoding/json" "fmt" + "go/format" "os" "os/exec" "sort" @@ -93,7 +94,11 @@ func generateCommands() { if err != nil { panic(err) } - f.Write(buf.Bytes()) + source, err := format.Source(buf.Bytes()) + if err != nil { + panic(err) + } + f.Write(source) } @@ -175,7 +180,7 @@ func parseCommands(cloudPath string) (string, error) { } aliasesAsString := "" if len(aliases) > 0 { - aliasesAsString += "\n\t\tAliases: []*console.Alias{\n" + aliasesAsString += "\n\t\tAliases: []*console.Alias{\n" for _, alias := range aliases { aliasesAsString += "\t\t\t" + alias + ",\n" } @@ -183,7 +188,7 @@ func parseCommands(cloudPath string) (string, error) { } hide := "" if command.Hidden { - hide = "\n\t\tHidden: console.Hide," + hide = "\n\t\tHidden: console.Hide," } optionNames := make([]string, 0, len(command.Definition.Options)) @@ -229,7 +234,7 @@ func parseCommands(cloudPath string) (string, error) { } flagsAsString := "" if len(flags) > 0 { - flagsAsString += "\n\t\tFlags: []console.Flag{\n" + flagsAsString += "\n\t\tFlags: []console.Flag{\n" for _, flag := range flags { flagsAsString += "\t\t\t" + flag + ",\n" } @@ -239,8 +244,8 @@ func parseCommands(cloudPath string) (string, error) { command.Description = strings.ReplaceAll(command.Description, "Platform.sh", "Platform.sh/Upsun") definitionAsString += fmt.Sprintf(` { Category: "%s", - Name: "%s",%s - Usage: %#v,%s%s + Name: "%s",%s + Usage: %#v,%s%s }, `, namespace, name, aliasesAsString, command.Description, hide, flagsAsString) } diff --git a/local/platformsh/generator/config.go b/local/platformsh/generator/config.go index 223b5ddb..851eb8da 100644 --- a/local/platformsh/generator/config.go +++ b/local/platformsh/generator/config.go @@ -23,6 +23,7 @@ import ( "bytes" "encoding/json" "fmt" + "go/format" "io" "net/http" "os" @@ -101,7 +102,11 @@ func generateConfig() { if err != nil { panic(err) } - f.Write(buf.Bytes()) + source, err := format.Source(buf.Bytes()) + if err != nil { + panic(err) + } + f.Write(source) } func parseServices() (string, error) { @@ -145,7 +150,7 @@ func parseServices() (string, error) { servicesAsString += "\t\t\tDeprecated: []string{},\n" } if len(supportedVersions) > 0 { - servicesAsString += fmt.Sprintf("\t\t\tSupported: []string{\"%s\"},\n", strings.Join(supportedVersions, "\", \"")) + servicesAsString += fmt.Sprintf("\t\t\tSupported: []string{\"%s\"},\n", strings.Join(supportedVersions, "\", \"")) } else { servicesAsString += "\t\t\tSupported: []string{},\n" } From 1117f20b345fe8dc4d40939aa22cec4a431823e2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 08:14:25 +0000 Subject: [PATCH 437/466] Update latest available PHP version --- commands/php_version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/php_version.go b/commands/php_version.go index 30615fe5..4dd8dcd2 100644 --- a/commands/php_version.go +++ b/commands/php_version.go @@ -23,4 +23,4 @@ package commands const LatestPhpMajorVersion = "8.4" -const LatestPhpMinorVersion = "8.4.3" +const LatestPhpMinorVersion = "8.4.4" From 144ac25154280d70160c0f5de53c2bf9ab3a42b7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 20 Feb 2025 12:57:56 +0100 Subject: [PATCH 438/466] Bump deps --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index ea93e946..c8601ccb 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 github.com/compose-spec/compose-go v1.20.2 - github.com/docker/docker v27.5.1+incompatible + github.com/docker/docker v28.0.0+incompatible github.com/elazarl/goproxy v1.7.0 github.com/fabpot/local-php-security-checker/v2 v2.1.3 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 @@ -28,7 +28,7 @@ require ( github.com/soheilhy/cmux v0.1.5 github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081 github.com/symfony-cli/cert v1.0.6 - github.com/symfony-cli/console v1.2.0 + github.com/symfony-cli/console v1.2.1 github.com/symfony-cli/phpstore v1.0.12 github.com/symfony-cli/terminal v1.0.7 golang.org/x/sync v0.11.0 @@ -82,7 +82,7 @@ require ( go.opentelemetry.io/otel/sdk v1.34.0 // indirect go.opentelemetry.io/otel/trace v1.34.0 // indirect golang.org/x/crypto v0.33.0 // indirect - golang.org/x/exp v0.0.0-20250215185904-eff6e970281f // indirect + golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa // indirect golang.org/x/net v0.35.0 // indirect golang.org/x/sys v0.30.0 // indirect golang.org/x/term v0.29.0 // indirect diff --git a/go.sum b/go.sum index 56b930f6..a4697627 100644 --- a/go.sum +++ b/go.sum @@ -23,8 +23,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.5.1+incompatible h1:4PYU5dnBYqRQi0294d1FBECqT9ECWeQAIfE8q4YnPY8= -github.com/docker/docker v27.5.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v28.0.0+incompatible h1:Olh0KS820sJ7nPsBKChVhk5pzqcwDR15fumfAd/p9hM= +github.com/docker/docker v28.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -154,8 +154,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/symfony-cli/cert v1.0.6 h1:FKdNRhKSxc+IcOkSRYvcOjr4jyZxGHiNS0xCN0uXZQI= github.com/symfony-cli/cert v1.0.6/go.mod h1:7Lt0uwi9z6DYTwLQeKsdPrsTqvTZRTqdlVSDJJqKUVo= -github.com/symfony-cli/console v1.2.0 h1:j7xHRB9QizWZNRtkj3clAtDamb+bYddYiOwgZFpaUZY= -github.com/symfony-cli/console v1.2.0/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= +github.com/symfony-cli/console v1.2.1 h1:j3ft4sWNXmFmmHACsXUZrAvZE52rIopg/FpZMkknZz4= +github.com/symfony-cli/console v1.2.1/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8= github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA= github.com/symfony-cli/phpstore v1.0.12/go.mod h1:U29bdJBPs9p28PzLIRKfKfKkaiH0kacdyufl3eSB1d4= github.com/symfony-cli/terminal v1.0.7 h1:57L9PUTE2cHfQtP8Ti8dyiiPEYlQ1NBIDpMJ3RPEGPc= @@ -192,8 +192,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= -golang.org/x/exp v0.0.0-20250215185904-eff6e970281f h1:oFMYAjX0867ZD2jcNiLBrI9BdpmEkvPyi5YrBGXbamg= -golang.org/x/exp v0.0.0-20250215185904-eff6e970281f/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk= +golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa h1:t2QcU6V556bFjYgu4L6C+6VrCPyJZ+eyRsABUPs1mz4= +golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= From 1309e83178dabec136cd6d2da9eb68e7cb033023 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:19:34 +0000 Subject: [PATCH 439/466] Update Docker Client version --- envs/docker_version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envs/docker_version.go b/envs/docker_version.go index f0d9f3c9..8b319b58 100644 --- a/envs/docker_version.go +++ b/envs/docker_version.go @@ -22,4 +22,4 @@ package envs -const dockerClientVersion = "v27.5.1" +const dockerClientVersion = "v28.0.0" From f74ffa9d5ad6abf3b54142c89f475c147e3a4f18 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sat, 22 Feb 2025 13:48:57 +0100 Subject: [PATCH 440/466] feat: improve warning message when Composer is not found --- local/php/composer.go | 14 +++++++++++--- local/php/composer_test.go | 1 + local/php/executor.go | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/local/php/composer.go b/local/php/composer.go index c6f8b5b5..8f1c5f54 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -74,8 +74,13 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, composerBin = "composer2" } path, err := e.findComposer(composerBin) - if err != nil || !isPHPScript(path) { - fmt.Fprintln(logger, " WARNING: Unable to find Composer, downloading one. It is recommended to install Composer yourself at https://getcomposer.org/download/") + if pathIsPhpScript := isPHPScript(path); err != nil || !pathIsPhpScript { + reason := "No Composer installation found." + if path != "" && !pathIsPhpScript { + reason = fmt.Sprintf("Detected Composer file (%s) is not a valid PHAR or PHP script.", path) + } + fmt.Fprintln(logger, " WARNING:", reason) + fmt.Fprintln(logger, " Downloading Composer for you, but it is recommended to install Composer yourself, instructions available at https://getcomposer.org/download/") // we don't store it under bin/ to avoid it being found by findComposer as we want to only use it as a fallback binDir := filepath.Join(util.GetHomeDir(), "composer") if path, err = downloadComposer(binDir, debugLogger); err != nil { @@ -100,6 +105,9 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, // isPHPScript checks that the composer file is indeed a phar/PHP script (not a .bat file) func isPHPScript(path string) bool { + if path == "" { + return false + } file, err := os.Open(path) if err != nil { return false @@ -149,7 +157,7 @@ func findComposer(extraBin string, logger zerolog.Logger) (string, error) { if strings.HasSuffix(pharPath, ".bat") { pharPath = pharPath[:len(pharPath)-4] + ".phar" } - logger.Debug().Str("source", "Composer").Msgf(`Found Composer as "%s"`, pharPath) + logger.Debug().Str("source", "Composer").Msgf(`Found potential Composer as "%s"`, pharPath) return pharPath, nil } } diff --git a/local/php/composer_test.go b/local/php/composer_test.go index c6febd3a..32d13e61 100644 --- a/local/php/composer_test.go +++ b/local/php/composer_test.go @@ -33,6 +33,7 @@ func (s *ComposerSuite) TestIsComposerPHPScript(c *C) { dir, err := filepath.Abs("testdata/php_scripts") c.Assert(err, IsNil) + c.Assert(isPHPScript(""), Equals, false) c.Assert(isPHPScript(filepath.Join(dir, "unknown")), Equals, false) c.Assert(isPHPScript(filepath.Join(dir, "invalid")), Equals, false) diff --git a/local/php/executor.go b/local/php/executor.go index bb3e5774..4166608f 100644 --- a/local/php/executor.go +++ b/local/php/executor.go @@ -401,7 +401,7 @@ func (e *Executor) findComposer(extraBin string) (string, error) { } if m := d.Mode(); !m.IsDir() { // Yep! - e.Logger.Debug().Str("source", "Composer").Msgf(`Found Composer as "%s"`, path) + e.Logger.Debug().Str("source", "Composer").Msgf(`Found potential Composer as "%s"`, path) return path, nil } } From 09df7fa43d0fbfb1bcf7673a2533e675eb8b2a4a Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 25 Feb 2025 08:44:34 +0100 Subject: [PATCH 441/466] refactor: add Executor.CommandLine --- local/php/composer.go | 8 +++++--- local/php/executor.go | 4 ++++ local/php/executor_test.go | 8 ++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/local/php/composer.go b/local/php/composer.go index 8f1c5f54..3ca69d56 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -89,15 +89,17 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, error: errors.Wrap(err, "unable to find composer, get it at https://getcomposer.org/download/"), } } - fmt.Fprintf(logger, " (running %s %s)\n\n", path, strings.TrimSpace(strings.Join(args, " "))) + e.Args = append([]string{"php", path}, args...) + fmt.Fprintf(logger, " (running %s)\n\n", e.CommandLine()) + } else { + e.Args = append([]string{"php", path}, args...) } - e.Args = append([]string{"php", path}, args...) ret := e.Execute(false) if ret != 0 { return ComposerResult{ code: ret, - error: errors.Errorf("unable to run %s %s", path, strings.Join(args, " ")), + error: errors.Errorf("unable to run %s", e.CommandLine()), } } return ComposerResult{} diff --git a/local/php/executor.go b/local/php/executor.go index 4166608f..d211c85e 100644 --- a/local/php/executor.go +++ b/local/php/executor.go @@ -74,6 +74,10 @@ func GetBinaryNames() []string { return []string{"php", "pecl", "pear", "php-fpm", "php-cgi", "php-config", "phpdbg", "phpize"} } +func (e Executor) CommandLine() string { + return strings.TrimSpace(strings.Join(e.Args, " ")) +} + func (e *Executor) lookupPHP(cliDir string, forceReload bool) (*phpstore.Version, string, bool, error) { phpStore := phpstore.New(cliDir, forceReload, nil) v, source, warning, err := phpStore.BestVersionForDir(e.scriptDir) diff --git a/local/php/executor_test.go b/local/php/executor_test.go index 9123960d..4fde1c44 100644 --- a/local/php/executor_test.go +++ b/local/php/executor_test.go @@ -112,6 +112,14 @@ func (s *ExecutorSuite) TestNotEnoughArgs(c *C) { c.Assert((&Executor{BinName: "php"}).Execute(true), Equals, 1) } +func (s *ExecutorSuite) TestCommandLineFormatting(c *C) { + c.Assert((&Executor{}).CommandLine(), Equals, "") + + c.Assert((&Executor{Args: []string{"php"}}).CommandLine(), Equals, "php") + + c.Assert((&Executor{Args: []string{"php", "-dmemory_limit=-1", "/path/to/composer.phar"}}).CommandLine(), Equals, "php -dmemory_limit=-1 /path/to/composer.phar") +} + func (s *ExecutorSuite) TestForwardExitCode(c *C) { defer restoreExecCommand() fakeExecCommand("exit-code", "5") From b15651258a451b0a8f05abdbfaa6efeb5a1eea6f Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 25 Feb 2025 08:39:54 +0100 Subject: [PATCH 442/466] feat: allow PHP executor to run executables other than PHP ones --- local/php/executor.go | 8 +++-- local/php/executor_test.go | 60 +++++++++++++++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/local/php/executor.go b/local/php/executor.go index d211c85e..1a6168a6 100644 --- a/local/php/executor.go +++ b/local/php/executor.go @@ -288,9 +288,11 @@ func (e *Executor) Config(loadDotEnv bool) error { } } - // args[0] MUST be the same as path - // but as we change the path, we should update args[0] accordingly - e.Args[0] = path + if IsBinaryName(e.Args[0]) { + // args[0] MUST be the same as path + // but as we change the path, we should update args[0] accordingly + e.Args[0] = path + } return err } diff --git a/local/php/executor_test.go b/local/php/executor_test.go index 4fde1c44..2608820c 100644 --- a/local/php/executor_test.go +++ b/local/php/executor_test.go @@ -99,11 +99,12 @@ func TestHelperProcess(t *testing.T) { for _, v := range os.Environ() { fmt.Println(v) } + os.Exit(0) case "exit-code": code, _ := strconv.Atoi(os.Args[4]) os.Exit(code) } - os.Exit(0) + os.Exit(1) } func (s *ExecutorSuite) TestNotEnoughArgs(c *C) { @@ -139,6 +140,63 @@ func (s *ExecutorSuite) TestForwardExitCode(c *C) { c.Assert((&Executor{BinName: "php", Args: []string{"php"}}).Execute(true), Equals, 5) } +func (s *ExecutorSuite) TestExecutorRunsPHP(c *C) { + defer restoreExecCommand() + execCommand = func(name string, arg ...string) *exec.Cmd { + c.Assert(name, Equals, "../bin/php") + + cmd := exec.Command(os.Args[0], "-test.run=TestHelperProcess", "--", "exit-code", "0") + cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"} + // Set the working directory right now so that it can be changed by + // calling test case + cmd.Dir, _ = os.Getwd() + return cmd + } + + home, err := filepath.Abs("testdata/executor") + c.Assert(err, IsNil) + + homedir.Reset() + os.Setenv("HOME", home) + defer homedir.Reset() + + oldwd, _ := os.Getwd() + defer os.Chdir(oldwd) + os.Chdir(filepath.Join(home, "project")) + defer cleanupExecutorTempFiles() + + c.Assert((&Executor{BinName: "php", Args: []string{"php"}}).Execute(true), Equals, 0) + +} + +func (s *ExecutorSuite) TestBinaryOtherThanPhp(c *C) { + defer restoreExecCommand() + execCommand = func(name string, arg ...string) *exec.Cmd { + c.Assert(name, Equals, "not-php") + + cmd := exec.Command(os.Args[0], "-test.run=TestHelperProcess", "--", "exit-code", "0") + cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"} + // Set the working directory right now so that it can be changed by + // calling test case + cmd.Dir, _ = os.Getwd() + return cmd + } + + home, err := filepath.Abs("testdata/executor") + c.Assert(err, IsNil) + + homedir.Reset() + os.Setenv("HOME", home) + defer homedir.Reset() + + oldwd, _ := os.Getwd() + defer os.Chdir(oldwd) + os.Chdir(filepath.Join(home, "project")) + defer cleanupExecutorTempFiles() + + c.Assert((&Executor{BinName: "php", Args: []string{"not-php"}}).Execute(true), Equals, 0) +} + func (s *ExecutorSuite) TestEnvInjection(c *C) { defer restoreExecCommand() fakeExecCommand("dump-env") From e93e62e50241d2be5bf9dddfbe96869eaf3fb743 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 25 Feb 2025 09:14:25 +0100 Subject: [PATCH 443/466] feat: allow to define where is Composer using the SYMFONY_COMPOSER_PATH environment variable --- local/php/composer.go | 17 ++++++++++++----- local/php/composer_test.go | 1 + local/php/testdata/php_scripts/plain-one.php | 3 +++ 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100755 local/php/testdata/php_scripts/plain-one.php diff --git a/local/php/composer.go b/local/php/composer.go index 3ca69d56..828bd420 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -73,10 +73,15 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, if composerVersion() == 2 { composerBin = "composer2" } - path, err := e.findComposer(composerBin) - if pathIsPhpScript := isPHPScript(path); err != nil || !pathIsPhpScript { + + if composerPath := os.Getenv("SYMFONY_COMPOSER_PATH"); composerPath != "" { + debugLogger.Debug().Str("SYMFONY_COMPOSER_PATH", composerPath).Msg("SYMFONY_COMPOSER_PATH has been defined. User is taking control over Composer detection and execution.") + e.Args = append([]string{composerPath}, args...) + } else if path, err := e.findComposer(composerBin); err == nil && isPHPScript(path) { + e.Args = append([]string{"php", path}, args...) + } else { reason := "No Composer installation found." - if path != "" && !pathIsPhpScript { + if path != "" { reason = fmt.Sprintf("Detected Composer file (%s) is not a valid PHAR or PHP script.", path) } fmt.Fprintln(logger, " WARNING:", reason) @@ -91,8 +96,6 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, } e.Args = append([]string{"php", path}, args...) fmt.Fprintf(logger, " (running %s)\n\n", e.CommandLine()) - } else { - e.Args = append([]string{"php", path}, args...) } ret := e.Execute(false) @@ -121,6 +124,10 @@ func isPHPScript(path string) bool { return false } + if bytes.Equal(byteSlice, []byte(" Date: Thu, 13 Mar 2025 12:20:59 +0000 Subject: [PATCH 444/466] Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 4eaa959f..0c83ebfe 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -226,7 +226,7 @@ var availableServices = []*service{ Type: "postgresql", Versions: serviceVersions{ Deprecated: []string{"9.3", "9.4", "9.5", "9.6", "10", "11"}, - Supported: []string{"12", "13", "14", "15", "16"}, + Supported: []string{"12", "13", "14", "15", "16", "17"}, }, }, { From 5575c469b7aae6d2fc9db48861ffafbeec2ffc6f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 13 Mar 2025 16:14:10 +0000 Subject: [PATCH 445/466] Update latest available PHP version --- commands/php_version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/php_version.go b/commands/php_version.go index 4dd8dcd2..bd8da3c4 100644 --- a/commands/php_version.go +++ b/commands/php_version.go @@ -23,4 +23,4 @@ package commands const LatestPhpMajorVersion = "8.4" -const LatestPhpMinorVersion = "8.4.4" +const LatestPhpMinorVersion = "8.4.5" From 4d314892af3e19dde679f089610fa38b14f266ec Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 17 Mar 2025 20:05:07 +0100 Subject: [PATCH 446/466] feat: add envs.LookupEnv --- envs/dotenv.go | 17 +++++++++++++++++ local/php/symfony.go | 1 - 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/envs/dotenv.go b/envs/dotenv.go index da2d9806..d648cf4c 100644 --- a/envs/dotenv.go +++ b/envs/dotenv.go @@ -50,6 +50,23 @@ func LoadDotEnv(vars map[string]string, scriptDir string) map[string]string { return vars } +// LookupEnv allows one to lookup for a single environment variable in the same +// way os.LookupEnv would. It automatically let the environment variable take +// over if defined. +func LookupEnv(dotEnvDir, key string) (string, bool) { + // first check if the user defined it in its environment + if value, isUserDefined := os.LookupEnv(key); isUserDefined { + return value, isUserDefined + } + + dotEnvEnv := lookupDotEnv(dotEnvDir) + if value, isDefined := dotEnvEnv[key]; isDefined { + return value, isDefined + } + + return "", false +} + // algorithm is here: https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/config/bootstrap.php func lookupDotEnv(dir string) map[string]string { var err error diff --git a/local/php/symfony.go b/local/php/symfony.go index 2684181e..40da4280 100644 --- a/local/php/symfony.go +++ b/local/php/symfony.go @@ -21,7 +21,6 @@ package php import ( "os" - "path/filepath" "github.com/pkg/errors" From a2d78505e1786bb35c441be891098c3f9613a98c Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Mon, 17 Mar 2025 18:10:18 +0100 Subject: [PATCH 447/466] feat: allow to override the path to the Symfony Console When running `symfony console` we are currently looking for a `bin/console` or a `app/console` file to run. What if the user renamed the file? or if they have a non "stantard" project structure? This PR intends to introduce a way one can override the path to the console by defining `SYMFONY_CONSOLE_PATH` environment variable. --- commands/completion_posix.go | 2 +- local/php/symfony.go | 13 +++++++++++-- main.go | 3 +-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/commands/completion_posix.go b/commands/completion_posix.go index c499fd8e..6f2e1665 100644 --- a/commands/completion_posix.go +++ b/commands/completion_posix.go @@ -50,7 +50,7 @@ func autocompleteSymfonyConsoleWrapper(context *console.Context, words complete. // Composer does not support those options yet, so we only use them for Symfony Console args = append(args, "-a1", fmt.Sprintf("-s%s", console.GuessShell())) - if executor, err := php.SymfonyConsoleExecutor(args); err == nil { + if executor, err := php.SymfonyConsoleExecutor(terminal.Logger, args); err == nil { os.Exit(executor.Execute(false)) } diff --git a/local/php/symfony.go b/local/php/symfony.go index 40da4280..235a2ccc 100644 --- a/local/php/symfony.go +++ b/local/php/symfony.go @@ -24,22 +24,31 @@ import ( "path/filepath" "github.com/pkg/errors" + "github.com/rs/zerolog" + "github.com/symfony-cli/symfony-cli/envs" ) // SymfonyConsoleExecutor returns an Executor prepared to run Symfony Console. // It returns an error if no console binary is found. -func SymfonyConsoleExecutor(args []string) (*Executor, error) { +func SymfonyConsoleExecutor(logger zerolog.Logger, args []string) (*Executor, error) { dir, err := os.Getwd() if err != nil { return nil, errors.WithStack(err) } for { - for _, consolePath := range []string{"bin/console", "app/console"} { + consolePaths := []string{"bin/console", "app/console"} + if consolePath, isConsolePathSpecified := envs.LookupEnv(dir, "SYMFONY_CONSOLE_PATH"); isConsolePathSpecified { + consolePaths = []string{consolePath} + } + + for _, consolePath := range consolePaths { + logger.Debug().Str("consolePath", consolePath).Str("directory", dir).Msgf("Looking for Symfony console") consolePath = filepath.Join(dir, consolePath) if _, err := os.Stat(consolePath); err == nil { return &Executor{ BinName: "php", + Logger: logger, Args: append([]string{"php", consolePath}, args...), }, nil } diff --git a/main.go b/main.go index bdd7af30..897eda6c 100644 --- a/main.go +++ b/main.go @@ -74,8 +74,7 @@ func main() { } // called via "symfony console"? if len(args) >= 2 && args[1] == "console" { - if executor, err := php.SymfonyConsoleExecutor(args[2:]); err == nil { - executor.Logger = terminal.Logger + if executor, err := php.SymfonyConsoleExecutor(terminal.Logger, args[2:]); err == nil { executor.ExtraEnv = getCliExtraEnv() os.Exit(executor.Execute(false)) } From ebe6976c3352bc7d4947bc5ae393ad3bddde2987 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Thu, 20 Mar 2025 18:14:00 +0100 Subject: [PATCH 448/466] Add support for `pie` --- commands/root.go | 2 + commands/wrappers.go | 10 ++ local/php/composer.go | 24 --- local/php/executor.go | 20 +++ local/php/pie.go | 137 ++++++++++++++++++ local/php/utils.go | 30 ++++ local/php/{composer_test.go => utils_test.go} | 6 +- main.go | 18 ++- 8 files changed, 215 insertions(+), 32 deletions(-) create mode 100644 local/php/pie.go create mode 100644 local/php/utils.go rename local/php/{composer_test.go => utils_test.go} (91%) diff --git a/commands/root.go b/commands/root.go index 01cbaa44..afe25ffa 100644 --- a/commands/root.go +++ b/commands/root.go @@ -52,6 +52,7 @@ func CommonCommands() []*console.Command { localCommands := []*console.Command{ binConsoleWrapper, composerWrapper, + pieWrapper, phpWrapper, bookCheckReqsCmd, bookCheckoutCmd, @@ -179,6 +180,7 @@ Environment variables to use Platform.sh/Upsun relationships or Docker services {{with .Command "composer"}} {{.PreferredName}}{{"\t"}}{{.Usage}}{{end}} {{with .Command "console"}} {{.PreferredName}}{{"\t"}}{{.Usage}}{{end}} {{with .Command "php"}} {{.PreferredName}}{{"\t"}}{{.Usage}}{{end}} +{{with .Command "pie"}} {{.PreferredName}}{{"\t"}}{{.Usage}}{{end}} ` } diff --git a/commands/wrappers.go b/commands/wrappers.go index 896e50ba..311472ee 100644 --- a/commands/wrappers.go +++ b/commands/wrappers.go @@ -37,6 +37,16 @@ var ( return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony composer"`)} }, } + pieWrapper = &console.Command{ + Usage: "Runs PIE", + Hidden: console.Hide, + // we use an alias to avoid the command being shown in the help but + // still be available for completion + Aliases: []*console.Alias{{Name: "pie"}}, + Action: func(c *console.Context) error { + return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony pie"`)} + }, + } binConsoleWrapper = &console.Command{ Usage: "Runs the Symfony Console (bin/console) for current project", Hidden: console.Hide, diff --git a/local/php/composer.go b/local/php/composer.go index 828bd420..a3b5de6e 100644 --- a/local/php/composer.go +++ b/local/php/composer.go @@ -20,7 +20,6 @@ package php import ( - "bufio" "bytes" "crypto/sha512" "encoding/hex" @@ -108,29 +107,6 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer, return ComposerResult{} } -// isPHPScript checks that the composer file is indeed a phar/PHP script (not a .bat file) -func isPHPScript(path string) bool { - if path == "" { - return false - } - file, err := os.Open(path) - if err != nil { - return false - } - defer file.Close() - reader := bufio.NewReader(file) - byteSlice, _, err := reader.ReadLine() - if err != nil { - return false - } - - if bytes.Equal(byteSlice, []byte(" + * + * This file is part of Symfony CLI project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package php + +import ( + "fmt" + "io" + "net/http" + "os" + "path/filepath" + + "github.com/pkg/errors" + "github.com/rs/zerolog" + "github.com/symfony-cli/symfony-cli/util" +) + +type PieResult struct { + code int + error error +} + +func (p PieResult) Error() string { + if p.error != nil { + return p.error.Error() + } + + return "" +} + +func (p PieResult) ExitCode() int { + return p.code +} + +func Pie(dir string, args, env []string, stdout, stderr, logger io.Writer, debugLogger zerolog.Logger) PieResult { + e := &Executor{ + Dir: dir, + BinName: "php", + Stdout: stdout, + Stderr: stderr, + SkipNbArgs: -1, + ExtraEnv: env, + Logger: debugLogger, + } + + if piePath := os.Getenv("SYMFONY_PIE_PATH"); piePath != "" { + debugLogger.Debug().Str("SYMFONY_PIE_PATH", piePath).Msg("SYMFONY_PIE_PATH has been defined. User is taking control over PIE detection and execution.") + e.Args = append([]string{piePath}, args...) + } else if path, err := e.findPie(); err == nil && isPHPScript(path) { + e.Args = append([]string{"php", path}, args...) + } else { + reason := "No PIE installation found." + if path != "" { + reason = fmt.Sprintf("Detected PIE file (%s) is not a valid PHAR or PHP script.", path) + } + fmt.Fprintln(logger, " WARNING:", reason) + fmt.Fprintln(logger, " Downloading PIE for you, but it is recommended to install PIE yourself, instructions available at https://github.com/php/pie") + // we don't store it under bin/ to avoid it being found by findPie as we want to only use it as a fallback + binDir := filepath.Join(util.GetHomeDir(), "pie") + if path, err = downloadPie(binDir); err != nil { + return PieResult{ + code: 1, + error: errors.Wrap(err, "unable to find pie, get it at https://github.com/php/pie"), + } + } + e.Args = append([]string{"php", path}, args...) + fmt.Fprintf(logger, " (running %s)\n\n", e.CommandLine()) + } + + ret := e.Execute(false) + if ret != 0 { + return PieResult{ + code: ret, + error: errors.Errorf("unable to run %s", e.CommandLine()), + } + } + return PieResult{} +} + +func findPie(logger zerolog.Logger) (string, error) { + for _, file := range []string{"pie", "pie.phar"} { + logger.Debug().Str("source", "PIE").Msgf(`Looking for PIE in the PATH as "%s"`, file) + if pharPath, _ := LookPath(file); pharPath != "" { + logger.Debug().Str("source", "PIE").Msgf(`Found potential PIE as "%s"`, pharPath) + return pharPath, nil + } + } + + return "", os.ErrNotExist +} + +func downloadPie(dir string) (string, error) { + if err := os.MkdirAll(dir, 0755); err != nil { + return "", err + } + path := filepath.Join(dir, "pie.phar") + if _, err := os.Stat(path); err == nil { + return path, nil + } + + piePhar, err := downloadPiePhar() + if err != nil { + return "", err + } + + err = os.WriteFile(path, piePhar, 0755) + if err != nil { + return "", err + } + + return path, nil +} + +func downloadPiePhar() ([]byte, error) { + resp, err := http.Get("https://github.com/php/pie/releases/latest/download/pie.phar") + if err != nil { + return nil, err + } + defer resp.Body.Close() + return io.ReadAll(resp.Body) +} diff --git a/local/php/utils.go b/local/php/utils.go new file mode 100644 index 00000000..860b73de --- /dev/null +++ b/local/php/utils.go @@ -0,0 +1,30 @@ +package php + +import ( + "bufio" + "bytes" + "os" +) + +// isPHPScript checks that the provided file is indeed a phar/PHP script (not a .bat file) +func isPHPScript(path string) bool { + if path == "" { + return false + } + file, err := os.Open(path) + if err != nil { + return false + } + defer file.Close() + reader := bufio.NewReader(file) + byteSlice, _, err := reader.ReadLine() + if err != nil { + return false + } + + if bytes.Equal(byteSlice, []byte("= 2 && args[1] == "composer" { - res := php.Composer("", args[2:], getCliExtraEnv(), os.Stdout, os.Stderr, os.Stderr, terminal.Logger) - terminal.Eprintln(res.Error()) - os.Exit(res.ExitCode()) + // called via "symfony composer" or "symfony pie"? + if len(args) >= 2 { + if args[1] == "composer" { + res := php.Composer("", args[2:], getCliExtraEnv(), os.Stdout, os.Stderr, os.Stderr, terminal.Logger) + terminal.Eprintln(res.Error()) + os.Exit(res.ExitCode()) + } + + if args[1] == "pie" { + res := php.Pie("", args[2:], getCliExtraEnv(), os.Stdout, os.Stderr, os.Stderr, terminal.Logger) + terminal.Eprintln(res.Error()) + os.Exit(res.ExitCode()) + } } for _, env := range []string{"BRANCH", "ENV", "APPLICATION_NAME"} { From 55429e90b13dc3c51b0099a769b8c0c8fca891d0 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sun, 30 Mar 2025 17:33:11 +0200 Subject: [PATCH 449/466] Upgrade to Go 1.24 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index c8601ccb..f73190e8 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/symfony-cli/symfony-cli -go 1.23.0 +go 1.24.0 toolchain go1.23.3 From 29da08a7158a5f043f478089c32991b2daeccfdc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 16:13:49 +0000 Subject: [PATCH 450/466] Update Docker Client version --- envs/docker_version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envs/docker_version.go b/envs/docker_version.go index 8b319b58..3ff27ab5 100644 --- a/envs/docker_version.go +++ b/envs/docker_version.go @@ -22,4 +22,4 @@ package envs -const dockerClientVersion = "v28.0.0" +const dockerClientVersion = "" From ef75dc7303b9325fa003bee3fcf4664d070ed54d Mon Sep 17 00:00:00 2001 From: Florent Huck Date: Wed, 2 Apr 2025 09:43:38 +0200 Subject: [PATCH 451/466] translate brand in the doctrine.server_version error message --- commands/doctrine_server_version_check.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/doctrine_server_version_check.go b/commands/doctrine_server_version_check.go index 1643b1b3..0350e2e3 100644 --- a/commands/doctrine_server_version_check.go +++ b/commands/doctrine_server_version_check.go @@ -69,11 +69,11 @@ The "%s" file defines a "%s" database service. When deploying, Doctrine needs to know the database version to determine the supported SQL syntax. -As the database is not available when Doctrine is warming up its cache on Platform.sh, +As the database is not available when Doctrine is warming up its cache on %s, you need to explicitly set the database version in the ".env" or "config/packages/doctrine.yaml" file. Set the "server_version" parameter to "%s" in "config/packages/doctrine.yaml". - `, configFile, dbName, dbVersion) + `, configFile, dbName, platformsh.GuessCloudFromDirectory(projectDir).Name, dbVersion) } return nil From a4d8968bc00ff192c5c121090674abd267b9ce27 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Wed, 2 Apr 2025 19:32:01 +0200 Subject: [PATCH 452/466] Run `go mod tidy` --- go.mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.mod b/go.mod index f73190e8..ad27bb1e 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/symfony-cli/symfony-cli go 1.24.0 -toolchain go1.23.3 - require ( github.com/NYTimes/gziphandler v1.1.1 github.com/blackfireio/osinfo v1.0.5 From 89df856233463d6c05785e698208f023e8ebd779 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 08:15:01 +0000 Subject: [PATCH 453/466] Update Docker Client version --- envs/docker_version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envs/docker_version.go b/envs/docker_version.go index 3ff27ab5..8b319b58 100644 --- a/envs/docker_version.go +++ b/envs/docker_version.go @@ -22,4 +22,4 @@ package envs -const dockerClientVersion = "" +const dockerClientVersion = "v28.0.0" From 97035d59e61d4a67bc9c64759554c38685bb7e94 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 14 Mar 2025 20:11:49 +0100 Subject: [PATCH 454/466] Initiate a contributing guide --- CONTRIBUTING.md | 148 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..f5928950 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,148 @@ +# Contributing + +This guide is meant to help you start contributing to the Symfony CLI by +providing some key hints and explaining specifics related to this project. + +## Language choice + +First-time contributors could be surprised by the fact that this project is +written in Go whereas it is highly related to the Symfony Framework which is +written in PHP. + +Go has been picked because it is well suited for system development and has +close-to-zero runtime dependencies which make releasing quite easy. This is +ideal for a tool that is used on a wide range of platforms and potentially on +systems where the requirements to run Symfony are not met. Go is also usually +quite easy to apprehend for PHP developers having some similarities in their +approach. + +## Setup Go + +Contributing to the CLI, implies that one must first setup Go locally on their +machine. Instructions are available on the official +[Go website](https://golang.org/dl). Just pick the latest version available: Go +will automatically download the version currently in use in the project and +dependencies as required. + +## Local setup + +First fork this repository and clone it in some location of your liking. Next, +try to build and run the project: + +```bash +$ go build . +``` + +If any error happen you must fix them before going on. If no error happen, this +should produce a binary in the project directory. By default, this binary is +named `symfony-cli` and suffixed with `.exe` on Windows. + +You should be able to run it right away: + +```bash +$ ./symfony-cli version +``` + +The binary is self-contained: you can copy it as-is to another system and/or +execute it without any installation process. + +> *Tip:* This binary can be executed from anywhere by using it's absolute path. +> This is handy during development when you need to run it in a project +> directory and you don't want to overwrite your system-wide Symfony CLI. + +Finally, before and after changing code you should ensure tests are passing: + +```bash +$ go test ./... +``` + +## Coding style + +The CLI follows the Go standard code formatting. To fix the code formatting one +can use the following command: + +```bash +$ go fmt ./... +``` + +One can also uses the `go vet` command in order to fix common mistakes: + +```bash +$ go vet ./... +``` + +## Cross compilation + +By definition, the CLI has to support multiple platforms which means that at +some point you might need to compile the code for another platform than the one +your are using to develop. + +This can be done using Go cross-platform compiling capabilities. For example +the following command will compile the CLI for Windows: + +```bash +$ GOOS=windows go build . +``` + +`GOOS` and `GOARCH` environment variables are used to target another OS or CPU +architecture, respectively. + +During development, please take into consideration (in particular in the +process and file management sections) that we currently support the following +platforms matrix: + +- Linux / 386 +- Linux / amd64 +- Linux / arm +- Linux / arm64 +- Darwin / amd64 +- Darwin / arm64 +- Windows / 386 +- Windows / amd64 + +## Code generation + +Part of the code is generated automatically. One should not need to regenerate +the code themselves because a GitHub Action is in-charge of it. In the +eventuality one would need to debug it, code generation can be run as follows: + +```bash +$ go generate ./... +``` + +If you add a new code generation command, please also update the GitHub +workflow in `.github/workflows/go_generate_update.yml`. + +## Additional repositories + +Contrary to the Symfony PHP Framework which is a mono-repository, the CLI +tool is developed in multiple repositories. `symfony-cli/symfony-cli` is the +main repository where lies most of the logic and is the only repository +producing a binary. + +Every other repository is mostly independent and it is highly unlikely that +you would need to have a look at them. However, in the eventuality where you +would have to, here is the description of each repository scope: +- `symfony-cli/phpstore` is a independent library in charge of the PHP + installations discovery and the logic to match a specific version to a given + version constraint. +- `symfony-cli/console` is a independent library created to ease the process + of Go command-line application. This library has been created with the goal + of mimicking the look and feel of the Symfony Console for the end-user. +- `symfony-cli/terminal` is a wrapper around the Input and Output in a command + line context. It provides helpers around styling (output formatters and + styling - à la Symfony) and interactivity (spinners and questions helpers) +- `symfony-cli/dumper` is a library similar to Symfony's VarDumper component + providing a `Dump` function useful to introspect variables content and + particularly useful in the strictly typed context of Go. + +If you ever have to work on those package, you can setup your local working +copy of the CLI to work with a local copy of one of those package by using +`go work`: + +```bash +$ go work init +$ go work use . +$ go work use /path/to/package/fork +# repeat last command for each package you want to work with +``` From b0a6cc115cfcdc4f33e7a7a959e381759739bf02 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 10 Apr 2025 15:31:03 +0200 Subject: [PATCH 455/466] Add PIE to the 'Work on a project locally' section --- commands/root.go | 1 + commands/wrappers.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/root.go b/commands/root.go index afe25ffa..9ad07404 100644 --- a/commands/root.go +++ b/commands/root.go @@ -145,6 +145,7 @@ func WelcomeAction(c *console.Context) error { localSecurityCheckCmd, composerWrapper, binConsoleWrapper, + pieWrapper, phpWrapper, }) terminal.Println("") diff --git a/commands/wrappers.go b/commands/wrappers.go index 311472ee..0e017136 100644 --- a/commands/wrappers.go +++ b/commands/wrappers.go @@ -38,7 +38,7 @@ var ( }, } pieWrapper = &console.Command{ - Usage: "Runs PIE", + Usage: "Runs PIE (PHP Installer for Extensions)", Hidden: console.Hide, // we use an alias to avoid the command being shown in the help but // still be available for completion From af6f6b7912bc7987e185035f723e3aaa633edfea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:15:06 +0000 Subject: [PATCH 456/466] Update latest available PHP version --- commands/php_version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/php_version.go b/commands/php_version.go index bd8da3c4..4a122bd7 100644 --- a/commands/php_version.go +++ b/commands/php_version.go @@ -23,4 +23,4 @@ package commands const LatestPhpMajorVersion = "8.4" -const LatestPhpMinorVersion = "8.4.5" +const LatestPhpMinorVersion = "8.4.6" From ed398647126fefe8739e7c05ea81f4a29bc3a12b Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sun, 13 Apr 2025 19:01:31 +0200 Subject: [PATCH 457/466] Merge `pieWrapper` into `phpWrapper` --- commands/root.go | 2 -- commands/wrappers.go | 14 +++----------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/commands/root.go b/commands/root.go index 9ad07404..606191ef 100644 --- a/commands/root.go +++ b/commands/root.go @@ -52,7 +52,6 @@ func CommonCommands() []*console.Command { localCommands := []*console.Command{ binConsoleWrapper, composerWrapper, - pieWrapper, phpWrapper, bookCheckReqsCmd, bookCheckoutCmd, @@ -145,7 +144,6 @@ func WelcomeAction(c *console.Context) error { localSecurityCheckCmd, composerWrapper, binConsoleWrapper, - pieWrapper, phpWrapper, }) terminal.Println("") diff --git a/commands/wrappers.go b/commands/wrappers.go index 0e017136..1326524b 100644 --- a/commands/wrappers.go +++ b/commands/wrappers.go @@ -37,16 +37,6 @@ var ( return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony composer"`)} }, } - pieWrapper = &console.Command{ - Usage: "Runs PIE (PHP Installer for Extensions)", - Hidden: console.Hide, - // we use an alias to avoid the command being shown in the help but - // still be available for completion - Aliases: []*console.Alias{{Name: "pie"}}, - Action: func(c *console.Context) error { - return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony pie"`)} - }, - } binConsoleWrapper = &console.Command{ Usage: "Runs the Symfony Console (bin/console) for current project", Hidden: console.Hide, @@ -65,12 +55,14 @@ var ( // still be available for completion Aliases: func() []*console.Alias { binNames := php.GetBinaryNames() - aliases := make([]*console.Alias, 0, len(binNames)) + aliases := make([]*console.Alias, 0, len(binNames)+1) for _, name := range php.GetBinaryNames() { aliases = append(aliases, &console.Alias{Name: name}) } + aliases = append(aliases, &console.Alias{Name: "pie"}) + return aliases }(), Action: func(c *console.Context) error { From 81aa25adae89f701150df65e586f5663e019a10d Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sun, 13 Apr 2025 13:12:09 -0400 Subject: [PATCH 458/466] Apply suggestions from code review Co-authored-by: Fabien Potencier --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5928950..cea8a82b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,7 @@ dependencies as required. ## Local setup -First fork this repository and clone it in some location of your liking. Next, +First fork this repository and clone it to some location of your liking. Next, try to build and run the project: ```bash @@ -123,10 +123,10 @@ producing a binary. Every other repository is mostly independent and it is highly unlikely that you would need to have a look at them. However, in the eventuality where you would have to, here is the description of each repository scope: -- `symfony-cli/phpstore` is a independent library in charge of the PHP +- `symfony-cli/phpstore` is an independent library in charge of the PHP installations discovery and the logic to match a specific version to a given version constraint. -- `symfony-cli/console` is a independent library created to ease the process +- `symfony-cli/console` is an independent library created to ease the process of Go command-line application. This library has been created with the goal of mimicking the look and feel of the Symfony Console for the end-user. - `symfony-cli/terminal` is a wrapper around the Input and Output in a command From cbea35ab69993081b8fd1109ca56dbaeacac4a14 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Sun, 13 Apr 2025 19:14:42 +0200 Subject: [PATCH 459/466] - --- CONTRIBUTING.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cea8a82b..f8ec4a7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,9 +12,14 @@ written in PHP. Go has been picked because it is well suited for system development and has close-to-zero runtime dependencies which make releasing quite easy. This is ideal for a tool that is used on a wide range of platforms and potentially on -systems where the requirements to run Symfony are not met. Go is also usually -quite easy to apprehend for PHP developers having some similarities in their -approach. +systems where the requirements to run Symfony are not met. + +Another reason is to make Symfony CLI independent of the PHP version because +one goal of the CLI is to make it possible to use many different versions of +PHP. + +Finally, Go is also usually quite easy to apprehend for PHP developers having +some similarities in their approach. ## Setup Go From f4c0f63ca8b9ad509427d9abc2232af32797fd97 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 08:15:41 +0000 Subject: [PATCH 460/466] Update supported Platform.sh services --- local/platformsh/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/platformsh/config.go b/local/platformsh/config.go index 0c83ebfe..40e42bb0 100644 --- a/local/platformsh/config.go +++ b/local/platformsh/config.go @@ -233,7 +233,7 @@ var availableServices = []*service{ Type: "rabbitmq", Versions: serviceVersions{ Deprecated: []string{"3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"}, - Supported: []string{"3.12", "3.13", "4.0"}, + Supported: []string{"3.12", "3.13", "4.0", "4.1"}, }, }, { From 2bbc8bccaf7663d65f2e708d4ab8d3bf6f143f04 Mon Sep 17 00:00:00 2001 From: Florian Pfitzer Date: Sun, 4 May 2025 11:34:41 +0200 Subject: [PATCH 461/466] Update Mercure container check to use substring matching for full container image --- envs/docker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/envs/docker.go b/envs/docker.go index ddd34de7..63ecdd21 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -442,7 +442,8 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ "scheme": "kafka", } return rels - } else if p.PrivatePort == 80 && container.Image == "dunglas/mercure" { + } else if p.PrivatePort == 80 && strings.Contains(container.Image, "dunglas/mercure") { + // for podman the image name is docker.io/dunglas/mercure:latest rels[""] = map[string]interface{}{ "host": host, "ip": host, From 108f02148b08a360e03da8a9e2dac48ad07fceba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 12:23:44 +0000 Subject: [PATCH 462/466] Update supported Platform.sh services --- local/platformsh/commands.go | 53 ++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/local/platformsh/commands.go b/local/platformsh/commands.go index d2a6dcdc..56b8f13f 100644 --- a/local/platformsh/commands.go +++ b/local/platformsh/commands.go @@ -65,6 +65,22 @@ var Commands = []*console.Command{ }, Usage: "Clear the CLI cache", }, + { + Category: "cloud", + Name: "console", + Aliases: []*console.Alias{ + {Name: "upsun:console", Hidden: true}, + {Name: "cloud:web"}, + {Name: "upsun:web", Hidden: true}, + }, + Usage: "Open the project in the Console", + Flags: []console.Flag{ + &console.StringFlag{Name: "browser"}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.BoolFlag{Name: "pipe"}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + }, + }, { Category: "cloud", Name: "docs", @@ -103,20 +119,6 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "sort", DefaultValue: "title"}, }, }, - { - Category: "cloud", - Name: "web", - Aliases: []*console.Alias{ - {Name: "upsun:web", Hidden: true}, - }, - Usage: "Open the project in the Web Console", - Flags: []console.Flag{ - &console.StringFlag{Name: "browser"}, - &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, - &console.BoolFlag{Name: "pipe"}, - &console.StringFlag{Name: "project", Aliases: []string{"p"}}, - }, - }, { Category: "cloud", Name: "welcome", @@ -246,6 +248,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"}}, &console.BoolFlag{Name: "include", Aliases: []string{"i"}}, &console.StringFlag{Name: "json"}, + &console.BoolFlag{Name: "no-retry-401"}, &console.StringFlag{Name: "request", Aliases: []string{"X"}}, }, }, @@ -826,6 +829,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"}}, &console.BoolFlag{Name: "include", Aliases: []string{"i"}}, &console.StringFlag{Name: "json"}, + &console.BoolFlag{Name: "no-retry-401"}, &console.StringFlag{Name: "project", Aliases: []string{"p"}}, &console.StringFlag{Name: "request", Aliases: []string{"X"}}, }, @@ -1502,6 +1506,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"}}, &console.BoolFlag{Name: "include", Aliases: []string{"i"}}, &console.StringFlag{Name: "json"}, + &console.BoolFlag{Name: "no-retry-401"}, &console.StringFlag{Name: "project", Aliases: []string{"p"}}, &console.StringFlag{Name: "request", Aliases: []string{"X"}}, }, @@ -1739,6 +1744,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"}}, &console.BoolFlag{Name: "include", Aliases: []string{"i"}}, &console.StringFlag{Name: "json"}, + &console.BoolFlag{Name: "no-retry-401"}, &console.StringFlag{Name: "org", Aliases: []string{"o"}}, &console.StringFlag{Name: "project", Aliases: []string{"p"}}, &console.StringFlag{Name: "request", Aliases: []string{"X"}}, @@ -1970,6 +1976,7 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "header", Aliases: []string{"H"}}, &console.BoolFlag{Name: "include", Aliases: []string{"i"}}, &console.StringFlag{Name: "json"}, + &console.BoolFlag{Name: "no-retry-401"}, &console.StringFlag{Name: "project", Aliases: []string{"p"}}, &console.StringFlag{Name: "request", Aliases: []string{"X"}}, }, @@ -2392,6 +2399,24 @@ var Commands = []*console.Command{ &console.StringFlag{Name: "relationship", Aliases: []string{"r"}}, }, }, + { + Category: "cloud:service", + Name: "valkey-cli", + Aliases: []*console.Alias{ + {Name: "service:valkey-cli", Hidden: true}, + {Name: "upsun:service:valkey-cli", Hidden: true}, + {Name: "cloud:valkey"}, + {Name: "upsun:valkey", Hidden: true}, + {Name: "valkey", Hidden: true}, + }, + Usage: "Access the Valkey CLI", + Flags: []console.Flag{ + &console.StringFlag{Name: "app", Aliases: []string{"A"}}, + &console.StringFlag{Name: "environment", Aliases: []string{"e"}}, + &console.StringFlag{Name: "project", Aliases: []string{"p"}}, + &console.StringFlag{Name: "relationship", Aliases: []string{"r"}}, + }, + }, { Category: "cloud:session", Name: "switch", From 1dce4a5280ecc91a481b614f05e831bc9c58b0e2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 16:14:45 +0000 Subject: [PATCH 463/466] Update latest available PHP version --- commands/php_version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/php_version.go b/commands/php_version.go index 4a122bd7..7df9b51a 100644 --- a/commands/php_version.go +++ b/commands/php_version.go @@ -23,4 +23,4 @@ package commands const LatestPhpMajorVersion = "8.4" -const LatestPhpMinorVersion = "8.4.6" +const LatestPhpMinorVersion = "8.4.7" From e62ce3e2cf9f285b422c7d1d4f2166a658dae21c Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 9 May 2025 14:14:11 +0200 Subject: [PATCH 464/466] chore: fix Docker Deprecations --- envs/docker.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/envs/docker.go b/envs/docker.go index 63ecdd21..169357ff 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -36,7 +36,6 @@ import ( compose "github.com/compose-spec/compose-go/cli" composeConsts "github.com/compose-spec/compose-go/consts" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" docker "github.com/docker/docker/client" "github.com/symfony-cli/terminal" @@ -53,7 +52,7 @@ func ComputeDockerUserAgent(appName, appVersion string) { dockerUserAgent = fmt.Sprintf("Docker-Client/%s %s/%s", dockerClientVersion, appName, appVersion) } -type sortedPorts []types.Port +type sortedPorts []container.Port func (ps sortedPorts) Len() int { return len(ps) } func (ps sortedPorts) Swap(i, j int) { ps[i], ps[j] = ps[j], ps[i] } @@ -148,7 +147,7 @@ func (l *Local) RelationshipsFromDocker() Relationships { return relationships } -func (l *Local) dockerServiceToRelationship(client *docker.Client, container types.Container) map[string]map[string]interface{} { +func (l *Local) dockerServiceToRelationship(client *docker.Client, container container.Summary) map[string]map[string]interface{} { if l.Debug { fmt.Fprintf(os.Stderr, `found Docker container "%s" for project "%s" (image "%s")`+"\n", container.Labels["com.docker.compose.service"], container.Labels["com.docker.compose.project"], container.Image) } From dae0f1bd8e1c7c221c50fff606baf9ce24895e61 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 9 May 2025 14:21:20 +0200 Subject: [PATCH 465/466] chore: fix http.Transport deprecation `http.Transport.Dial` has been deprecated since Go 1.7 --- local/proxy/proxy.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/local/proxy/proxy.go b/local/proxy/proxy.go index c66b9e22..50bfc571 100644 --- a/local/proxy/proxy.go +++ b/local/proxy/proxy.go @@ -54,12 +54,12 @@ func tlsToLocalWebServer(proxy *goproxy.ProxyHttpServer, tlsConfig *tls.Config, ctx.Warnf("Error closing client connection: %s", err) } } - connectDial := func(proxy *goproxy.ProxyHttpServer, network, addr string) (c net.Conn, err error) { - if proxy.ConnectDial != nil { + connectDial := func(ctx *goproxy.ProxyCtx, network, addr string) (c net.Conn, err error) { + if ctx.Proxy.ConnectDial != nil { return proxy.ConnectDial(network, addr) } - if proxy.Tr.Dial != nil { - return proxy.Tr.Dial(network, addr) + if ctx.Proxy.Tr.DialContext != nil { + return proxy.Tr.DialContext(ctx.Req.Context(), network, addr) } return net.Dial(network, addr) } @@ -91,7 +91,7 @@ func tlsToLocalWebServer(proxy *goproxy.ProxyHttpServer, tlsConfig *tls.Config, } ctx.Logf("Assuming CONNECT is TLS, TLS proxying it") - targetSiteCon, err := connectDial(proxy, "tcp", fmt.Sprintf("127.0.0.1:%d", localPort)) + targetSiteCon, err := connectDial(ctx, "tcp", fmt.Sprintf("127.0.0.1:%d", localPort)) if err != nil { httpError(proxyClientTls, ctx, err) if targetSiteCon != nil { From 53885b81c2889af66100de80ca2e3c09fca8d0de Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Fri, 9 May 2025 14:34:04 +0200 Subject: [PATCH 466/466] chore: fix unconditionnal returns This can be the sign of a bug (likely the case for PSH-related code) See https://staticcheck.dev/docs/checks#SA4004 --- envs/docker.go | 502 ++++++++++++++++++------------------ envs/local.go | 6 +- local/platformsh/project.go | 1 - 3 files changed, 255 insertions(+), 254 deletions(-) diff --git a/envs/docker.go b/envs/docker.go index 63ecdd21..6397d452 100644 --- a/envs/docker.go +++ b/envs/docker.go @@ -204,278 +204,280 @@ func (l *Local) dockerServiceToRelationship(client *docker.Client, container typ } } + if len(exposedPorts) < 1 { + return nil + } + sort.Sort(exposedPorts) - for _, p := range exposedPorts { - rels := make(map[string]map[string]interface{}) - if p.PrivatePort == 1025 { - // recommended image: sj26/mailcatcher or axllent/mailpit (default now) - for _, pw := range exposedPorts { - if pw.PrivatePort == 1080 || pw.PrivatePort == 8025 { - rels["-web"] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(pw.PublicPort), - "rel": "mailer", - "scheme": "http", - } - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "rel": "mailer", - "scheme": "smtp", - } - return rels + p := exposedPorts[0] + + rels := make(map[string]map[string]interface{}) + if p.PrivatePort == 1025 { + // recommended image: sj26/mailcatcher or axllent/mailpit (default now) + for _, pw := range exposedPorts { + if pw.PrivatePort == 1080 || pw.PrivatePort == 8025 { + rels["-web"] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(pw.PublicPort), + "rel": "mailer", + "scheme": "http", } - } - } else if p.PrivatePort == 25 { - // recommended image: djfarrelly/maildev - for _, pw := range exposedPorts { - if pw.PrivatePort == 80 { - rels["-web"] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(pw.PublicPort), - "rel": "mailer", - "scheme": "http", - } - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "rel": "mailer", - "scheme": "smtp", - } - return rels + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "rel": "mailer", + "scheme": "smtp", } + return rels } - } else if p.PrivatePort == 8707 || p.PrivatePort == 8307 { - // Blackfire - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "rel": "blackfire", - "scheme": "tcp", - } - return rels - } else if p.PrivatePort == 3306 { - username := "" - password := "" - path := "" - version := "" - // MARIADB is used by bitnami/mariadb - for _, prefix := range []string{"MYSQL", "MARIADB"} { - for _, env := range c.Config.Env { - if strings.HasPrefix(env, prefix+"_ROOT_PASSWORD") && password == "" { - // *_PASSWORD has precedence over *_ROOT_PASSWORD - password = getEnvValue(env, prefix+"_ROOT_PASSWORD") - username = "root" - } else if strings.HasPrefix(env, prefix+"_USER") { - username = getEnvValue(env, prefix+"_USER") - } else if strings.HasPrefix(env, prefix+"_PASSWORD") { - password = getEnvValue(env, prefix+"_PASSWORD") - } else if strings.HasPrefix(env, prefix+"_DATABASE") { - path = getEnvValue(env, prefix+"_DATABASE") - } else if strings.HasPrefix(env, prefix+"_VERSION") { - version = getEnvValue(env, prefix+"_VERSION") - } + } + } else if p.PrivatePort == 25 { + // recommended image: djfarrelly/maildev + for _, pw := range exposedPorts { + if pw.PrivatePort == 80 { + rels["-web"] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(pw.PublicPort), + "rel": "mailer", + "scheme": "http", } - } - if path == "" { - path = username - } - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "username": username, - "password": password, - "path": path, - "version": version, - "port": formatDockerPort(p.PublicPort), - "query": map[string]bool{ - "is_master": true, - }, - "rel": "mysql", - "scheme": "mysql", - } - return rels - } else if p.PrivatePort == 5432 { - username := "" - password := "" - path := "" - version := "" - for _, env := range c.Config.Env { - if strings.HasPrefix(env, "POSTGRES_USER") { - username = getEnvValue(env, "POSTGRES_USER") - } else if strings.HasPrefix(env, "POSTGRES_PASSWORD") { - password = getEnvValue(env, "POSTGRES_PASSWORD") - } else if strings.HasPrefix(env, "POSTGRES_DB") { - path = getEnvValue(env, "POSTGRES_DB") - } else if strings.HasPrefix(env, "PG_VERSION") { - version = getEnvValue(env, "PG_VERSION") + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "rel": "mailer", + "scheme": "smtp", } + return rels } - if path == "" { - path = username - } - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "username": username, - "password": password, - "path": path, - "version": version, - "port": formatDockerPort(p.PublicPort), - "query": map[string]bool{ - "is_master": true, - }, - "rel": "pgsql", - "scheme": "pgsql", - } - return rels - } else if p.PrivatePort == 6379 { - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "rel": "redis", - "scheme": "redis", - } - return rels - } else if p.PrivatePort == 11211 { - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "rel": "memcached", - "scheme": "memcached", - } - return rels - } else if p.PrivatePort == 5672 { - username := "guest" - password := "guest" + } + } else if p.PrivatePort == 8707 || p.PrivatePort == 8307 { + // Blackfire + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "rel": "blackfire", + "scheme": "tcp", + } + return rels + } else if p.PrivatePort == 3306 { + username := "" + password := "" + path := "" + version := "" + // MARIADB is used by bitnami/mariadb + for _, prefix := range []string{"MYSQL", "MARIADB"} { for _, env := range c.Config.Env { - // that's our local convention - if strings.HasPrefix(env, "RABBITMQ_DEFAULT_USER") { - username = getEnvValue(env, "RABBITMQ_DEFAULT_USER") - } else if strings.HasPrefix(env, "RABBITMQ_DEFAULT_PASS") { - password = getEnvValue(env, "RABBITMQ_DEFAULT_PASS") - } - } - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "username": username, - "password": password, - "rel": "amqp", - "scheme": "amqp", - } - // management plugin? - for _, pw := range exposedPorts { - if pw.PrivatePort == 15672 { - rels["-management"] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(pw.PublicPort), - "rel": "amqp", - "scheme": "http", - } - break + if strings.HasPrefix(env, prefix+"_ROOT_PASSWORD") && password == "" { + // *_PASSWORD has precedence over *_ROOT_PASSWORD + password = getEnvValue(env, prefix+"_ROOT_PASSWORD") + username = "root" + } else if strings.HasPrefix(env, prefix+"_USER") { + username = getEnvValue(env, prefix+"_USER") + } else if strings.HasPrefix(env, prefix+"_PASSWORD") { + password = getEnvValue(env, prefix+"_PASSWORD") + } else if strings.HasPrefix(env, prefix+"_DATABASE") { + path = getEnvValue(env, prefix+"_DATABASE") + } else if strings.HasPrefix(env, prefix+"_VERSION") { + version = getEnvValue(env, prefix+"_VERSION") } } - return rels - } else if p.PrivatePort == 9200 { - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "path": "/", - "rel": "elasticsearch", - "scheme": "http", + } + if path == "" { + path = username + } + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "username": username, + "password": password, + "path": path, + "version": version, + "port": formatDockerPort(p.PublicPort), + "query": map[string]bool{ + "is_master": true, + }, + "rel": "mysql", + "scheme": "mysql", + } + return rels + } else if p.PrivatePort == 5432 { + username := "" + password := "" + path := "" + version := "" + for _, env := range c.Config.Env { + if strings.HasPrefix(env, "POSTGRES_USER") { + username = getEnvValue(env, "POSTGRES_USER") + } else if strings.HasPrefix(env, "POSTGRES_PASSWORD") { + password = getEnvValue(env, "POSTGRES_PASSWORD") + } else if strings.HasPrefix(env, "POSTGRES_DB") { + path = getEnvValue(env, "POSTGRES_DB") + } else if strings.HasPrefix(env, "PG_VERSION") { + version = getEnvValue(env, "PG_VERSION") } - return rels - } else if p.PrivatePort == 5601 { - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "path": "/", - "rel": "kibana", - "scheme": "http", + } + if path == "" { + path = username + } + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "username": username, + "password": password, + "path": path, + "version": version, + "port": formatDockerPort(p.PublicPort), + "query": map[string]bool{ + "is_master": true, + }, + "rel": "pgsql", + "scheme": "pgsql", + } + return rels + } else if p.PrivatePort == 6379 { + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "rel": "redis", + "scheme": "redis", + } + return rels + } else if p.PrivatePort == 11211 { + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "rel": "memcached", + "scheme": "memcached", + } + return rels + } else if p.PrivatePort == 5672 { + username := "guest" + password := "guest" + for _, env := range c.Config.Env { + // that's our local convention + if strings.HasPrefix(env, "RABBITMQ_DEFAULT_USER") { + username = getEnvValue(env, "RABBITMQ_DEFAULT_USER") + } else if strings.HasPrefix(env, "RABBITMQ_DEFAULT_PASS") { + password = getEnvValue(env, "RABBITMQ_DEFAULT_PASS") } - return rels - } else if p.PrivatePort == 27017 || p.PrivatePort == 27018 || p.PrivatePort == 27019 { - username := "" - password := "" - path := "" - for _, env := range c.Config.Env { - // that's our local convention - if strings.HasPrefix(env, "MONGO_DATABASE") { - path = getEnvValue(env, "MONGO_DATABASE") - } else if strings.HasPrefix(env, "MONGO_INITDB_DATABASE") { - path = getEnvValue(env, "MONGO_INITDB_DATABASE") - } else if strings.HasPrefix(env, "MONGO_INITDB_ROOT_USERNAME") { - username = getEnvValue(env, "MONGO_INITDB_ROOT_USERNAME") - } else if strings.HasPrefix(env, "MONGO_INITDB_ROOT_PASSWORD") { - password = getEnvValue(env, "MONGO_INITDB_ROOT_PASSWORD") + } + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "username": username, + "password": password, + "rel": "amqp", + "scheme": "amqp", + } + // management plugin? + for _, pw := range exposedPorts { + if pw.PrivatePort == 15672 { + rels["-management"] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(pw.PublicPort), + "rel": "amqp", + "scheme": "http", } + break } - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "username": username, - "password": password, - "path": path, - "port": formatDockerPort(p.PublicPort), - "rel": "mongodb", - "scheme": "mongodb", - } - return rels - } else if p.PrivatePort == 9092 { - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "rel": "kafka", - "scheme": "kafka", - } - return rels - } else if p.PrivatePort == 80 && strings.Contains(container.Image, "dunglas/mercure") { - // for podman the image name is docker.io/dunglas/mercure:latest - rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "rel": "mercure", - "scheme": "http", + } + return rels + } else if p.PrivatePort == 9200 { + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "path": "/", + "rel": "elasticsearch", + "scheme": "http", + } + return rels + } else if p.PrivatePort == 5601 { + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "path": "/", + "rel": "kibana", + "scheme": "http", + } + return rels + } else if p.PrivatePort == 27017 || p.PrivatePort == 27018 || p.PrivatePort == 27019 { + username := "" + password := "" + path := "" + for _, env := range c.Config.Env { + // that's our local convention + if strings.HasPrefix(env, "MONGO_DATABASE") { + path = getEnvValue(env, "MONGO_DATABASE") + } else if strings.HasPrefix(env, "MONGO_INITDB_DATABASE") { + path = getEnvValue(env, "MONGO_INITDB_DATABASE") + } else if strings.HasPrefix(env, "MONGO_INITDB_ROOT_USERNAME") { + username = getEnvValue(env, "MONGO_INITDB_ROOT_USERNAME") + } else if strings.HasPrefix(env, "MONGO_INITDB_ROOT_PASSWORD") { + password = getEnvValue(env, "MONGO_INITDB_ROOT_PASSWORD") } - return rels } - - if l.Debug { - fmt.Fprintln(os.Stderr, " exposing port") + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "username": username, + "password": password, + "path": path, + "port": formatDockerPort(p.PublicPort), + "rel": "mongodb", + "scheme": "mongodb", } - + return rels + } else if p.PrivatePort == 9092 { rels[""] = map[string]interface{}{ - "host": host, - "ip": host, - "port": formatDockerPort(p.PublicPort), - "rel": "simple", - } - // Official HTTP(s) ports or well know alternatives - if p.PrivatePort == 80 || p.PrivatePort == 8008 || p.PrivatePort == 8080 || p.PrivatePort == 8081 { - rels[""]["scheme"] = "http" - } else if p.PrivatePort == 443 || p.PrivatePort == 8443 { - rels[""]["scheme"] = "https" - } else { - rels[""]["scheme"] = "tcp" + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "rel": "kafka", + "scheme": "kafka", + } + return rels + } else if p.PrivatePort == 80 && strings.Contains(container.Image, "dunglas/mercure") { + // for podman the image name is docker.io/dunglas/mercure:latest + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "rel": "mercure", + "scheme": "http", } return rels } - return nil + if l.Debug { + fmt.Fprintln(os.Stderr, " exposing port") + } + + rels[""] = map[string]interface{}{ + "host": host, + "ip": host, + "port": formatDockerPort(p.PublicPort), + "rel": "simple", + } + // Official HTTP(s) ports or well know alternatives + if p.PrivatePort == 80 || p.PrivatePort == 8008 || p.PrivatePort == 8080 || p.PrivatePort == 8081 { + rels[""]["scheme"] = "http" + } else if p.PrivatePort == 443 || p.PrivatePort == 8443 { + rels[""]["scheme"] = "https" + } else { + rels[""]["scheme"] = "tcp" + } + return rels } func formatDockerPort(port uint16) string { diff --git a/envs/local.go b/envs/local.go index 2eee8089..46f5a3bc 100644 --- a/envs/local.go +++ b/envs/local.go @@ -259,15 +259,15 @@ func (l *Local) webServer() Envs { host := fmt.Sprintf("127.0.0.1:%s", port) if proxyConf, err := proxy.Load(util.GetHomeDir()); err == nil { - for _, domain := range proxyConf.GetDomains(l.Dir) { + domains := proxyConf.GetDomains(l.Dir) + if len(domains) > 0 { // we get the first one only - host = domain + host = domains[0] if pidFile.Scheme == "http" { port = "80" } else { port = "443" } - break } } diff --git a/local/platformsh/project.go b/local/platformsh/project.go index b9ff4c98..cffd7464 100644 --- a/local/platformsh/project.go +++ b/local/platformsh/project.go @@ -136,7 +136,6 @@ func getProjectIDFromGitConfig(brand CloudBrand, projectRoot string, debug bool) if len(matches) > 1 { return string(matches[1]) } - return "" } if debug { fmt.Fprintf(os.Stderr, "ERROR: unable to read the git config file\n")