Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions cmd/flow/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/onflow/flow-cli/internal/events"
"github.com/onflow/flow-cli/internal/keys"
"github.com/onflow/flow-cli/internal/project"
"github.com/onflow/flow-cli/internal/quick"
"github.com/onflow/flow-cli/internal/scripts"
"github.com/onflow/flow-cli/internal/status"
"github.com/onflow/flow-cli/internal/transactions"
Expand All @@ -45,8 +46,8 @@ func main() {
TraverseChildren: true,
}

// hot commands
config.InitCommand.AddToParent(cmd)
// quick commands
quick.InitCommand.AddToParent(cmd)
status.Command.AddToParent(cmd)

// structured commands
Expand All @@ -61,6 +62,7 @@ func main() {
cmd.AddCommand(blocks.Cmd)
cmd.AddCommand(collections.Cmd)
cmd.AddCommand(project.Cmd)
cmd.AddCommand(config.Cmd)

command.InitFlags(cmd)

Expand Down
1 change: 1 addition & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var Cmd = &cobra.Command{
}

func init() {
InitCommand.AddToParent(Cmd)
Cmd.AddCommand(AddCmd)
Cmd.AddCommand(RemoveCmd)
}
Expand Down
1 change: 0 additions & 1 deletion internal/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ var Cmd = &cobra.Command{
}

func init() {
InitCommand.AddToParent(Cmd)
DeployCommand.AddToParent(Cmd)
Cmd.AddCommand(EmulatorCommand)
}
4 changes: 3 additions & 1 deletion internal/project/init.go → internal/quick/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package project
package quick

import (
"fmt"
Expand All @@ -28,6 +28,8 @@ import (
"github.com/onflow/flow-cli/pkg/flowcli/services"
)

// TODO(sideninja) workaround - init needed to be copied in order to work else there is flag duplicate error

var initFlag = config.FlagsInit{}

var InitCommand = &command.Command{
Expand Down
1 change: 1 addition & 0 deletions pkg/flowcli/config/json/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func transformAccountsToJSON(accounts config.Accounts) jsonAccounts {
return jsonAccounts
}

// TODO(sideninja) refactor keys to use json.RawMessage and decide if unmarshal into simple or advance structure based on that field
type jsonAccountSimple struct {
Address string `json:"address"`
Keys string `json:"keys"`
Expand Down