Page MenuHomePhabricator

[keyserver] Add the qrcode dependency for terminal output
ClosedPublic

Authored by rohan on Sep 5 2023, 10:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 2:24 PM
Unknown Object (File)
Thu, Oct 31, 2:24 PM
Unknown Object (File)
Thu, Oct 31, 2:24 PM
Unknown Object (File)
Thu, Oct 31, 2:22 PM
Unknown Object (File)
Oct 16 2024, 12:34 PM
Unknown Object (File)
Oct 16 2024, 7:54 AM
Unknown Object (File)
Oct 15 2024, 4:45 PM
Unknown Object (File)
Oct 15 2024, 2:24 PM
Subscribers

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rohan edited the summary of this revision. (Show Details)
rohan requested review of this revision.Sep 5 2023, 10:55 AM

Not sure if we actually need to add the dependency, planning changes to confirm before requesting review

rohan requested review of this revision.Sep 7 2023, 7:04 AM
rohan added inline comments.
native/ios/Podfile.lock
957 ↗(On Diff #30782)

This seemed automatic, not sure if it's something I should prevent / revert?

native/ios/Podfile.lock
957 ↗(On Diff #30782)

You need to update your Nix environment:

 ashoat  ~  src  comm  pod --version                                                                                                                                     ST 3   master
1.11.3
 ashoat  ~  src  comm  exit                                                                                                                                              ST 3   master
exit
ashoat@ashoatmbp2021 [~/src/comm]$ nix develop
Existing MariaDB instance found outside of nix environment
Please stop existing services and attempt 'nix develop' again
Existing Redis instance found outside of nix environment
Please stop existing services and attempt 'nix develop' again
Welcome to Comm dev environment! :)
 ashoat  ~  src  comm  pod --version                                                                                                                                     ST 3   master
1.12.1
native/ios/Podfile.lock
957 ↗(On Diff #30782)

Ah ok thanks!

Attempt to fix COCOAPODS upgrade

This revision is now accepted and ready to land.Sep 7 2023, 9:33 AM