feat: list command defaults to auto-pagination when --limit is not sp…#149
feat: list command defaults to auto-pagination when --limit is not sp…#149rsonghuster merged 1 commit intomasterfrom
Conversation
…ecified When no --limit is passed, the list command now uses listFunctions which auto-paginates through all functions. When --limit is explicitly set, it still uses listFunctionsPage for single-page results with nextToken support. Also includes: - Input validation for --limit (must be a positive integer) - Extracted LIST_TABLE_KEYS constant to eliminate duplication - Increased listFunctions batch size from 2 to 100 for performance Change-Id: I54d5f7f36ec5c03117465d03dea0ce1f641e3420 Co-developed-by: Claude <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughA new ChangesList Subcommand Feature
Sequence DiagramsequenceDiagram
participant User as User/CLI
participant List as List Command
participant FC as FC SDK
participant API as FC API
User->>List: invoke with args<br/>(--region, --limit, --prefix, --table)
List->>List: parse & validate args
List->>List: resolve region from props/args
List->>FC: instantiate FC client<br/>(credentials, region, user-agent)
alt --limit provided
List->>FC: listFunctionsPage(limit, prefix?, nextToken?)
else auto-pagination
List->>FC: listFunctions(prefix?)
loop while nextToken exists
FC->>API: fetch next page
API-->>FC: return page
end
end
FC->>API: call FC SDK
API-->>FC: return functions list
alt --table flag
List->>List: render table<br/>(tableShow)
end
List-->>User: return results
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
…ecified
When no --limit is passed, the list command now uses listFunctions which auto-paginates through all functions. When --limit is explicitly set, it still uses listFunctionsPage for single-page results with nextToken support.
Also includes:
Change-Id: I54d5f7f36ec5c03117465d03dea0ce1f641e3420
Co-developed-by: Claude noreply@anthropic.com
Summary by CodeRabbit
New Features
listcommand to retrieve functions with support for region specification, prefix filtering, custom pagination limits, continuation tokens, and formatted table output.Tests
listcommand.Chores