help, output, connect: bring the tool up to the house guidelines - #13
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the CLI up to the house guidelines finalized today, in the help, the output layer and emulator discovery.
Help: the shared options are listed once, on the root page, and every other page hides them, which takes the manual from 1213 to 1068 lines. A page has one shape on a terminal and in a pipe: the contract block prints
Requires:and its siblings with a colon padded to one column, wraps values at the width, 80 in a pipe, and lists the examples as bare commands with no prompt; topics render the same way in both, so a piped topic no longer carries Markdown markers.data deleteanddata repaireach show their own examples,help --allhas a description, thedata,appandfirmwareone-liners are imperative and under sixty characters, enroll's approval line says Ark Hub, and the text uses American spelling.firmware updatekeeps--no-waitonly, since waiting is the default and--waitwas a second option for one thing.Output: text that comes from a device, a file or the cloud is made printable before a terminal sees it, so a control character in a device name or a verdict can neither drive the terminal nor start a line of its own; JSON keeps the original value. The Ark's error number in a JSON error's
remote.codeis now a decimal string, like every 64-bit value, where it was a number before; nothing is released, so the break is taken now. Wrapped lines no longer end in a space.Discovery: the registry decoder reads the listing's
versionand refuses one it does not know, or a listing without one, as a failed source thatark devicesreports as a warning beside the devices found elsewhere; a refused connection stays an empty list.The tests cover the page shape on a terminal and in a pipe (the same text apart from color), the root page listing the shared options and every other page hiding them, the contract block and bare examples in the piped output of every command,
-hand--helpon every command and group, usage errors aserror[usage]:plain and as theerrorobject under--json, the manual naming the example apps and the emulator, every error code the source can emit being documented in the output topic (read from the source, not from a second list), the registry version check, and the control character escape.Not in this change: the build-feature gated
--env, which is a separate decision, and any wording in the topics beyond spelling and the two sentences the changes above needed.