commands/keys_revoke_command
library
Classes
-
KeysRevokeSubcommand
-
-
RevokeResolution
-
The
keys revoke <label-or-prefix> resolve → refuse decision, factored out of
run() as a pure function. run() itself can't be exercised end to end
in a test — ApiClient.forKey isn't injectable, so there's no fake
server behind a subprocess — so this is what makes the decision itself
unit-testable in-process, the same pattern LoginCommand.ciRefusalMessage
uses for the CI-refusal decision.
Enums
-
RevokeDecision
-
Split out of
keys_command.dart to stay under the file-size cap — the
same reason auth_logout.dart is split out of auth_service.dart.
Functions
-
resolveLabelOrPrefix(List<Map<String, dynamic>> keys, String typed)
→ List<Map<String, dynamic>>
-
Resolves
typed against the account's keys — an exact label match wins
outright (the backend enforces at most one active key per label, so an
exact match can never itself be ambiguous), otherwise falls back to
KeyMatcher's prefix matching. keys list's prefix column stays a
valid handle to paste. Pure, so this ordering is pinned by a test
rather than left incidental.