- 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>
- 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>