[DX-1097] Fixed capability flag inconsistency for keys create/update#322
[DX-1097] Fixed capability flag inconsistency for keys create/update#322
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2dab070 to
058c406
Compare
058c406 to
b7f671d
Compare
WalkthroughThis PR fixes a capability format inconsistency between Changes
Review Notes
|
There was a problem hiding this comment.
Pull request overview
This PR standardizes how API key capabilities are provided across auth keys create and auth keys update, so both commands accept either a JSON capability object (per-channel) or a comma-separated capability list (applied to *).
Changes:
- Added shared parsing helpers in
src/utils/key-parsing.ts(parseCapabilities,resolveCurrentKeyName). - Updated
auth keys createandauth keys updateto use unified capability parsing and updated help/examples accordingly. - Refactored key “current key name” formatting in key listing/get/current commands to use the shared resolver.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/commands/auth/keys/create.test.ts | Adjusts invalid-capabilities test input to still trigger JSON parsing failure. |
| src/utils/key-parsing.ts | Introduces shared helpers for current key name formatting and capability parsing. |
| src/commands/auth/keys/update.ts | Uses shared parseCapabilities and updates flag description/examples. |
| src/commands/auth/keys/list.ts | Uses resolveCurrentKeyName to compute highlighted “current key”. |
| src/commands/auth/keys/index.ts | Updates the topic examples to show keys update with --name. |
| src/commands/auth/keys/get.ts | Uses resolveCurrentKeyName for env/current-key override detection. |
| src/commands/auth/keys/current.ts | Uses resolveCurrentKeyName for formatting current key output. |
| src/commands/auth/keys/create.ts | Uses shared parseCapabilities and updates messaging/docs for new input forms. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b7f671d to
6599aa0
Compare
6599aa0 to
8edc9f3
Compare
8edc9f3 to
8f971bd
Compare
8f971bd to
1b31af4
Compare
1b31af4 to
14efa99
Compare
14efa99 to
b4f6a93
Compare
- Added support for both json and comma separated capability support for keys capabilities - Extracted key parsing logic into key-parsing.ts
b4f6a93 to
fda720a
Compare
keys createsupportedjson capabilityandkeys updatesupportedcomma-separated capabilityindividually.jsonandcomma-separatedcapability support