Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Changelog

## [0.5.0]
## [0.6.0]

### Added

- `ncli decode` reads cash tokens (any HRP, e.g. `lokicash1...`) and
`circlehub1...` connections. Pairing secrets are never shown.
`cashhub1...` is recognized and rejected.
- Every command's `--help` has an `Example:`.
- `ncli profile <identifier>` prints a readable profile card for one
identity -- metadata, following count, relay list, Blossom servers and
lightning address -- from a single query, aggregated across every relay
Expand All @@ -25,6 +21,25 @@
**stderr** -- help used to land on stdout -- and exit codes are
unchanged, so a bare group command still exits 2, never 0. `--json` is
untouched: one structured line, never help. (#55)

### Fixed

- An unknown flag was reported twice (cobra's own `Error:` plus ncli's
own line) and exited 1 instead of 2. (#55)
- `ncli bunker sessions revoke-grant` with no `--method` exited 1 as
`internal` instead of 2 as `usage`. (#55)

## [0.5.0]

### Added

- `ncli decode` reads cash tokens (any HRP, e.g. `lokicash1...`) and
`circlehub1...` connections. Pairing secrets are never shown.
`cashhub1...` is recognized and rejected.
- Every command's `--help` has an `Example:`.

### Changed

- A local flow's `ensure` now defaults to `create` (was `exists`), so a
missing store path is created instead of failing.
- The Age column shows days and weeks (`2d4h`, `1w3d`) instead of
Expand All @@ -34,10 +49,6 @@

### Fixed

- An unknown flag was reported twice (cobra's own `Error:` plus ncli's
own line) and exited 1 instead of 2. (#55)
- `ncli bunker sessions revoke-grant` with no `--method` exited 1 as
`internal` instead of 2 as `usage`. (#55)
- Wallet transfers reused a stale client on their second call.
- NWC responses dropped the `circle_hub`/`circle_wallet` fee fields.
- Two `Example:` commands failed when run as written.
Expand Down
110 changes: 0 additions & 110 deletions CLI_NOISE_AUDIT.md

This file was deleted.

16 changes: 8 additions & 8 deletions cli/common/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ var retryableCodes = map[ErrorCode]bool{
CodeNetwork: true,
}

// CLIError wraps a command failure with an ErrorCode, and optionally the
// single input value that caused it, so main.go's single top-level sink
// (EmitError) can render it consistently -- a styled text line, or
// structured JSON on stderr when --json is set -- and pick an exit code,
// instead of every command choosing its own rendering and printing early.
// Input is left blank when there's no one clean value to echo, or when the
// value is sensitive (a private key, a vault password) and must not be
// echoed back at all.
// HelpMode says how much of a command's own help EmitError prints alongside
// a failure. The zero value is HelpNone, so an error that was never
// deliberately classified can't accidentally dump thirty lines of help.
Expand All @@ -76,6 +68,14 @@ const (
HelpAfterError
)

// CLIError wraps a command failure with an ErrorCode, and optionally the
// single input value that caused it, so main.go's single top-level sink
// (EmitError) can render it consistently -- a styled text line, or
// structured JSON on stderr when --json is set -- and pick an exit code,
// instead of every command choosing its own rendering and printing early.
// Input is left blank when there's no one clean value to echo, or when the
// value is sensitive (a private key, a vault password) and must not be
// echoed back at all.
type CLIError struct {
Err error
Code ErrorCode
Expand Down
Loading