- Replace duplicate type definitions with PayloadCMS generated types
- Fix workflow context serialization with safeSerialize() method
- Resolve type mismatches (id: string vs number)
- Update all imports to use PayloadWorkflow type
- Ensure workflow runs are created successfully without serialization errors
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update workflow executor to check both 'collection' and 'collectionSlug' fields
- Add debug logging for workflow trigger matching
- Fixes issue where collection triggers were not being matched correctly
- Create dedicated types-only module (src/types/index.ts) with pure type definitions
- Update main index.ts to export only pure types without runtime imports
- Removes need for serverExternalPackages in Next.js configuration
- Plugin now works "out of the box" without bundling workarounds
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Separated server-side and client-safe exports
- Main export now contains only types to prevent bundling server code
- Updated documentation with new import structure
🤖 Generated with [Claude Code](https://claude.ai/code)
The workflow now detects version changes by:
1. Looking for version bump commits (created by npm version)
2. Checking if package.json was modified and version actually changed
This works with the npm version workflow where:
1. Make changes and commit them
2. Run npm version patch (creates version commit)
3. Push both commits - workflow publishes on version commit
- Create dedicated /server export for server-side functions and plugin
- Main export now contains only types (client-safe)
- Remove problematic /steps export that exposed server functions
- Update README with correct import structure
- Fix tests to use /server export
This prevents server-side code from being bundled in client JavaScript,
eliminating the "require is not defined in ES module scope" runtime error.
Breaking change: workflowsPlugin must now be imported from '/server':
import { workflowsPlugin } from '@xtr-dev/payload-automation/server'
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed node-cron import from namespace import to default import
- Added GitHub workflow for automatic npm publishing on version changes
- Ensured all build output uses pure ES module imports without CommonJS remnants
This fixes the runtime error: "ReferenceError: require is not defined in ES module scope"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated Workflow collection trigger field from 'collection' to 'collectionSlug'
- Updated all document operation steps (create, read, update, delete) to use 'collectionSlug'
- Updated corresponding handlers to destructure 'collectionSlug' instead of 'collection'
- Removed debug console.log statements from logger configLogger methods
- Fixed collection hook debug logs to use 'slug' instead of reserved 'collection' field
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>