This change also transitions from express.js to koa (made by the same developers as express) for the web server for better async/await support.
The decision was made to do away with the Session header option since serve commands are not completely stateless (things are cached within the process memory, for example).
Finally, I added some checks to make sure errors around certain conditions are handled more gracefully. Namely, checking to make sure the vault is in an unlocked state before trying to execute dependent commands, such as list.
Testing requirements
Test all commands and options related to the HTTP server exposed by the serve command.
Before you submit
[x] I have checked for linting errors (npm run lint) (required)
[x] This change requires a documentation update (notify the documentation team)
[ ] This change has particular deployment requirements (notify the DevOps team)
Type of change
Objective
Resolve open Asana issues related to new serve command.
Code changes
Issues related to commands handing were mostly related to asynchronous recursive loops that were fixed with https://github.com/bitwarden/jslib/commit/fc0638a7d95e9e678cc125d5186c1dcd8fdad7e6 .
This change also transitions from express.js to koa (made by the same developers as express) for the web server for better async/await support.
The decision was made to do away with the
Session
header option since serve commands are not completely stateless (things are cached within the process memory, for example).Finally, I added some checks to make sure errors around certain conditions are handled more gracefully. Namely, checking to make sure the vault is in an unlocked state before trying to execute dependent commands, such as
list
.Testing requirements
Test all commands and options related to the HTTP server exposed by the
serve
command.Before you submit
npm run lint
) (required)