From 71ecca8253b81a2656e2ff8a5603871f05f8371b Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Tue, 9 Sep 2025 10:30:29 +0200 Subject: [PATCH] Fix component import paths to use package imports - Change component paths from relative to @xtr-dev/payload-automation/client#Component - Use proper PayloadCMS plugin import syntax for components - Regenerate import map with correct package-based imports - Resolves 'Module not found' errors in dev project --- dev/app/(payload)/admin/importMap.js | 12 ++++++------ src/collections/Workflow.ts | 2 +- src/collections/WorkflowRuns.ts | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dev/app/(payload)/admin/importMap.js b/dev/app/(payload)/admin/importMap.js index 9a6e1d7..f0e7177 100644 --- a/dev/app/(payload)/admin/importMap.js +++ b/dev/app/(payload)/admin/importMap.js @@ -1,9 +1,9 @@ -import { default as default_4845c503d8eeb95a2cf39d519276b9b7 } from '../../../../../components/WorkflowExecutionStatus' -import { default as default_28774f13376b69227276b43eee64e5a1 } from '../../../../../components/StatusCell' -import { default as default_623fcff70b12e3e87839f97bf237499a } from '../../../../../components/ErrorDisplay' +import { WorkflowExecutionStatus as WorkflowExecutionStatus_6f365a93b6cb4b34ad564b391e21db6f } from '@xtr-dev/payload-automation/client' +import { StatusCell as StatusCell_6f365a93b6cb4b34ad564b391e21db6f } from '@xtr-dev/payload-automation/client' +import { ErrorDisplay as ErrorDisplay_6f365a93b6cb4b34ad564b391e21db6f } from '@xtr-dev/payload-automation/client' export const importMap = { - "../components/WorkflowExecutionStatus#default": default_4845c503d8eeb95a2cf39d519276b9b7, - "../components/StatusCell#default": default_28774f13376b69227276b43eee64e5a1, - "../components/ErrorDisplay#default": default_623fcff70b12e3e87839f97bf237499a + "@xtr-dev/payload-automation/client#WorkflowExecutionStatus": WorkflowExecutionStatus_6f365a93b6cb4b34ad564b391e21db6f, + "@xtr-dev/payload-automation/client#StatusCell": StatusCell_6f365a93b6cb4b34ad564b391e21db6f, + "@xtr-dev/payload-automation/client#ErrorDisplay": ErrorDisplay_6f365a93b6cb4b34ad564b391e21db6f } diff --git a/src/collections/Workflow.ts b/src/collections/Workflow.ts index 24cf290..226f1f5 100644 --- a/src/collections/Workflow.ts +++ b/src/collections/Workflow.ts @@ -41,7 +41,7 @@ export const createWorkflowCollection: (options: WorkflowsPlug type: 'ui', admin: { components: { - Field: '../components/WorkflowExecutionStatus' + Field: '@xtr-dev/payload-automation/client#WorkflowExecutionStatus' }, condition: (data) => !!data?.id // Only show for existing workflows } diff --git a/src/collections/WorkflowRuns.ts b/src/collections/WorkflowRuns.ts index 3a63a62..80fafab 100644 --- a/src/collections/WorkflowRuns.ts +++ b/src/collections/WorkflowRuns.ts @@ -40,7 +40,7 @@ export const WorkflowRunsCollection: CollectionConfig = { admin: { description: 'Current execution status', components: { - Cell: '../components/StatusCell' + Cell: '@xtr-dev/payload-automation/client#StatusCell' } }, defaultValue: 'pending', @@ -141,7 +141,7 @@ export const WorkflowRunsCollection: CollectionConfig = { description: 'Error message if workflow execution failed', condition: (_, siblingData) => siblingData?.status === 'failed', components: { - Field: '../components/ErrorDisplay' + Field: '@xtr-dev/payload-automation/client#ErrorDisplay' } }, },