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

chore: move ssh-client & legacy-daemon from core to cli only #592

Merged
merged 6 commits into from Nov 28, 2023

Conversation

XavierChanth
Copy link
Member

@XavierChanth XavierChanth commented Nov 27, 2023

closes #573

- What I did

  • Removed legacy-daemon and ssh-client args from the noports_core package and created an extended parser for them in the CLI
  • Did a minor refactor of the main file

- How I did it

- How to verify it

- Description for the changelog
chore: move ssh-client & legacy-daemon from core to cli only

params,
atClientGenerator: (SshnpParams params) => createAtClientCli(
homeDirectory: homeDirectory,
atsign: params.clientAtSign,
namespace: '${params.device}.sshnp',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line got removed because this value is already set by SshnpCore

Copy link
Contributor

@gkc gkc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks are failing ...

@XavierChanth
Copy link
Member Author

XavierChanth commented Nov 28, 2023

Checks are failing ...

Sorry, missed a cast from String to the SupportedSshClient enum type. I explicitly typed where we extract those arguments from the ArgResults now, so we at least have some form of static analysis.

@@ -106,12 +102,12 @@ class SshnpParams {
rootDomain: params2.rootDomain ?? params1.rootDomain,
localSshdPort: params2.localSshdPort ?? params1.localSshdPort,
listDevices: params2.listDevices ?? params1.listDevices,
legacyDaemon: params2.legacyDaemon ?? params1.legacyDaemon,
// legacyDaemon: params2.legacyDaemon ?? params1.legacyDaemon,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be removed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have removed

remoteSshdPort: params2.remoteSshdPort ?? params1.remoteSshdPort,
idleTimeout: params2.idleTimeout ?? params1.idleTimeout,
addForwardsToTunnel:
params2.addForwardsToTunnel ?? params1.addForwardsToTunnel,
sshClient: params2.sshClient ?? params1.sshClient,
// sshClient: params2.sshClient ?? params1.sshClient,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be removed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have removed

Copy link
Contributor

@gkc gkc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @XavierChanth. FYI I pushed another commit to remove a couple of lines of dead commented code

@gkc gkc merged commit 4b23989 into trunk Nov 28, 2023
11 checks passed
@gkc gkc deleted the remove_cli_params branch November 28, 2023 12:14
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.

Move parameters from SDK to CLI
2 participants