Fix ES module imports to eliminate runtime require() calls

- 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>
This commit is contained in:
2025-08-31 17:58:46 +02:00
parent 7affbd26c4
commit 8ed647587b
2 changed files with 75 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
import type {Config, Payload, TaskConfig} from 'payload'
import * as cron from 'node-cron'
import cron from 'node-cron'
import {type Workflow, WorkflowExecutor} from '../core/workflow-executor.js'
import {getConfigLogger} from './logger.js'