Skip to content

Commit

Permalink
refactor: rename CLI "plugin" command to "app" (#3662)
Browse files Browse the repository at this point in the history
* refactor: rename "plugin" to "app"

* refactor: simplify code

* chore: update changelog

* tests: fixed unit tests

* tests: fix integration tests

* chore: change plugin template to use `app` as the type name

* chore: update plugin code documentation to use "app" instead

* tests: fixed service unit tests

* chore: update comments

* chore: fix typo

* chore: improve command description

* chore: restore plugin to test case names

* chore: remove commented unit test code

* chore: change app commands to properly set example command

Co-authored-by: Julien Robert

* chore: remove redundant plugin path check
  • Loading branch information
jeronimoalbi authored Oct 5, 2023
1 parent a9a3144 commit 88ffe62
Show file tree
Hide file tree
Showing 14 changed files with 261 additions and 266 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- [#3658](https://github.com/ignite/cli/pull/3658) Rename Marshaler to Codec in EncodingConfig
- [#3653](https://github.com/ignite/cli/pull/3653) Add "app" extension to plugin binaries
- [#3656](https://github.com/ignite/cli/pull/3656) Disable Go toolchain download
- [#3662](https://github.com/ignite/cli/pull/3662) Refactor CLI "plugin" command to "app"
- [#3669](https://github.com/ignite/cli/pull/3669) Rename `plugins` config file to `igniteapps`

### Fixes
Expand Down
8 changes: 4 additions & 4 deletions ignite/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const (
)

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

Expand Down Expand Up @@ -78,14 +78,14 @@ To get started, create a blockchain:
NewTools(),
NewDocs(),
NewVersion(),
NewPlugin(),
NewApp(),
NewDoctor(),
)
c.AddCommand(deprecated()...)

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

0 comments on commit 88ffe62

Please sign in to comment.