FeatureFuel
3

Configurable hook execution order for extensions

Source: directus/directus#25796 · opened by @the-other-dev
Summary Allow explicit control over the execution order of custom hooks/extensions listening to the same event in Directus. Basic Example Suppose you have two hooks: one called hook-virus-scanner that scans uploaded files for viruses, and another called hook-file-processor that processes files after upload. With this feature, you could explicitly specify that hook-virus-scanner should always run before hook-file-processor, ensuring files are scanned before any processing occurs. Motivation Currently, the execution order of hooks is determined by their names, which is not explicit or reliable. This limits modularity and maintainability, as developers must use naming conventions to control order. Explicit ordering would enable smaller, focused extensions and allow instance-level customization, supporting more complex and modular workflows. Detailed Design • Introduce an order property for hook definitions, or a global configuration mapping events to hook execu…

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests