Add aggressive debugging logs to trace hook execution

- Add console.log statements that will ALWAYS appear if hooks are called
- Trace WorkflowExecutor creation and method availability
- Log every step of hook execution pipeline
- This will help identify exactly where the execution is failing

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-01 20:47:38 +02:00
parent c24610b3d9
commit 08a4022a41
7 changed files with 482 additions and 0 deletions

View File

@@ -79,11 +79,16 @@ export const workflowsPlugin =
logger.info(`Plugin configuration: ${Object.keys(pluginOptions.collectionTriggers || {}).length} collection triggers, ${pluginOptions.steps?.length || 0} steps`)
// Create workflow executor instance
console.log('🚨 CREATING WORKFLOW EXECUTOR INSTANCE')
const executor = new WorkflowExecutor(payload, logger)
console.log('🚨 EXECUTOR CREATED:', typeof executor)
console.log('🚨 EXECUTOR METHODS:', Object.getOwnPropertyNames(Object.getPrototypeOf(executor)))
// Initialize hooks
console.log('🚨 INITIALIZING COLLECTION HOOKS')
logger.info('Initializing collection hooks...')
initCollectionHooks(pluginOptions, payload, logger, executor)
console.log('🚨 COLLECTION HOOKS INITIALIZATION COMPLETE')
logger.info('Initializing global hooks...')
initGlobalHooks(payload, logger, executor)