-
Notifications
You must be signed in to change notification settings - Fork 284
[Local Action Tester] Adds postman collection and event-generator #3190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (8.74%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #3190 +/- ##
===========================================
- Coverage 80.03% 27.65% -52.38%
===========================================
Files 1229 15 -1214
Lines 24524 886 -23638
Branches 5015 181 -4834
===========================================
- Hits 19627 245 -19382
+ Misses 4135 641 -3494
+ Partials 762 0 -762 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f12a4b0
to
2653bcb
Compare
22b4bc2
to
179e2b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds developer tooling for the Local Action Tester server by introducing a Postman collection for API testing and a CLI command for generating sample test payloads. The addition provides developers with better tools to test and interact with destination APIs during local development.
Key changes:
- Adds CLI command
generate-test-payload
to generate sample curl commands for different destination APIs - Introduces comprehensive payload generation utilities for settings, mappings, and audience configurations
- Includes a complete Postman collection with pre-configured requests for all available API endpoints
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/cli/src/commands/generate-test-payload.ts | Main CLI command implementation for generating test payloads and curl commands |
packages/cli/src/lib/payload-generator/payload.ts | Core payload generation logic with field mapping and sample data creation |
packages/cli/src/lib/payload-generator/settings.ts | Utilities for generating destination settings and authentication configurations |
packages/cli/src/lib/payload-generator/audience.ts | Audience settings generation functionality |
packages/cli/src/lib/payload-generator/api-definitions.ts | Static API endpoint definitions and path formatting utilities |
packages/cli/src/lib/event-generator.ts | Event reconstruction logic for FQL subscription parsing |
local-development-server.postman_collection.json | Complete Postman collection with sample requests for all API endpoints |
codecov.yml | Updated to exclude CLI package from code coverage requirements |
README.md | Documentation update adding the new CLI command |
} | ||
|
||
return payload | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is duplicated from payload.ts lines 12-22. Consider removing this duplicate implementation and importing the function from payload.ts instead to avoid code duplication.
} | |
// Import the shared implementation from payload.ts | |
import { addAudienceSettingsToPayload } from './payload' |
Copilot uses AI. Check for mistakes.
This PR adds postman collection for the local action tester server
It also adds command line CLI to generate sample events for a given destination
Testing
Testing completed successfully