Skip to content

Conversation

varadarajan-tw
Copy link
Contributor

@varadarajan-tw varadarajan-tw commented Aug 21, 2025

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

image

Copy link

codecov bot commented Aug 21, 2025

Codecov Report

❌ Patch coverage is 8.74317% with 167 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.65%. Comparing base (bbc9237) to head (2653bcb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/cli/src/commands/generate-test-payload.ts 8.74% 167 Missing ⚠️

❌ 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.
❌ Your project check has failed because the head coverage (27.65%) is below the target coverage (70.00%). You can increase the head 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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@varadarajan-tw varadarajan-tw force-pushed the add-postman-collection-payload-generator branch from f12a4b0 to 2653bcb Compare August 21, 2025 16:10
@varadarajan-tw varadarajan-tw changed the title Adds postman collection and event-generator [Local Action Tester] Adds postman collection and event-generator Aug 22, 2025
@varadarajan-tw varadarajan-tw marked this pull request as ready for review August 22, 2025 05:44
@varadarajan-tw varadarajan-tw requested a review from a team as a code owner August 22, 2025 05:44
@varadarajan-tw varadarajan-tw requested a review from Copilot August 22, 2025 11:25
Copilot

This comment was marked as outdated.

@varadarajan-tw varadarajan-tw force-pushed the add-postman-collection-payload-generator branch from 22b4bc2 to 179e2b6 Compare August 22, 2025 11:43
@varadarajan-tw varadarajan-tw marked this pull request as draft August 22, 2025 11:49
@varadarajan-tw varadarajan-tw requested a review from Copilot August 22, 2025 15:32
Copy link
Contributor

@Copilot Copilot AI left a 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
}
Copy link
Preview

Copilot AI Aug 22, 2025

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.

Suggested change
}
// Import the shared implementation from payload.ts
import { addAudienceSettingsToPayload } from './payload'

Copilot uses AI. Check for mistakes.

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

Successfully merging this pull request may close these issues.

2 participants