Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move network command into a plugin #3306

Merged
merged 42 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f2dc442
wip: remove network cmd declaration
tbruyelle Nov 24, 2022
f6110ed
fix: allow plugin.Use to have more than one word
tbruyelle Nov 24, 2022
f1c3ae5
fix missing feed OSArg
tbruyelle Nov 25, 2022
261b885
remove appd start-with-http-tunneling command
tbruyelle Dec 2, 2022
25b5b4c
comment
tbruyelle Dec 5, 2022
464831f
chore: remove spn dependency from cli
tbruyelle Dec 6, 2022
eca6640
attempt to add legacy plugin command
tbruyelle Dec 9, 2022
63c7c7b
fix after rebase
tbruyelle Dec 14, 2022
38da0b4
Merge branch 'main' into feat/network-plugin
tbruyelle Dec 15, 2022
7083ae6
feat: add plugin proxy command for default plugins
tbruyelle Dec 15, 2022
b28a172
Merge branch 'main' into feat/network-plugin
tbruyelle Dec 15, 2022
a9ad9aa
test: add case for ensureDefaultPlugins
tbruyelle Dec 15, 2022
b54afd2
test: add for Config.HasPlugin
tbruyelle Dec 15, 2022
2a3baee
chore: add comment
tbruyelle Dec 15, 2022
d9b5716
add CL
tbruyelle Dec 15, 2022
df0912f
fix linter
tbruyelle Dec 15, 2022
5777063
fix: plugin add doesn't kill the plugin on stop
tbruyelle Dec 15, 2022
14717a8
Merge branch 'main' into feat/network-plugin
tbruyelle Dec 16, 2022
dc2f742
Merge branch 'main' into feat/network-plugin
tbruyelle Dec 16, 2022
3ed35f7
docs: move CL entry to changes
tbruyelle Dec 16, 2022
bcbcd1d
fix network integration tests
tbruyelle Dec 16, 2022
49d8ab9
Merge branch 'main' into feat/network-plugin
tbruyelle Dec 16, 2022
198d265
fix lint
tbruyelle Dec 16, 2022
5571a0a
Merge branch 'main' into feat/network-plugin
tbruyelle Dec 17, 2022
8520db0
Merge branch 'main' into feat/network-plugin
Dec 17, 2022
2804e47
Merge branch 'main' into feat/network-plugin
Dec 18, 2022
f0fe54c
Merge branch 'main' into feat/network-plugin
Dec 18, 2022
b5fdafc
Merge branch 'main' into feat/network-plugin
Dec 19, 2022
4f9f433
Merge branch 'main' into feat/network-plugin
Pantani Dec 19, 2022
df95a2e
Merge branch 'main' into feat/network-plugin
tbruyelle Dec 27, 2022
e3c5068
set networl plugin version after merge
tbruyelle Dec 27, 2022
2a79712
add network plugin command to gen-cli-docs
tbruyelle Dec 30, 2022
e77c11e
fix linter
tbruyelle Dec 31, 2022
8b1af57
Merge branch 'main' into feat/network-plugin
tbruyelle Jan 3, 2023
73e7571
fix test
tbruyelle Jan 3, 2023
3ee3b0b
Merge branch 'main' into feat/network-plugin
Jan 3, 2023
48ac517
Merge branch 'main' into feat/network-plugin
Jan 4, 2023
1927c60
fix: pass events.Bus to plugin.Load
tbruyelle Jan 4, 2023
59c3a63
Merge branch 'main' into feat/network-plugin
tbruyelle Jan 4, 2023
480bc99
Merge branch 'main' into feat/network-plugin
Jan 4, 2023
530aaa7
Merge branch 'main' into feat/network-plugin
Jan 4, 2023
a91f639
Merge branch 'main' into feat/network-plugin
Jan 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

### Changes

