Skip to content

feat: update the get keys command to show all keys per type - #590

Closed
suthar26 wants to merge 1 commit into
mainfrom
feat/show-all-sdkkys
Closed

suthar26 wants to merge 1 commit into
mainfrom
feat/show-all-sdkkys

Conversation

@suthar26

Copy link
Copy Markdown
Contributor
  • Adding -all to match the selector option
  • Update the get command to show all keys and mark compromised as (compromised)
  • add test for the get command
  • update so headless cannot get stuck by going into a interactive input mode

local run showing the following for an old compromised key and the newly created one.

Screenshot 2026-09-29 at 12 47 43 AM

@suthar26
suthar26 requested a review from a team as a code owner September 29, 2026 04:50
Comment thread src/commands/keys/get.ts
Comment on lines +61 to +69
// the API appends new keys, so reverse to put the most recent first
const keysNewestFirst = [...activeKeys].reverse()
if (keysNewestFirst.every(({ key }) => !key)) {
throw new Error(
`Your credentials do not have permission to view ${sdkType} SDK keys for environment ` +
`${environmentKey}. Publisher permissions are required for protected environments.`,
)
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why are we reversing the order here? if we're inverting the API response would that not confuse people on which is accurate? We don't have a createdat timestamp anywhere.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is still an open question, since the dashboard is being updated to show the latest token on the landing page with the details being shown in another view.

@suthar26 suthar26 closed this Sep 29, 2026
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.

2 participants