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.
Comments
Similar requests
Add `emitter` to flow extensions
4 votes · 0 comments
Allow extensions to access the configured directus cache
27 votes · 0 comments
Directus Extensions: Provide Settings-Option
6 votes · 0 comments
Access to e.g. getAccountabilityForRole and ItemsService in @directus/extensions-sdk
2 votes · 0 comments
Bundle custom i18n translations with extensions
21 votes · 0 comments
No comments yet.