diff --git a/changelog.md b/changelog.md index c55031feed..c6eb124d2f 100644 --- a/changelog.md +++ b/changelog.md @@ -37,6 +37,7 @@ - [#4189](https://github.com/ignite/cli/pull/4189) Deprecate `ignite node` for `ignite connect` app - [#4290](https://github.com/ignite/cli/pull/4290) Remove ignite ics logic from ignite cli (this functionality will be in the `consumer` app) - [#4295](https://github.com/ignite/cli/pull/4295) Stop scaffolding `pulsar` files +- [#4317](https://github.com/ignite/cli/pull/4317) Remove xchisel dependency ### Fixes diff --git a/go.mod b/go.mod index 37fb48a1e9..35c52b4040 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,6 @@ require ( github.com/iancoleman/strcase v0.3.0 github.com/ignite/web v0.6.1 github.com/imdario/mergo v0.3.13 - github.com/jpillora/chisel v1.9.1 github.com/lib/pq v1.10.9 github.com/manifoldco/promptui v0.9.0 github.com/mitchellh/mapstructure v1.5.0 @@ -124,9 +123,7 @@ require ( github.com/alexkohler/nakedret/v2 v2.0.4 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect - github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect - github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/ashanbrown/forbidigo v1.6.0 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect @@ -306,10 +303,6 @@ require ( github.com/jjti/go-spancheck v0.6.2 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/josharian/intern v1.0.0 // indirect - github.com/jpillora/ansi v1.0.3 // indirect - github.com/jpillora/backoff v1.0.0 // indirect - github.com/jpillora/requestlog v1.0.0 // indirect - github.com/jpillora/sizestr v1.0.0 // indirect github.com/julz/importas v0.1.0 // indirect github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect @@ -433,7 +426,6 @@ require ( github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect github.com/timonwong/loggercheck v0.9.4 // indirect github.com/tomarrell/wrapcheck/v2 v2.9.0 // indirect - github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/ultraware/funlen v0.1.0 // indirect diff --git a/go.sum b/go.sum index ae1f71ea0f..44b095c9e5 100644 --- a/go.sum +++ b/go.sum @@ -129,8 +129,6 @@ github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pO github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= -github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2 h1:axBiC50cNZOs7ygH5BgQp4N+aYrZ2DNpWZ1KG3VOSOM= -github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2/go.mod h1:jnzFpU88PccN/tPPhCpnNU8mZphvKxYM9lLNkd8e+os= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -874,16 +872,7 @@ github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/ansi v1.0.3 h1:nn4Jzti0EmRfDxm7JtEs5LzCbNwd5sv+0aE+LdS9/ZQ= -github.com/jpillora/ansi v1.0.3/go.mod h1:D2tT+6uzJvN1nBVQILYWkIdq7zG+b5gcFN5WI/VyjMY= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/jpillora/chisel v1.9.1 h1:nGOF58+45WHlvDcq6AZu7En8nWOBCZHqj9boo5rB4qU= -github.com/jpillora/chisel v1.9.1/go.mod h1:qvgGfFR9ZhiDoYJM4IM1omX1HLbQSkZag8miP9u4SsQ= -github.com/jpillora/requestlog v1.0.0 h1:bg++eJ74T7DYL3DlIpiwknrtfdUA9oP/M4fL+PpqnyA= -github.com/jpillora/requestlog v1.0.0/go.mod h1:HTWQb7QfDc2jtHnWe2XEIEeJB7gJPnVdpNn52HXPvy8= -github.com/jpillora/sizestr v1.0.0 h1:4tr0FLxs1Mtq3TnsLDV+GYUWG7Q26a6s+tV5Zfw2ygw= -github.com/jpillora/sizestr v1.0.0/go.mod h1:bUhLv4ctkknatr6gR42qPxirmd5+ds1u7mzD+MZ33f0= 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/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -1413,8 +1402,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tomarrell/wrapcheck/v2 v2.9.0 h1:801U2YCAjLhdN8zhZ/7tdjB3EnAoRlJHt/s+9hijLQ4= github.com/tomarrell/wrapcheck/v2 v2.9.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= -github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce h1:fb190+cK2Xz/dvi9Hv8eCYJYvIGUTN2/KLq1pT6CjEc= -github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= diff --git a/ignite/pkg/xchisel/xchisel.go b/ignite/pkg/xchisel/xchisel.go deleted file mode 100644 index b77cf387ec..0000000000 --- a/ignite/pkg/xchisel/xchisel.go +++ /dev/null @@ -1,58 +0,0 @@ -package xchisel - -import ( - "context" - "fmt" - "os" - "time" - - chclient "github.com/jpillora/chisel/client" - chserver "github.com/jpillora/chisel/server" - - "github.com/ignite/cli/v29/ignite/pkg/errors" -) - -var DefaultServerPort = "7575" - -func ServerAddr() string { - return os.Getenv("CHISEL_ADDR") -} - -func IsEnabled() bool { - return ServerAddr() != "" -} - -func StartServer(ctx context.Context, port string) error { - s, err := chserver.NewServer(&chserver.Config{}) - if err != nil { - return err - } - if err := s.StartContext(ctx, "127.0.0.1", port); err != nil { - return err - } - if err = s.Wait(); errors.Is(err, context.Canceled) { - return nil - } - return err -} - -func StartClient(ctx context.Context, serverAddr, localPort, remotePort string) error { - c, err := chclient.NewClient(&chclient.Config{ - MaxRetryInterval: time.Second, - MaxRetryCount: -1, - Server: serverAddr, - Remotes: []string{fmt.Sprintf("127.0.0.1:%s:127.0.0.1:%s", localPort, remotePort)}, - }) - if err != nil { - return err - } - c.Logger.Info = false - c.Logger.Debug = false - if err := c.Start(ctx); err != nil { - return err - } - if err = c.Wait(); errors.Is(err, context.Canceled) { - return nil - } - return err -}