feat: Add Phase 2 CLI commands - flows, connections, connection references, deployment settings#227
Conversation
…ences, deployment settings (#142, #143, #144, #145) Services: - IFlowService/FlowService: Cloud flow operations with clientdata parsing - IConnectionService/ConnectionService: Power Apps Admin API connections - IConnectionReferenceService/ConnectionReferenceService: CR operations with orphan detection - IDeploymentSettingsService/DeploymentSettingsService: PAC-compatible deployment settings - FlowClientDataParser: Extract CR logical names from flow JSON CLI Commands: - ppds flows list/get/url - ppds connections list/get - ppds connectionreferences list/get/flows/connections/analyze - ppds deployment-settings generate/sync/validate Tests: - FlowServiceTests, FlowClientDataParserTests - ConnectionReferenceServiceTests - DeploymentSettingsServiceTests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add command structure tests for: - ConnectionReferences: ConnectionsCommand, FlowsCommand, GetCommand - Connections: GetCommand - DeploymentSettings: GenerateCommand, SyncCommand, ValidateCommand - Flows: GetCommand, UrlCommand - Services: ConnectionService 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary of ChangesHello @joshsmithxrm, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the CLI's capabilities by introducing a suite of new commands for managing Power Automate cloud flows, Power Platform connections, and connection references. It also adds robust functionality for handling deployment settings files, enabling better automation and validation for Power Platform solution deployments. These additions aim to provide developers with more granular control and insight into their Power Platform environments directly from the command line. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant set of new CLI commands for managing Power Platform resources, including flows, connections, connection references, and deployment settings. This is a major feature addition that greatly enhances the tool's capabilities. The implementation is well-structured, adding new services and commands with support for both JSON and human-readable output. The code also correctly handles API scope changes for authentication. My review identifies a minor but important consistency issue across several of the new commands where human-readable output is written to stdout instead of stderr, which goes against the established CLI design principles for the project. Addressing this will improve the tool's usability in scripted environments.
There was a problem hiding this comment.
Pull request overview
This PR adds Phase 2 CLI commands for managing Power Platform flows, connections, connection references, and deployment settings. The implementation includes comprehensive service layers, API integrations, and orphan detection features.
Key changes:
- Four new command groups with 15 total subcommands for flow and connection management
- Service layer implementations for flows, connection references, deployment settings, and Power Apps Admin API connections
- Flow client data parser utility for extracting connection reference dependencies
- Environment ID tracking for Power Apps Admin API operations
Reviewed changes
Copilot reviewed 54 out of 54 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/PPDS.Dataverse/Services/IFlowService.cs |
Interface for cloud flow operations with connection reference extraction |
src/PPDS.Dataverse/Services/FlowService.cs |
Implementation querying workflow entities and parsing client data |
src/PPDS.Dataverse/Services/IConnectionReferenceService.cs |
Interface with orphan detection and flow relationship analysis |
src/PPDS.Dataverse/Services/ConnectionReferenceService.cs |
Implementation with case-insensitive CR lookup and orphan detection |
src/PPDS.Dataverse/Services/IDeploymentSettingsService.cs |
Interface for PAC-compatible deployment settings operations |
src/PPDS.Dataverse/Services/DeploymentSettingsService.cs |
Implementation with generate, sync, and validate operations |
src/PPDS.Dataverse/Services/Utilities/FlowClientDataParser.cs |
JSON parser for extracting connection references from flow metadata |
src/PPDS.Cli/Services/IConnectionService.cs |
Interface for Power Apps Admin API connection operations |
src/PPDS.Cli/Services/ConnectionService.cs |
HTTP client implementation for connections API |
src/PPDS.Cli/Commands/Flows/* |
CLI commands for flow operations (list, get, url) |
src/PPDS.Cli/Commands/Connections/* |
CLI commands for connection operations (list, get) |
src/PPDS.Cli/Commands/ConnectionReferences/* |
CLI commands for connection reference operations with analyze command |
src/PPDS.Cli/Commands/DeploymentSettings/* |
CLI commands for deployment settings (generate, sync, validate) |
src/PPDS.Auth/Credentials/* |
Added GetFlowApiTokenAsync for service.powerapps.com scope |
src/PPDS.Cli/Infrastructure/* |
Added EnvironmentId tracking for Power Apps Admin API |
| Test files | Comprehensive unit tests for all new services and commands |
The implementation is well-structured with proper separation of concerns, comprehensive error handling, and extensive test coverage. No critical issues were identified.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Change Console.WriteLine to Console.Error.WriteLine for analysis and validation output to keep stdout clean for machine-readable data. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
ppds flowscommand group - Manage cloud flows (feat: Add ppds flows command for cloud flow management #142)ppds flows list- List cloud flows (supports--solution,--state)ppds flows get <name>- Get flow details by unique nameppds flows url <name>- Get Power Automate maker URL for a flowppds connectionscommand group - List Power Platform connections (feat: Add ppds connections command for connector instance management #144)ppds connections list- List connections from Power Apps Admin APIppds connections get <id>- Get connection details by IDppds connectionreferencescommand group - Manage connection references with orphan detection (feat: Add ppds connrefs command for connection reference management #143)ppds connectionreferences list- List connection referencesppds connectionreferences get <name>- Get connection reference detailsppds connectionreferences flows <name>- List flows using a connection referenceppds connectionreferences connections <name>- Show bound connection detailsppds connectionreferences analyze- Analyze flow-to-connection-reference relationshipsppds deployment-settingscommand group - Generate and sync deployment settings files (feat: Add ppds deployment-settings command for ALM deployment settings #145)ppds deployment-settings generate- Generate deployment settings file from current environmentppds deployment-settings sync- Sync existing file with solutionppds deployment-settings validate- Validate deployment settings file against solutionBug Fixes
connections listAPI scope (useservice.powerapps.cominstead ofapi.powerapps.com)flows urlto use Power Platform Environment ID GUID instead of extracting org subdomainTest plan
ppds connections listworks with interactive authppds flows listreturns flows from environment🤖 Generated with Claude Code