Some improvements #12
Description
I have been playing this integration for a while, and then I have found some points to be improved.
I have written those here 😄
How does it sound to you?
All commands work with spawn method
Right now, all commands in this integration execute external commands like faas-cli
and docker
with child_process
package. imo, this implementation might introduce instability to this plugin since the behavior depends on library versions which a user Individually installs.
library versions should be managed by package manager of nodejs, so would be good to use sdk, or if there aren't sdk, request API provided by OpenFaaS cluster instead of commands.
sls init command would be unnecessity
The framework is just for function deployment tool, however, this command is for setting up OpenFaaS cluster, so would be unnecessity in this integration.
This one should contain some stuff for functions like package, deploy, invoke, logs and remove functions
Need unit testing
Would be good to add unit testing to maintain it for a long time.