Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: make sshnpd more modular #233

Merged
merged 6 commits into from
Jul 1, 2023
Merged

Conversation

HamdaanAliQuatil
Copy link
Member

- What I did

complete restructuring of sshnpd.dart

- How I did it

  • Split the main into many smaller functions
  • Created SSHNPD class, making instance variables final or late final or late or just normal volatile instance variables as appropriate
  • Documented the SSHNPD instance variables and the primary methods (init() and run())
  • Extracted the SSHNPD class to lib/sshnpd.dart, leaving just a very short main() in bin/sshnpd.dart
  • Combined utility functions into single new file sshnpd_utils.dart
  • Added args parsing unit tests

- Description for the changelog

make sshnpd more modular

HamdaanAliQuatil and others added 6 commits June 21, 2023 20:31
…n sshnp but 'keyFile' here)

fix: made nameSpace a const in lib/sshnpd.dart to prevent accidents
refactor: removed `results` instance variable from SSHNPD, used only for verbose flag, dealing with that outside the class now
fix: SSHNPD.deviceAtsign was not being initialized - replaced it with a getter delegating to the atClient
fix: SSHNPD.managerAtsign was not being initialized - added as mandatory to constructor params
fix: when sending the username notification, set some optional params in the call to `.notify`
fix: Changed the subscription regex string from `$device.$nameSpace@` to `$device\\.$nameSpace@` (which results in a regex of, for example, `macbookpro\.sshnp@`)
fix: Added initialization of root_level to lib/sshnp.dart
@HamdaanAliQuatil HamdaanAliQuatil requested a review from gkc July 1, 2023 04:05
@gkc gkc mentioned this pull request Jul 1, 2023
@XavierChanth XavierChanth merged commit 426d390 into trunk Jul 1, 2023
@gkc gkc deleted the hamdaan-refactor-sshnpd branch February 7, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants