Conversation
Add basic Metadata API support for developer convenience: - api/metadata: New package for Metadata API operations using REST endpoints - DescribeMetadata: List available metadata types - ListMetadata: List components of a type - Retrieve: Get component source code - Deploy: Deploy metadata from local directory - Zip utilities for package creation/extraction - sfdc metadata commands: - types: List available metadata types - list: List components of a type - retrieve: Retrieve components to local directory - deploy: Deploy from local directory with --check-only and --wait Supported types for direct operations: ApexClass, ApexTrigger, ApexPage, ApexComponent For complex workflows, users should use the official sf CLI. Closes #21
Test Coverage AssessmentI've reviewed the test coverage for this PR adding Metadata API support. SummaryOverall, the test coverage is solid for the core functionality. The PR adds ~1900 lines of code and ~800 lines of tests across two test files ( What's Well CoveredAPI Client (
Commands (
Areas Without Direct Tests (but acceptable)
Potential Gaps to Consider (Minor)
VerdictThe test coverage is adequate for merge. The critical paths are tested:
The untested paths are primarily:
This follows the principle of testing critical business logic while being pragmatic about diminishing returns on edge case coverage. |
Summary
api/metadata/) for basic metadata operationssfdc metadatacommands: types, list, retrieve, deploysfCLINew Commands
List Available Types
List Components
Retrieve Metadata
sfdc metadata retrieve --type ApexClass --name MyController --output ./src sfdc metadata retrieve --type ApexClass --output ./src # all classesDeploy Metadata
Supported Types for Direct Operations
Design Notes
sfCLITest plan
Closes #21
🤖 Generated with Claude Code