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

@@ -1,6 +1,6 @@
import type {TriggerConfig} from '../plugin/config-types.js'
export const collectionHookTrigger: TriggerConfig = ({collectionTriggers}) => ({
export const collectionTrigger: TriggerConfig = ({collectionTriggers}) => ({
slug: 'collection-hook',
parameters: [
{

View File

@@ -1,7 +1,7 @@
import type {TriggerConfig} from '../plugin/config-types.js'
export const globalTrigger: TriggerConfig = () => ({
slug: 'global',
export const globalTrigger: TriggerConfig = ({globalTriggers}) => ({
slug: 'global-hook',
parameters: [
{
name: 'global',
@@ -9,16 +9,20 @@ export const globalTrigger: TriggerConfig = () => ({
admin: {
description: 'Global that triggers the workflow',
},
options: [], // Will be populated dynamically based on available globals
options: Object.keys(globalTriggers || {}),
},
{
name: 'globalOperation',
name: 'operation',
type: 'select',
admin: {
description: 'Global operation that triggers the workflow',
description: 'Global hook that triggers the workflow',
},
options: [
'update'
"afterChange",
"afterRead",
"beforeChange",
"beforeRead",
"beforeValidate"
],
}
]

View File

@@ -1,3 +1,2 @@
export { collectionHookTrigger } from './collection-hook-trigger.js'
export { collectionTrigger } from './collection-trigger.js'
export { globalTrigger } from './global-trigger.js'
export { webhookTrigger } from './webhook-trigger.js'

View File

@@ -1,20 +0,0 @@
import type {TriggerConfig} from '../plugin/config-types.js'
export const webhookTrigger: TriggerConfig = () => ({
slug: 'webhook',
parameters: [
{
name: 'webhookPath',
type: 'text',
admin: {
description: 'URL path for the webhook (e.g., "my-webhook"). Full URL will be /api/workflows-webhook/my-webhook',
},
validate: (value: any, {siblingData}: any) => {
if (siblingData?.type === 'webhook' && !value && !siblingData?.parameters?.webhookPath) {
return 'Webhook path is required for webhook triggers'
}
return true
},
}
]
})