fission-codes / fission-cli

Rewrite it in Rust 🦀
Apache License 2.0
1 stars 1 forks source link

Wrap existing haskell cli #8

Closed bgins closed 1 year ago

bgins commented 1 year ago

Description

This PR implements initial CLI functionality by wrapping the existing Haskell CLI binary. Following this PR, we will implement each command natively in Rust. 🦀

This PR implements the the following commands:

It also implements the following global flags:

We also started to add a src/utils.rs module, but it is not used in the wrapped CLI implementation.

Link to issue

Closes #6

Type of change

Please delete options that are not relevant.

Testing

Testing will be a bit manual, going through each command to see that it works. For each command, try some of the args and flags to see they work.

The recommended sequence is:

The last app commands are best tested outside of the project directory, which is why<path-to-binary> is suggested for them. A temp directory with a text file can be created as a simple app to publish.

The app delegate command is slightly more involved than the other commands. At minimum, an app name and an audience must be specified. The app that was created and published while testing app register and app publish can be used for app name. The DID can be any valid did:key. For example:

<path-to-binary> app delegate -a short-old-tin-hero -d did:key:z6Mko4wBW851vmaB2VoA3dR6fisKK3Wn5bEWdhwnCw4yrRAm

The global verbose and remote commands can also be tested. Verbose is a bit easier and can be added along the way. Testing remote is essentially a separate pass through each of the commands.

BoisterousCoder commented 1 year ago

Everything looks good to me. Though most of the aliases such as fission up are not covered. We might want to make a note somewhere to cover in the future

bgins commented 1 year ago

Everything looks good to me. Though most of the aliases such as fission up are not covered. We might want to make a note somewhere to cover in the future

Ah yes, thanks for calling that out. Meant to mention it in the PR.

My proposal is that we drop support for the fission up and fission login aliases. fission up primarily exists as a historical artifact because it was implemented before fission app publish in the Haskell CLI. fission login is infrequently used, and I think we can drop it as an alias.