Remove unused plugin modules and their associated tests

- Delete `init-global-hooks.ts`, `init-step-tasks.ts`, `init-webhook.ts`, and `init-workflow-hooks.ts`
- Remove obsolete components: `TriggerWorkflowButton` and `WorkflowExecutionStatus`
- Clean up unused trigger files: `webhook-trigger.ts`
- Delete webhook-related integration tests: `webhook-triggers.spec.ts`
- Streamline related documentation and improve maintainability by eliminating deprecated code
This commit is contained in:
2025-09-10 18:08:25 +02:00
parent 0f741acf73
commit acdfa411e4
22 changed files with 228 additions and 1217 deletions

View File

@@ -12,7 +12,6 @@ export type PayloadWorkflow = {
parameters?: {
collectionSlug?: null | string
operation?: null | string
webhookPath?: null | string
global?: null | string
globalOperation?: null | string
[key: string]: unknown
@@ -43,54 +42,8 @@ export type WorkflowTrigger = {
} & NonNullable<PayloadWorkflow['triggers']>[0]
export interface ExecutionContext {
steps: Record<string, {
error?: string
input: unknown
output: unknown
state: 'failed' | 'pending' | 'running' | 'succeeded'
_startTime?: number
executionInfo?: {
completed: boolean
success: boolean
executedAt: string
duration: number
failureReason?: string
}
errorDetails?: {
stepId: string
errorType: string
duration: number
attempts: number
finalError: string
context: {
url?: string
method?: string
timeout?: number
statusCode?: number
headers?: Record<string, string>
[key: string]: any
}
timestamp: string
}
}>
trigger: {
collection?: string
data?: unknown
doc?: unknown
headers?: Record<string, string>
operation?: string
path?: string
previousDoc?: unknown
req?: PayloadRequest
triggeredAt?: string
type: string
user?: {
collection?: string
email?: string
id?: string
}
[key: string]: any
}
steps: Record<string, any>
trigger: Record<string, any>
}
export class WorkflowExecutor {
@@ -229,7 +182,7 @@ export class WorkflowExecutor {
}
}
}
// Also extract from nested parameters object if it exists
if (step.parameters && typeof step.parameters === 'object') {
Object.assign(inputFields, step.parameters)