-
Notifications
You must be signed in to change notification settings - Fork 3
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
CLI polish and fixes for deployment #44
Comments
The // client/handlers/NodesgetAll.ts
for await (const [index, bucket] of nodeGraph.getBuckets()) {
for (const [id, info] of bucket) {
const encodedId = nodesUtils.encodeNodeId(id);
// For every node in every bucket, add it to our message
if (ctx.signal.aborted)
throw ctx.signal.reason;
yield {
bucketIndex: index,
nodeIdEncoded: encodedId,
host: info.address.host,
port: info.address.port,
};
}
} |
Looking at the tests, we're missing tests for |
About
@tegefaulkes did you push this up? |
No, It needs to be done in |
We also need to create tests for the |
Issues still to be resolved :
|
Don't cross out any of these tasks. |
@addievo If you want, make another issue for 3., but make sure to spec it out. |
A new issue has been created regarding this in Removing the same from this issue. |
Overview of what was fixed:
|
the spec has been moved here from #50 |
|
Some things to consider here if it hasn't been properly considered:
The main issue I'm wrestling with here is that when quotation is used, it impacts piping, composition, as in it complicates it requiring the input side to realise how to deal with the quoted form. I think the main problem is that we have a CLI with a STDOUT that could be going to the terminal - an interactive thing, or to non-interactive outputs. We can actually detect if the output fd is interactive or non-interactive. See: https://github.com/sindresorhus/is-interactive and we can make decisions here. I have a feeling we will need to revisit this. |
I think we should study the linear TSV specification and see if it can apply to the dict output. Because I can imagine a dict output is the equivalent of a 2-column table output. And if linear TSV works for the table output, it should work for the dict output too. |
My other issue is dealing with There might be case-by-case exceptions? |
The UI/UX of terminal commands is its own field of expertise, it needs to be considered carefully since it's our initial usecase and targetted to developers and system operators. |
These points needs to be turned into a new issue. |
Specification
While testing hole punching with the testnet, we found a few issues with the CLI.
Automatic Encoding
For these two formats, encoding is applied by default so that special characters will not mess up the padding for any given output.
\"\"
and apply encoding to the input\"\"
and apply encoding to the inputManual Encoding with Utility Functions
For any other format passed into
outputFormatter
, there will be no encoding of escapable characters by default.It is up to the user to use the following functions in
src/utils/utils.ts
to encode parts of their input:To use this:
Note that any encoded strings must be encased in
""
anyways. This is so that when the user copy-pastes the output as the input of another command, or pipes the output to another command, those escaped characters will be collapsed correctly.Additional context
Tasks
nodes getall
command, it's throwing an error relating tohost
not being defined.nodes connections
command output formatting. The output is very unclear.nodes connections --format json
output. This should not be the case.agent status
command outputs too much information. We should strip out the key and certificate information.The text was updated successfully, but these errors were encountered: