l00k / devphase

Development tool for Phala Phat contracts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decouple devphase CLI & Service into separate packages

HashWarlock opened this issue · comments

Description

After speaking with @Leechael on how to best integrate devphase into swanky a recommendation to avoid dependencies without changing the core functionality of devphase would be decoupling the devphase-cli and devphase-service into separate packages. This allows for adding a plugin to swanky in a more sustainable way.

Targets

image

  • Separate the 'service' component into a standalone package with no dependencies on oclif.
  • The 'devphase/cli' package is for the CLI only, and acts as a glue layer between oclif and the service component.
  • Since we have separated devphase into two packages, only the devphase/cli package should have a dependency on oclif v2. The swanky-plugin-phala can use devphase/service without declaring any dependencies on oclif.
  • We can also implement a dependency injection design (if necessary) to further reduce boilerplate code.
commented

Done.
Packages:
@devphase/service: 0.0.1
@devphase/cli: 0.0.1