Skip to content

feat: add pagination support to list commands - #72

Merged
designcode merged 3 commits into
mainfrom
feat/pagination-support
Apr 8, 2026
Merged

designcode merged 3 commits into
mainfrom
feat/pagination-support

Conversation

@designcode

@designcode designcode commented Apr 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add --limit and --page-token flags to objects list, buckets list, access-keys list, and iam policies list
  • When pagination flags are used: JSON output wraps items with a paginationToken field, table output prints a next-page hint to stderr, XML adds a <paginationToken> element
  • Without flags, behavior is unchanged (backwards compatible)

Test plan

  • npm run build compiles cleanly
  • npm test — all 541 tests pass (includes new tests for getPaginationOptions and formatPaginatedOutput)
  • Manual: tigris objects list <bucket> --limit 2 returns 2 items + token hint in stderr
  • Manual: tigris buckets list --limit 5 --json returns wrapped JSON with pagination token
  • Manual: tigris buckets list (no flags) — unchanged output

🤖 Generated with Claude Code


Note

Medium Risk
Adds new CLI flags and alters output shape when pagination is enabled (notably JSON wrapping and new stderr hints), which could affect automation that opts into pagination. Also bumps @tigrisdata/storage, introducing some dependency-level behavior change risk.

Overview
Adds opt-in pagination to buckets list, objects list, access-keys list, and iam policies list via new --limit/--page-token flags, passing these through to the underlying IAM/storage SDK calls.

Introduces formatPaginatedOutput (JSON wraps { items, paginationToken? }, XML appends <paginationToken>, tables remain the same) plus a printPaginationHint stderr hint for fetching the next page; updates command specs to document the new flags and adds unit tests for the new formatting/options helpers. Also bumps @tigrisdata/storage to ^2.16.2 (and lockfile deps updated accordingly).

Reviewed by Cursor Bugbot for commit 1d17904. Bugbot is set up for automated code reviews on this repo. Configure here.

designcode and others added 2 commits April 8, 2026 09:35
Add pagination support to objects list, buckets list, access-keys list,
and iam policies list. When flags are used, JSON output wraps items with
a paginationToken field; table output prints a next-page hint to stderr.
Without flags, behavior is unchanged (backwards compatible).

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

Reviewed by Cursor Bugbot for commit 49e66c4. Configure here.

Comment thread src/utils/options.ts Resolved
Commander.js passes CLI options as strings. The generic getOption<number>
is only a type assertion, not a runtime conversion, so limit was passed
as "10" (string) to SDK methods expecting a number.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@designcode
designcode merged commit 6e11eed into main Apr 8, 2026
3 checks passed
@designcode
designcode deleted the feat/pagination-support branch April 8, 2026 13:01
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants