Skip to content

feat: add token commands#67

Merged
angeloashmore merged 2 commits intomainfrom
aa/token-commands
Mar 25, 2026
Merged

feat: add token commands#67
angeloashmore merged 2 commits intomainfrom
aa/token-commands

Conversation

@angeloashmore
Copy link
Member

@angeloashmore angeloashmore commented Mar 25, 2026

Resolves #51

Description

Re-enable token CRUD commands (token list, token create, token delete) for managing Prismic API access tokens and write tokens through the CLI.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

🤖 Generated with Claude Code


Note

Medium Risk
Adds CLI endpoints to create/list/delete repository API tokens, which touches security-sensitive token management flows and could accidentally expose or delete tokens if request/lookup logic is wrong.

Overview
Adds a new prismic token command group with list, create, and delete subcommands to manage repository access tokens (OAuth authorizations) and write tokens from the CLI.

Extends src/clients/wroom.ts with typed (Zod) helpers for token/OAuth app CRUD, wires the router into src/index.ts, and adds end-to-end tests for help output and token lifecycle; test timeout is increased to 10_000ms.

Written by Cursor Bugbot for commit 9eed778. This will update automatically on new commits. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

Resolves #51

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@angeloashmore angeloashmore marked this pull request as ready for review March 25, 2026 01:00
Rename authorization functions to include OAuth prefix, add URL encoding
for path parameters, simplify tests by removing manual cleanup, and add
test for --allow-releases flag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.


if (json) {
console.info(stringify({ accessTokens, writeTokens }));
return;
Copy link

Choose a reason for hiding this comment

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

JSON output has inconsistent key naming and formats

Low Severity

The --json output mixes two different schemas within the same response object. accessTokens entries are reformatted into camelCase keys with a formatted date string (name, createdAt), while writeTokens entries are passed through raw from the API with snake_case keys and a raw Unix timestamp (app_name, timestamp). Consumers of the JSON output need to handle two different naming conventions and date formats in a single response.

Additional Locations (1)
Fix in Cursor Fix in Web

@angeloashmore angeloashmore merged commit f02cfc3 into main Mar 25, 2026
12 checks passed
@angeloashmore angeloashmore deleted the aa/token-commands branch March 25, 2026 01:23
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.

Re-enable token commands

1 participant