HomePhabricator
Diffusion Comm 5cd376aa8df6

[keyserver] Add the qrcode dependency for terminal output

Description

[keyserver] Add the qrcode dependency for terminal output

Summary:
We need a package to generate the QR codes from keyserver when it's run into the terminal. We have two options:

  • qrcode-terminal is the package that Expo CLI uses to display a QR code in the terminal similar to when yarn dev is run. While it's reliable, it hasn't really been updated in 5 years so I decided to not use it.
  • node-qrcode is the package that I decided to go to for a few reasons. It seems to be well supported (latest update in April), lots of community issues/responses on existing issues, and has a better API to generate the QR codes, specifically handling different encoding types.

Ultimately it shouldn't matter too much what we go with, the main challenge will be attempting to encode large amounts of data in a QR code in the terminal without it breaking the line output, so for now I'm going to go with this package. If we need to, it's a very easy change.

Addresses ENG-4778 and ENG-4771

Test Plan: Ran yarn cleaninstall and confirmed I can print out a simple QR code to the terminal in keyserver.js

Reviewers: atul, ginsu, varun, patryk, ashoat

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D9089

Details

Provenance
rohanAuthored on Sep 5 2023, 10:31 AM
Reviewer
ashoat
Differential Revision
D9089: [keyserver] Add the qrcode dependency for terminal output
Parents
rCOMMdd9055f2f3ab: [web] Migrate drafts to db for everyone
Branches
Unknown
Tags
Unknown