v0.0.12: Type consistency and configuration improvements

Type System Enhancements:
- Introduced PayloadID helper type (string | number) for flexible ID handling
- Created shared types module (src/types/index.ts) for better type consistency
- Exported PayloadID and FeatureFlag types from main index for user access
- Fixed runtime issues with different Payload ID configurations

Configuration Improvements:
- Made API request limits configurable via maxFlags prop (default 100, max 1000)
- Added configurable collection slug support for custom collection names
- Enhanced URL construction to use config.routes.admin for proper path handling
- Improved server-side pagination with query parameter support

Code Quality:
- Centralized type definitions for better maintainability
- Enhanced type safety across client and server components
- Improved prop interfaces with better documentation
- Fixed potential number parsing edge cases with parseFloat

Developer Experience:
- Users can now configure collection slug, API limits, and admin paths
- Better TypeScript support with exported shared types
- Consistent handling of both string and numeric IDs
- More flexible plugin configuration options

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-03 17:36:53 +02:00
parent 0a39d0631c
commit 0c7c864248
5 changed files with 54 additions and 50 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@xtr-dev/payload-feature-flags",
"version": "0.0.11",
"version": "0.0.12",
"description": "Feature flags plugin for Payload CMS - manage feature toggles, A/B tests, and gradual rollouts",
"license": "MIT",
"type": "module",