- [#3306](https://github.com/ignite/cli/pull/3306) Move network command into a plugin
- [#3305](https://github.com/ignite/cli/pull/3305) Bump Cosmos SDK version to `v0.46.7`.
- [#3068](https://github.com/ignite/cli/pull/3068) Add configs to generated TS code for working with JS projects
- [#3071](https://github.com/ignite/cli/pull/3071) Refactor `ignite/templates` package.
Expand Down
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
github.com/99designs/keyring v1.2.1
github.com/AlecAivazis/survey/v2 v2.3.6
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/aws/smithy-go v1.13.4
github.com/blang/semver/v4 v4.0.0
github.com/briandowns/spinner v1.20.0
github.com/buger/jsonparser v1.1.1
Expand Down Expand Up @@ -50,26 +49,24 @@ require (
github.com/pelletier/go-toml v1.9.5
github.com/pkg/errors v0.9.1
github.com/radovskyb/watcher v1.0.7
github.com/rdegges/go-ipify v0.0.0-20150526035502-2d94a6a86c40
github.com/rs/cors v1.8.2
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.1
github.com/tbruyelle/mdgofmt v0.1.2
github.com/tendermint/spn v0.2.1-0.20221125172725-052fbf576cb2
github.com/tendermint/tendermint v0.34.24
github.com/tendermint/tm-db v0.6.7
github.com/vektra/mockery/v2 v2.16.0
go.etcd.io/bbolt v1.3.6
golang.org/x/exp v0.0.0-20221212164502-fae10dda9338
golang.org/x/mod v0.7.0
golang.org/x/sync v0.1.0
golang.org/x/term v0.2.0
golang.org/x/text v0.4.0
golang.org/x/tools v0.3.0
golang.org/x/vuln v0.0.0-20221122171214-05fb7250142c
google.golang.org/grpc v1.51.0
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8
gopkg.in/yaml.v2 v2.4.0
mvdan.cc/gofumpt v0.4.0
)
Expand Down Expand Up @@ -372,12 +369,13 @@ require (
go.uber.org/zap v1.23.0 // indirect
golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1 // indirect
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
27 changes: 10 additions & 17 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUM
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/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o=
cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0=
cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48=
cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk=
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/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
Expand All @@ -46,7 +45,7 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
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=
cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ=
cloud.google.com/go/storage v1.22.1 h1:F6IlQJZrZM++apn9V5/VfS3gbTUYg98PS3EMQAzqtfg=
collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE=
cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w=
cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE=
Expand Down Expand Up @@ -217,8 +216,6 @@ github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7
github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0=
github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM=
github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
github.com/aws/smithy-go v1.13.4 h1:/RN2z1txIJWeXeOkzX+Hk/4Uuvv7dWtCjbmVJcrskyk=
github.com/aws/smithy-go v1.13.4/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aymanbagabas/go-osc52 v1.0.3 h1:DTwqENW7X9arYimJrPeGZcV0ln14sGMt3pHZspWD+Mg=
github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
Expand Down Expand Up @@ -914,11 +911,12 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs=
github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw=
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/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU=
github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk=
github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA=
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI=
github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg=
Expand Down Expand Up @@ -1046,7 +1044,6 @@ github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHL
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
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/ignite/modules v0.0.0-20220912090139-7c325cae763a h1:0P8qg4YS0hb8jomZedhbooEKE3JZhRNAewV8+8otr6k=
github.com/ignite/web v0.4.3 h1:LHucUEXttzCf5JmxO5/xLKVx1Qz1o124HqF4Nii5uWQ=
github.com/ignite/web v0.4.3/go.mod h1:WZWBaBYF8RazN7dE462BLpvXDY8ScacxcJ07BKwX/jY=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
Expand Down Expand Up @@ -1568,8 +1565,6 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rdegges/go-ipify v0.0.0-20150526035502-2d94a6a86c40 h1:31Y7UZ1yTYBU4E79CE52I/1IRi3TqiuwquXGNtZDXWs=
github.com/rdegges/go-ipify v0.0.0-20150526035502-2d94a6a86c40/go.mod h1:j4c6zEU0eMG1oiZPUy+zD4ykX0NIpjZAEOEAviTWC18=
github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg=
github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM=
github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4=
Expand Down Expand Up @@ -1742,11 +1737,8 @@ github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s
github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U=
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI=
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk=
github.com/tendermint/fundraising v0.3.1 h1:S4uOV/T7YNBqXhsCZnq/TUoHB0d2kM+6tKeTD4WhLN0=
github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E=
github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME=
github.com/tendermint/spn v0.2.1-0.20221125172725-052fbf576cb2 h1:3sf/j+p+XFSenqu1DNcjvW01dSPpvx06Xef3EiSvqhg=
github.com/tendermint/spn v0.2.1-0.20221125172725-052fbf576cb2/go.mod h1:GVDvxguSWgSsD5b0CQuWTLEOy41HR28OKXjAFpUNedQ=
github.com/tendermint/tendermint v0.34.24 h1:879MKKJWYYPJEMMKME+DWUTY4V9f/FBpnZDI82ky+4k=
github.com/tendermint/tendermint v0.34.24/go.mod h1:rXVrl4OYzmIa1I91av3iLv2HS0fGSiucyW9J4aMTpKI=
github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8=
Expand Down Expand Up @@ -1942,8 +1934,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0
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/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA=
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA=
golang.org/x/exp v0.0.0-20221212164502-fae10dda9338 h1:OvjRkcNHnf6/W5FZXSxODbxwD+X7fspczG7Jn/xQVD4=
golang.org/x/exp v0.0.0-20221212164502-fae10dda9338/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 h1:Ic/qN6TEifvObMGQy72k0n1LlJr7DjWWEi+MOsDOiSk=
golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
Expand Down Expand Up @@ -2057,7 +2049,8 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/oauth2 v0.2.0 h1:GtQkldQ9m7yvzCL1V+LrYow3Khe0eJH0w7RbX/VbaIU=
golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 h1:2o1E+E8TpNLklK9nHiPiK1uzIYrIHt+cQx3ynCwq9V8=
golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
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=
Expand Down Expand Up @@ -2364,7 +2357,7 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513
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/api v0.102.0 h1:JxJl2qQ85fRMPNvlZY/enexbxpCjLwGhZUtgfGeQ51I=
google.golang.org/api v0.93.0 h1:T2xt9gi0gHdxdnRkVQhT8mIvPaXKNsDNWz+L696M66M=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
Expand Down
6 changes: 0 additions & 6 deletions ignite/cmd/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const (
flagNonInteractive = "non-interactive"
flagKeyringBackend = "keyring-backend"
flagKeyringDir = "keyring-dir"
flagFrom = "from"
)

func NewAccount() *cobra.Command {
Expand Down Expand Up @@ -101,11 +100,6 @@ func getAddressPrefix(cmd *cobra.Command) string {
return prefix
}

func getFrom(cmd *cobra.Command) string {
prefix, _ := cmd.Flags().GetString(flagFrom)
return prefix
}

func flagSetAccountImport() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.Bool(flagNonInteractive, false, "do not enter into interactive mode")
Expand Down
18 changes: 8 additions & 10 deletions ignite/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/ignite/cli/ignite/pkg/cliui"
"github.com/ignite/cli/ignite/pkg/cliui/colors"
uilog "github.com/ignite/cli/ignite/pkg/cliui/log"
"github.com/ignite/cli/ignite/pkg/cosmosaccount"
"github.com/ignite/cli/ignite/pkg/cosmosver"
"github.com/ignite/cli/ignite/pkg/gitpod"
"github.com/ignite/cli/ignite/pkg/goenv"
Expand All @@ -42,7 +41,9 @@ const (
)

// New creates a new root command for `Ignite CLI` with its sub commands.
func New() *cobra.Command {
// Returns the cobra.Command, a cleanUp function and an error. The cleanUp
// function must be invoked by the caller to clean eventual plugin instances.
func New(ctx context.Context) (*cobra.Command, func(), error) {
cobra.EnableCommandSorting = false

c := &cobra.Command{
Expand Down Expand Up @@ -72,7 +73,6 @@ To get started, create a blockchain:
c.AddCommand(NewScaffold())
c.AddCommand(NewChain())
c.AddCommand(NewGenerate())
c.AddCommand(NewNetwork())
c.AddCommand(NewNode())
c.AddCommand(NewAccount())
c.AddCommand(NewRelayer())
Expand All @@ -82,7 +82,11 @@ To get started, create a blockchain:
c.AddCommand(NewPlugin())
c.AddCommand(deprecated()...)

return c
// Load plugins if any
if err := LoadPlugins(ctx, c); err != nil {
return nil, nil, fmt.Errorf("error while loading plugins: %w", err)
}
return c, UnloadPlugins, nil
}

func getVerbosity(cmd *cobra.Command) uilog.Verbosity {
Expand All @@ -108,12 +112,6 @@ func flagSetHome() *flag.FlagSet {
return fs
}

func flagNetworkFrom() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(flagFrom, cosmosaccount.DefaultAccount, "account name to use for sending transactions to SPN")
return fs
}

func getHome(cmd *cobra.Command) (home string) {
home, _ = cmd.Flags().GetString(flagHome)
return
Expand Down
12 changes: 5 additions & 7 deletions ignite/cmd/ignite/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ func run() int {
)
ctx := clictx.From(context.Background())

cmd := ignitecmd.New()

// Load plugins if any
if err := ignitecmd.LoadPlugins(ctx, cmd); err != nil {
fmt.Printf("Error while loading plugins: %v\n", err)
cmd, cleanUp, err := ignitecmd.New(ctx)
if err != nil {
fmt.Printf("%v\n", err)
return exitCodeError
}
defer ignitecmd.UnloadPlugins()
defer cleanUp()

err := cmd.ExecuteContext(ctx)
err = cmd.ExecuteContext(ctx)

if errors.Is(ctx.Err(), context.Canceled) || errors.Is(err, context.Canceled) {
fmt.Println("aborted")
Expand Down
Loading