Closed iva2k closed 2 years ago
Merging #125 (b60d18f) into master (c27040d) will decrease coverage by
0.11%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## master #125 +/- ##
==========================================
- Coverage 75.68% 75.57% -0.12%
==========================================
Files 25 25
Lines 1345 1347 +2
Branches 307 310 +3
==========================================
Hits 1018 1018
- Misses 250 252 +2
Partials 77 77
Impacted Files | Coverage Δ | |
---|---|---|
src/cli.ts | 0.00% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update c27040d...b60d18f. Read the comment docs.
Wow, fixing lint errors and running prettier wrapped one longer line, which increased line count by 4 and failed code coverage check by 0.2%. How do we get around it? Real coverage did not diminish.
Thank you! I took a quick look here but I'll need to pull this into my local machine and test things before merging
I have a way to increase coverage by 2-3%. But it does not make sense to do it in this PR.
Much appreciated! Made a few tweaks and reverted the part where setPowerState had an optional parameter.
… other cli issues
Background:
Call logic of API methods in sendCommandDynamic() may have worked at some point (when there were fewer methods), but got broken when more methods were added to the API. When Object[variable] pattern is used to select which method to call by name, TypeScript composes a compound type for all signatures of all methods, and refuses to call the selected method since the provided arguments don't match the compound signature, even if they match the specific method. Solution implemented to wipe out call arguments signature and use func.apply().
Further, sendCommandDynamic() was not receiving correct arguments due to the problem how the command.action() callback arguments were done. This logic needed complete revamp.
Few minor issues were noticed and fixed as well - always optional parameters in CommandSetup array, missing setAlias parameter.